mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 06:10:56 +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 = {
|
properties = {
|
||||||
color = {
|
color = {
|
||||||
bsp = "[0, 0.5, 0.6, 1]";
|
bsp = "[0.0, 0.5, 0.6, 1]";
|
||||||
alias = "[0.6, 0.5, 0, 1]";
|
alias = "[0.6, 0.5, 0.0, 1]";
|
||||||
iqm = "[0.6, 0.5, 0, 1]";
|
iqm = "[0.6, 0.5, 0.0, 1]";
|
||||||
sprite = "[0.6, 0.5, 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 = {
|
color_dependency = {
|
||||||
src = {
|
src = {
|
||||||
|
@ -186,7 +189,9 @@ renderpasses = {
|
||||||
depth = {
|
depth = {
|
||||||
color = "[ 0.5, 0.5, 0.5, 1]";
|
color = "[ 0.5, 0.5, 0.5, 1]";
|
||||||
attachments = {
|
attachments = {
|
||||||
depth = depth_stencil_read_only_optimal;
|
depth = {
|
||||||
|
depth = depth_stencil_attachment_optimal;
|
||||||
|
};
|
||||||
preserve = (color, emission, normal, position, output);
|
preserve = (color, emission, normal, position, output);
|
||||||
};
|
};
|
||||||
pipelines = {
|
pipelines = {
|
||||||
|
@ -229,7 +234,9 @@ renderpasses = {
|
||||||
depth = $depth_dependency;
|
depth = $depth_dependency;
|
||||||
};
|
};
|
||||||
attachments = {
|
attachments = {
|
||||||
depth = depth_stencil_read_only_optimal;
|
depth = {
|
||||||
|
depth = depth_stencil_read_only_optimal;
|
||||||
|
};
|
||||||
preserve = (color, emission, normal, position, output);
|
preserve = (color, emission, normal, position, output);
|
||||||
};
|
};
|
||||||
pipelines = {
|
pipelines = {
|
||||||
|
@ -254,7 +261,7 @@ renderpasses = {
|
||||||
};
|
};
|
||||||
particles:trans = {
|
particles:trans = {
|
||||||
color = $color.particles;
|
color = $color.particles;
|
||||||
pipline = partdraw;
|
pipeline = partdraw;
|
||||||
tasks = (
|
tasks = (
|
||||||
{ func = particles_draw; },
|
{ func = particles_draw; },
|
||||||
);
|
);
|
||||||
|
@ -273,7 +280,9 @@ renderpasses = {
|
||||||
normal = color_attachment_optimal;
|
normal = color_attachment_optimal;
|
||||||
position = color_attachment_optimal;
|
position = color_attachment_optimal;
|
||||||
};
|
};
|
||||||
depth = depth_stencil_read_only_optimal;
|
depth = {
|
||||||
|
depth = depth_stencil_read_only_optimal;
|
||||||
|
};
|
||||||
preserve = (output);
|
preserve = (output);
|
||||||
};
|
};
|
||||||
pipelines = {
|
pipelines = {
|
||||||
|
|
|
@ -314,13 +314,20 @@ parse_labeledsingle (const plfield_t *field, const plitem_t *item,
|
||||||
// field->name, field->offset,
|
// field->name, field->offset,
|
||||||
// field->type, field->parser, field->data);
|
// 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))) {
|
if (!PL_CheckType (single->type, PL_Type (item))) {
|
||||||
PL_TypeMismatch (messages, item, field->name, single->type,
|
PL_TypeMismatch (messages, item, field->name, single->type,
|
||||||
PL_Type (item));
|
PL_Type (item));
|
||||||
return 0;
|
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);
|
void *value = vkparse_alloc (context, single->stride);
|
||||||
memset (value, 0, single->stride);
|
memset (value, 0, single->stride);
|
||||||
if (!single->parser (&f, item, value, messages, context)) {
|
if (!single->parser (&f, item, value, messages, context)) {
|
||||||
|
@ -469,6 +476,8 @@ vkstrdup (parsectx_t *context, const char *str)
|
||||||
return dup;
|
return dup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static parse_string_t parse_string_array = { 0 };
|
||||||
|
|
||||||
static int
|
static int
|
||||||
parse_string (const plfield_t *field, const plitem_t *item,
|
parse_string (const plfield_t *field, const plitem_t *item,
|
||||||
void *data, plitem_t *messages, void *context)
|
void *data, plitem_t *messages, void *context)
|
||||||
|
|
|
@ -459,7 +459,12 @@
|
||||||
value = depth;
|
value = depth;
|
||||||
};
|
};
|
||||||
preserve = {
|
preserve = {
|
||||||
type = (labeledarray, qfv_attachmentrefinfo_t, name);
|
type = (array, {
|
||||||
|
parse_type = QFString;
|
||||||
|
type = "char *";
|
||||||
|
parser = parse_string;
|
||||||
|
data = parse_string_array;
|
||||||
|
});
|
||||||
size = num_preserve;
|
size = num_preserve;
|
||||||
values = preserve;
|
values = preserve;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue