mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
[vulkan] Use references for views and pipelines
I'm pretty sure I don't want to require views to be created and pipelines to be parsed just to parse the render pass info.
This commit is contained in:
parent
345aa8e094
commit
728807bd7a
2 changed files with 36 additions and 6 deletions
|
@ -8,6 +8,11 @@
|
||||||
|
|
||||||
#include "QF/simd/types.h"
|
#include "QF/simd/types.h"
|
||||||
|
|
||||||
|
typedef struct qfv_reference_s {
|
||||||
|
const char *name;
|
||||||
|
int line;
|
||||||
|
} qfv_reference_t;
|
||||||
|
|
||||||
typedef struct qfv_imageinfo_s {
|
typedef struct qfv_imageinfo_s {
|
||||||
const char *name;
|
const char *name;
|
||||||
VkImageCreateFlags flags;
|
VkImageCreateFlags flags;
|
||||||
|
@ -84,7 +89,7 @@ typedef struct qfv_attachmentsetinfo_s {
|
||||||
typedef struct qfv_pipelineinfo_s {
|
typedef struct qfv_pipelineinfo_s {
|
||||||
vec4f_t color;
|
vec4f_t color;
|
||||||
const char *name;
|
const char *name;
|
||||||
VkGraphicsPipelineCreateInfo *pipeline;
|
qfv_reference_t pipeline;
|
||||||
uint32_t num_tasks;
|
uint32_t num_tasks;
|
||||||
qfv_taskinfo_t *tasks;
|
qfv_taskinfo_t *tasks;
|
||||||
} qfv_pipelineinfo_t;
|
} qfv_pipelineinfo_t;
|
||||||
|
@ -100,11 +105,19 @@ typedef struct qfv_subpassinfo_s {
|
||||||
qfv_pipelineinfo_t *pipelines;
|
qfv_pipelineinfo_t *pipelines;
|
||||||
} qfv_subpassinfo_t;
|
} qfv_subpassinfo_t;
|
||||||
|
|
||||||
|
typedef struct qfv_framebufferinfo_s {
|
||||||
|
qfv_reference_t *attachments;
|
||||||
|
uint32_t num_attachments;
|
||||||
|
uint32_t width;
|
||||||
|
uint32_t height;
|
||||||
|
uint32_t layers;
|
||||||
|
} qfv_framebufferinfo_t;
|
||||||
|
|
||||||
typedef struct qfv_renderpassinfo_s {
|
typedef struct qfv_renderpassinfo_s {
|
||||||
const char *name;
|
const char *name;
|
||||||
uint32_t num_attachments;
|
uint32_t num_attachments;
|
||||||
qfv_attachmentinfo_t *attachments;
|
qfv_attachmentinfo_t *attachments;
|
||||||
VkFramebufferCreateInfo framebuffer;
|
qfv_framebufferinfo_t framebuffer;
|
||||||
uint32_t num_subpasses;
|
uint32_t num_subpasses;
|
||||||
qfv_subpassinfo_t *subpasses;
|
qfv_subpassinfo_t *subpasses;
|
||||||
} qfv_renderpassinfo_t;
|
} qfv_renderpassinfo_t;
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
qfv_taskinfo_t,
|
qfv_taskinfo_t,
|
||||||
qfv_pipelineinfo_t,
|
qfv_pipelineinfo_t,
|
||||||
qfv_subpassinfo_t,
|
qfv_subpassinfo_t,
|
||||||
|
qfv_framebufferinfo_t,
|
||||||
qfv_renderpassinfo_t,
|
qfv_renderpassinfo_t,
|
||||||
qfv_renderinfo_t,
|
qfv_renderinfo_t,
|
||||||
);
|
);
|
||||||
|
@ -476,10 +477,7 @@
|
||||||
type = string;
|
type = string;
|
||||||
string = name;
|
string = name;
|
||||||
};
|
};
|
||||||
pipeline = {
|
pipeline = auto;
|
||||||
type = (single, VkGraphicsPipelineCreateInfo);
|
|
||||||
value = pipeline;
|
|
||||||
};
|
|
||||||
tasks = {
|
tasks = {
|
||||||
type = (array, qfv_taskinfo_t);
|
type = (array, qfv_taskinfo_t);
|
||||||
size = num_tasks;
|
size = num_tasks;
|
||||||
|
@ -508,6 +506,25 @@
|
||||||
values = pipelines;
|
values = pipelines;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
qfv_framebufferinfo_s = {
|
||||||
|
.name = qfv_framebufferinfo_t;
|
||||||
|
attachments = {
|
||||||
|
type = (array, qfv_reference_t);
|
||||||
|
size = num_attachments;
|
||||||
|
values = attachments;
|
||||||
|
};
|
||||||
|
width = auto;
|
||||||
|
height = auto;
|
||||||
|
layers = auto;
|
||||||
|
};
|
||||||
|
qfv_reference_s = {
|
||||||
|
.name = qfv_reference_t;
|
||||||
|
.type = QFString;
|
||||||
|
.string = {
|
||||||
|
name = $item.string;
|
||||||
|
line = $item.line;
|
||||||
|
};
|
||||||
|
};
|
||||||
qfv_renderpassinfo_s = {
|
qfv_renderpassinfo_s = {
|
||||||
.name = qfv_renderpassinfo_t;
|
.name = qfv_renderpassinfo_t;
|
||||||
attachments = {
|
attachments = {
|
||||||
|
|
Loading…
Reference in a new issue