mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
[vulkan] Get render info parsing mostly working
Just frame buffer and pipeline info to clean up before worrying about tasks.
This commit is contained in:
parent
2287a3de3f
commit
cd1b20dc22
3 changed files with 33 additions and 10 deletions
|
@ -1,10 +1,13 @@
|
|||
{
|
||||
properties = {
|
||||
color = {
|
||||
bsp = "[0, 0.5, 0.6, 1]";
|
||||
alias = "[0.6, 0.5, 0, 1]";
|
||||
iqm = "[0.6, 0.5, 0, 1]";
|
||||
sprite = "[0.6, 0.5, 0, 1]";
|
||||
bsp = "[0.0, 0.5, 0.6, 1]";
|
||||
alias = "[0.6, 0.5, 0.0, 1]";
|
||||
iqm = "[0.6, 0.5, 0.0, 1]";
|
||||
sprite = "[0.6, 0.5, 0.0, 1]";
|
||||
particles = "[0.4, 0.5, 0.8, 1]";
|
||||
lights = "[0.8, 0.6, 0.2, 1]";
|
||||
compose = "[0.7, 0.7, 0.7, 1]";
|
||||
};
|
||||
color_dependency = {
|
||||
src = {
|
||||
|
@ -186,7 +189,9 @@ renderpasses = {
|
|||
depth = {
|
||||
color = "[ 0.5, 0.5, 0.5, 1]";
|
||||
attachments = {
|
||||
depth = depth_stencil_read_only_optimal;
|
||||
depth = {
|
||||
depth = depth_stencil_attachment_optimal;
|
||||
};
|
||||
preserve = (color, emission, normal, position, output);
|
||||
};
|
||||
pipelines = {
|
||||
|
@ -229,7 +234,9 @@ renderpasses = {
|
|||
depth = $depth_dependency;
|
||||
};
|
||||
attachments = {
|
||||
depth = depth_stencil_read_only_optimal;
|
||||
depth = {
|
||||
depth = depth_stencil_read_only_optimal;
|
||||
};
|
||||
preserve = (color, emission, normal, position, output);
|
||||
};
|
||||
pipelines = {
|
||||
|
@ -254,7 +261,7 @@ renderpasses = {
|
|||
};
|
||||
particles:trans = {
|
||||
color = $color.particles;
|
||||
pipline = partdraw;
|
||||
pipeline = partdraw;
|
||||
tasks = (
|
||||
{ func = particles_draw; },
|
||||
);
|
||||
|
@ -273,7 +280,9 @@ renderpasses = {
|
|||
normal = color_attachment_optimal;
|
||||
position = color_attachment_optimal;
|
||||
};
|
||||
depth = depth_stencil_read_only_optimal;
|
||||
depth = {
|
||||
depth = depth_stencil_read_only_optimal;
|
||||
};
|
||||
preserve = (output);
|
||||
};
|
||||
pipelines = {
|
||||
|
|
|
@ -314,13 +314,20 @@ parse_labeledsingle (const plfield_t *field, const plitem_t *item,
|
|||
// field->name, field->offset,
|
||||
// field->type, field->parser, field->data);
|
||||
|
||||
const char *key = PL_KeyAtIndex (item, 0);
|
||||
if (!key) {
|
||||
PL_Message (messages, item, "missing item");
|
||||
return 0;
|
||||
}
|
||||
item = PL_ObjectForKey (item, key);
|
||||
|
||||
if (!PL_CheckType (single->type, PL_Type (item))) {
|
||||
PL_TypeMismatch (messages, item, field->name, single->type,
|
||||
PL_Type (item));
|
||||
return 0;
|
||||
}
|
||||
|
||||
plfield_t f = { 0, 0, single->type, single->parser, 0 };
|
||||
plfield_t f = { field->name, 0, single->type, single->parser, 0 };
|
||||
void *value = vkparse_alloc (context, single->stride);
|
||||
memset (value, 0, single->stride);
|
||||
if (!single->parser (&f, item, value, messages, context)) {
|
||||
|
@ -469,6 +476,8 @@ vkstrdup (parsectx_t *context, const char *str)
|
|||
return dup;
|
||||
}
|
||||
|
||||
static parse_string_t parse_string_array = { 0 };
|
||||
|
||||
static int
|
||||
parse_string (const plfield_t *field, const plitem_t *item,
|
||||
void *data, plitem_t *messages, void *context)
|
||||
|
|
|
@ -459,7 +459,12 @@
|
|||
value = depth;
|
||||
};
|
||||
preserve = {
|
||||
type = (labeledarray, qfv_attachmentrefinfo_t, name);
|
||||
type = (array, {
|
||||
parse_type = QFString;
|
||||
type = "char *";
|
||||
parser = parse_string;
|
||||
data = parse_string_array;
|
||||
});
|
||||
size = num_preserve;
|
||||
values = preserve;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue