mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-06 17:32:05 +00:00
[vulkan] Be clearer about descriptor set layouts vs sets
This get pretty confusing when you refer to both the sets and the set layouts in close vicinity.
This commit is contained in:
parent
511389a973
commit
eb8fc0fb9a
3 changed files with 14 additions and 14 deletions
|
@ -27,13 +27,13 @@ typedef struct qfv_reference_s {
|
|||
int line;
|
||||
} qfv_reference_t;
|
||||
|
||||
typedef struct qfv_descriptorsetinfo_s {
|
||||
typedef struct qfv_descriptorsetlayoutinfo_s {
|
||||
const char *name;
|
||||
VkDescriptorSetLayoutCreateFlags flags;
|
||||
uint32_t num_bindings;
|
||||
VkDescriptorSetLayoutBinding *bindings;
|
||||
VkDescriptorSetLayout setLayout;
|
||||
} qfv_descriptorsetinfo_t;
|
||||
} qfv_descriptorsetlayoutinfo_t;
|
||||
|
||||
typedef struct qfv_layoutinfo_s {
|
||||
const char *name;
|
||||
|
@ -243,8 +243,8 @@ typedef struct qfv_jobinfo_s {
|
|||
qfv_imageinfo_t *buffers;
|
||||
qfv_imageviewinfo_t *bufferviews;
|
||||
|
||||
uint32_t num_descriptorsets;
|
||||
qfv_descriptorsetinfo_t *descriptorsets;
|
||||
uint32_t num_descriptorsetlayouts;
|
||||
qfv_descriptorsetlayoutinfo_t *descriptorsetlayouts;
|
||||
} qfv_jobinfo_t;
|
||||
|
||||
#ifndef __QFCC__
|
||||
|
|
|
@ -546,8 +546,8 @@ find_subpass (qfv_dependencyinfo_t *d, uint32_t spind,
|
|||
static VkDescriptorSetLayout
|
||||
find_descriptorSet (const qfv_reference_t *ref, objstate_t *s)
|
||||
{
|
||||
for (uint32_t i = 0; i < s->jinfo->num_descriptorsets; i++) {
|
||||
__auto_type ds = &s->jinfo->descriptorsets[i];
|
||||
for (uint32_t i = 0; i < s->jinfo->num_descriptorsetlayouts; i++) {
|
||||
__auto_type ds = &s->jinfo->descriptorsetlayouts[i];
|
||||
if (strcmp (ds->name, ref->name) == 0) {
|
||||
if (!ds->setLayout) {
|
||||
VkDescriptorSetLayoutCreateInfo cInfo = {
|
||||
|
@ -1386,8 +1386,8 @@ QFV_Render_Shutdown (vulkan_ctx_t *ctx)
|
|||
}
|
||||
if (rctx->jobinfo) {
|
||||
__auto_type jinfo = rctx->jobinfo;
|
||||
for (uint32_t i = 0; i < jinfo->num_descriptorsets; i++) {
|
||||
__auto_type setLayout = jinfo->descriptorsets[i].setLayout;
|
||||
for (uint32_t i = 0; i < jinfo->num_descriptorsetlayouts; i++) {
|
||||
__auto_type setLayout = jinfo->descriptorsetlayouts[i].setLayout;
|
||||
dfunc->vkDestroyDescriptorSetLayout (device->dev, setLayout, 0);
|
||||
}
|
||||
delete_memsuper (jinfo->memsuper);
|
||||
|
|
|
@ -33,7 +33,7 @@ search = (
|
|||
qfv_subpass_t,
|
||||
qfv_output_t,
|
||||
|
||||
qfv_descriptorsetinfo_t,
|
||||
qfv_descriptorsetlayoutinfo_t,
|
||||
qfv_imageinfo_t,
|
||||
qfv_imageviewinfo_t,
|
||||
qfv_bufferinfo_t,
|
||||
|
@ -616,8 +616,8 @@ parse = {
|
|||
values = subpasses;
|
||||
};
|
||||
};
|
||||
qfv_descriptorsetinfo_s = {
|
||||
.name = qfv_descriptorsetinfo_t;
|
||||
qfv_descriptorsetlayoutinfo_s = {
|
||||
.name = qfv_descriptorsetlayoutinfo_t;
|
||||
flags = auto;
|
||||
bindings = {
|
||||
type = (array, VkDescriptorSetLayoutBinding);
|
||||
|
@ -714,9 +714,9 @@ parse = {
|
|||
values = steps;
|
||||
};
|
||||
descriptorSetLayouts = {
|
||||
type = (labeledarray, qfv_descriptorsetinfo_t, name);
|
||||
size = num_descriptorsets;
|
||||
values = descriptorsets;
|
||||
type = (labeledarray, qfv_descriptorsetlayoutinfo_t, name);
|
||||
size = num_descriptorsetlayouts;
|
||||
values = descriptorsetlayouts;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue