[vulkan] Use bare dictionaries for spec files

Every time I created a new file from scratch, I always forgot the
enclosing {}. Now I will probably include them by accident :P
This commit is contained in:
Bill Currie 2023-03-12 14:48:14 +09:00
parent 3cdcc2c62c
commit 45bcb31684
9 changed files with 2358 additions and 2374 deletions

View file

@ -1,5 +1,4 @@
{
samplers = {
samplers = {
linear = {
magFilter = linear;
minFilter = linear;
@ -17,8 +16,8 @@
borderColor = float_transparent_black;
unnormalizedCoordinates = false;
};
};
descriptorPools = {
};
descriptorPools = {
output_pool = {
flags = 0;
maxSets = "$frames.size * 2z";
@ -29,8 +28,8 @@
},
);
};
};
setLayouts = {
};
setLayouts = {
matrix_set = {
bindings = (
{
@ -51,8 +50,8 @@
},
);
};
};
pipelineLayouts = {
};
pipelineLayouts = {
output_layout = {
setLayouts = (matrix_set, output_set);
};
@ -76,9 +75,9 @@
}
);
};
};
};
depthStencil = {
depthStencil = {
disable = {
depthTestEnable = false;
depthWriteEnable = false;
@ -86,19 +85,19 @@
depthBoundsTestEnable = false;
stencilTestEnable = false;
};
};
};
inputAssembly = {
};
inputAssembly = {
};
vertexInput = {
vertexInput = {
index_only = {
bindings = ();
attributes = ();
};
};
};
rasterization = {
rasterization = {
cw_cull_back = {
depthClampEnable = false;
rasterizerDiscardEnable = false;
@ -117,17 +116,17 @@
depthBiasEnable = false;
lineWidth = 1;
};
};
};
multisample = {
multisample = {
rasterizationSamples = $msaaSamples;
sampleShadingEnable = false;
minSampleShading = 0.5f;
alphaToCoverageEnable = false;
alphaToOneEnable = false;
};
};
viewport = {
viewport = {
viewports = (
{
x = 0; y = 0;
@ -141,9 +140,9 @@
extent = { width = 640; height = 480; };
},
);
};
};
attachmentBlendOp = {
attachmentBlendOp = {
disabled = {
blendEnable = false;
srcColorBlendFactor = src_alpha;
@ -164,9 +163,9 @@
alphaBlendOp = add;
colorWriteMask = r|g|b|a;
};
};
};
fstriangle = {
fstriangle = {
vertexStage = {
stage = vertex;
name = main;
@ -189,9 +188,9 @@
logicOpEnable = false;
attachments = ($properties.attachmentBlendOp.disabled);
};
};
};
pipelines = {
pipelines = {
base = {
viewport = $properties.viewport;
rasterization = $properties.rasterization.counter_cw_cull_back;
@ -256,5 +255,4 @@
);
layout = fisheye_layout;
};
};
}
};

View file

@ -1,11 +1,10 @@
{
limits = {
limits = {
//FIXME this really needs to be an external variable as the C code
//needs to agree on the size, so it might as well set maxSamplers
//directly (and any other such variable)
maxSamplers = "min (256u, $physDevLimits.maxPerStageDescriptorSamplers)";
};
samplers = {
};
samplers = {
quakepic = {
magFilter = nearest;
minFilter = nearest;
@ -109,8 +108,8 @@
borderColor = float_transparent_black;
unnormalizedCoordinates = false;
};
};
descriptorPools = {
};
descriptorPools = {
matrix_pool = {
flags = 0;
maxSets = $frames.size;
@ -247,8 +246,8 @@
},
);
};
};
setLayouts = {
};
setLayouts = {
matrix_set = {
bindings = (
{
@ -431,8 +430,8 @@
},
);
};
};
pipelineLayouts = {
};
pipelineLayouts = {
quad_layout = {
setLayouts = (matrix_set, quad_data_set);
};
@ -523,9 +522,9 @@
},
);
};
};
};
depthStencil = {
depthStencil = {
test_and_write = {
depthTestEnable = true;
depthWriteEnable = true;
@ -547,9 +546,9 @@
depthBoundsTestEnable = false;
stencilTestEnable = false;
};
};
};
inputAssembly = {
inputAssembly = {
alias = {
topology = triangle_list;
primitiveRestartEnable = false;
@ -574,9 +573,9 @@
topology = point_list;
primitiveRestartEnable = false;
};
};
};
vertexInput = {
vertexInput = {
index_only = {
bindings = ();
attributes = ();
@ -671,9 +670,9 @@
{ location = 1; binding = 0; format = r8g8b8a8_unorm; offset = 8; },
);
};
};
};
rasterization = {
rasterization = {
cw_cull_back = {
depthClampEnable = false;
rasterizerDiscardEnable = false;
@ -692,17 +691,17 @@
depthBiasEnable = false;
lineWidth = 1;
};
};
};
multisample = {
multisample = {
rasterizationSamples = $msaaSamples;
sampleShadingEnable = false;
minSampleShading = 0.5f;
alphaToCoverageEnable = false;
alphaToOneEnable = false;
};
};
viewport = {
viewport = {
viewports = (
{
x = 0; y = 0;
@ -716,9 +715,9 @@
extent = { width = 640; height = 480; };
},
);
};
};
attachmentBlendOp = {
attachmentBlendOp = {
disabled = {
blendEnable = false;
srcColorBlendFactor = src_alpha;
@ -739,9 +738,9 @@
alphaBlendOp = add;
colorWriteMask = r|g|b|a;
};
};
};
fstriangle = {
fstriangle = {
vertexStage = {
stage = vertex;
name = main;
@ -759,9 +758,9 @@
logicOpEnable = false;
attachments = ($properties.attachmentBlendOp.disabled);
};
};
};
pipelines = {
pipelines = {
base = {
viewport = $properties.viewport;
rasterization = $properties.rasterization.counter_cw_cull_back;
@ -1209,5 +1208,4 @@
};
layout = partupdate_layout;
};
};
}
};

View file

@ -1,5 +1,4 @@
{
flat_color_image_template = {
flat_color_image_template = {
imageType = `2d;
samples = 1;
extent = {
@ -12,8 +11,8 @@
tiling = optimal;
usage = color_attachment|input_attachment|transient_attachment;
initialLayout = undefined;
};
images = {
};
images = {
depth = {
@inherit = $properties.flat_color_image_template;
format = x8_d24_unorm_pack32;
@ -39,8 +38,8 @@
@inherit = $properties.flat_color_image_template;
format = r16g16b16a16_sfloat;
};
};
flat_color_view_template = {
};
flat_color_view_template = {
viewType = `2d_array;
components = {
r = identity;
@ -53,8 +52,8 @@
levelCount = 1;
layerCount = 6;
};
};
imageViews = {
};
imageViews = {
depth = {
@inherit = $properties.flat_color_view_template;
image = depth;
@ -93,8 +92,8 @@
image = $output.image;
format = $output.format;
};
};
output = {
};
output = {
image = {
@inherit = $properties.flat_color_image_template;
flags = cube_compatible;
@ -109,16 +108,16 @@
};
format = r16g16b16a16_sfloat;
finalLayout = shader_read_only_optimal;
};
framebuffer = {
};
framebuffer = {
renderPass = defcube;
attachments = (depth, color, emission, normal, position, opaque,
$properties.imageViews.aview);
width = $output.extent.width;
height = $output.extent.height;
layers = 1;
};
clearValues = (
};
clearValues = (
{ depthStencil = { depth = 1; stencil = 0; }; },
{ color = "[0, 0, 0, 1]"; }, // color
{ color = "[0, 0, 0, 1]"; }, // emission
@ -126,8 +125,8 @@
{ color = "[0, 0, 0, 1]"; }, // position
{ color = "[0, 0, 0, 1]"; }, // opaque
{ color = "[0, 0, 0, 1]"; }, // output
);
attachment_template = {
);
attachment_template = {
samples = 1;
loadOp = dont_care;
storeOp = store;
@ -135,8 +134,8 @@
stencilStoreOp = dont_care;
initialLayout = undefined;
finalLayout = color_attachment_optimal;
};
info = {
};
info = {
color = "[0, 1, 0, 1]";
subpass_info = (
{ name = depth; color = "[ 0.5, 0.5, 0.5, 1]" },
@ -145,8 +144,8 @@
{ name = lighting; color = "[ 0.8, 0.8, 0.8, 1]" },
{ name = compose; color = "[ 0.7, 0.3, 0.3, 1]" },
);
};
renderpass = {
};
renderpass = {
attachments = (
{
@inherit = $properties.attachment_template;
@ -326,5 +325,4 @@
viewMasks = (0x3fu, 0x3fu, 0x3fu, 0x3fu, 0x3fu);
viewOffsets = ( 0, 0, 0, 0, 0);
});
};
}
};

View file

@ -1,5 +1,4 @@
{
flat_color_image_template = {
flat_color_image_template = {
imageType = `2d;
samples = 1;
extent = {
@ -12,8 +11,8 @@
tiling = optimal;
usage = color_attachment|input_attachment|transient_attachment;
initialLayout = undefined;
};
images = {
};
images = {
depth = {
@inherit = $properties.flat_color_image_template;
format = x8_d24_unorm_pack32;
@ -39,8 +38,8 @@
@inherit = $properties.flat_color_image_template;
format = r16g16b16a16_sfloat;
};
};
flat_color_view_template = {
};
flat_color_view_template = {
viewType = VK_IMAGE_VIEW_TYPE_2D;
components = {
r = identity;
@ -53,8 +52,8 @@
levelCount = 1;
layerCount = 1;
};
};
imageViews = {
};
imageViews = {
depth = {
@inherit = $properties.flat_color_view_template;
image = depth;
@ -88,8 +87,8 @@
image = opaque;
format = $properties.images.opaque.format;
};
};
output = {
};
output = {
image = {
@inherit = $properties.flat_color_image_template;
usage = color_attachment|input_attachment|sampled;
@ -102,16 +101,16 @@
};
format = r16g16b16a16_sfloat;
finalLayout = shader_read_only_optimal;
};
framebuffer = {
};
framebuffer = {
renderPass = deferred;
attachments = (depth, color, emission, normal, position, opaque,
$output.view);
width = $output.extent.width;
height = $output.extent.height;
layers = 1;
};
clearValues = (
};
clearValues = (
{ depthStencil = { depth = 1; stencil = 0; }; },
{ color = "[0, 0, 0, 1]"; }, // color
{ color = "[0, 0, 0, 1]"; }, // emission
@ -119,8 +118,8 @@
{ color = "[0, 0, 0, 1]"; }, // position
{ color = "[0, 0, 0, 1]"; }, // opaque
{ color = "[0, 0, 0, 1]"; }, // output
);
attachment_template = {
);
attachment_template = {
samples = 1;
loadOp = dont_care;
storeOp = dont_care;
@ -128,8 +127,8 @@
stencilStoreOp = dont_care;
initialLayout = undefined;
finalLayout = color_attachment_optimal;
};
info = {
};
info = {
color = "[0, 1, 0, 1]";
subpass_info = (
{ name = depth; color = "[ 0.5, 0.5, 0.5, 1]" },
@ -138,8 +137,8 @@
{ name = lighting; color = "[ 0.8, 0.8, 0.8, 1]" },
{ name = compose; color = "[ 0.7, 0.3, 0.3, 1]" },
);
};
renderpass = {
};
renderpass = {
attachments = (
{
@inherit = $properties.attachment_template;
@ -315,5 +314,4 @@
dependencyFlags = by_region;
},
);
};
}
};

View file

@ -1,5 +1,4 @@
{
flat_color_image_template = {
flat_color_image_template = {
imageType = `2d;
samples = $msaaSamples;
extent = {
@ -11,8 +10,8 @@
arrayLayers = 1;
tiling = optimal;
usage = color_attachment|transient_attachment;
};
images = {
};
images = {
depth = {
@inherit = @properties.flat_color_image_template;
format = x8_d24_unorm_pack32;
@ -22,8 +21,8 @@
@inherit = @properties.flat_color_image_template;
format = $output.format;
};
};
flat_color_view_template = {
};
flat_color_view_template = {
viewType = `2d;
components = {
r = identity;
@ -36,8 +35,8 @@
levelCount = 1;
layerCount = 1;
};
};
imageViews = {
};
imageViews = {
depth = {
@inherit = $properties.flat_color_view_template;
image = depth;
@ -51,22 +50,22 @@
image = color;
format = $properties.images.color.format;
};
};
framebuffer = {
};
framebuffer = {
renderPass = $properties.renderpass;
attachment = ($output.view, depth);
width = $output.extent.width;
height = $output.extent.height;
layers = 1;
};
framebuffer_msaa = {
};
framebuffer_msaa = {
renderPass = $properties.renderpass_msaa;
attachment = ($output.view, depth, color);
width = $output.extent.width;
height = $output.extent.height;
layers = 1;
};
attachment_template = {
};
attachment_template = {
samples = 1;
loadOp = dont_care;
storeOp = dont_care;
@ -74,8 +73,8 @@
stencilStoreOp = dont_care;
initialLayout = undefined;
finalLayout = color_attachment_optimal;
};
renderpass = {
};
renderpass = {
attachments = (
{
@inherit = $properties.attachment_template;
@ -127,8 +126,8 @@
dependencyFlags = by_region;
},
);
};
renderpass_msaa = {
};
renderpass_msaa = {
attachments = (
{
@inherit = $properties.attachment_template;
@ -195,5 +194,4 @@
dependencyFlags = by_region;
},
);
};
}
};

View file

@ -1,4 +1,3 @@
{
properties = {
color = {
bsp = "[0.0, 0.5, 0.6, 1]";
@ -1161,4 +1160,3 @@ renderpasses = {
});
};
};
};

View file

@ -1,15 +1,14 @@
{
framebuffer = {
framebuffer = {
renderPass = output;
attachments = ($output.view);
width = $output.extent.width;
height = $output.extent.height;
layers = 1;
};
clearValues = (
};
clearValues = (
{ color = "[0, 0, 0, 1]"; }, // output
);
attachment_template = {
);
attachment_template = {
samples = 1;
loadOp = dont_care;
storeOp = dont_care;
@ -17,14 +16,14 @@
stencilStoreOp = dont_care;
initialLayout = undefined;
finalLayout = color_attachment_optimal;
};
info = {
};
info = {
color = "[0.9, 0.9, 0.9, 1]";
subpass_info = (
{ name = compose; color = "[ 0.9, 0.9, 0.9, 1]" },
);
};
renderpass = {
};
renderpass = {
attachments = (
{
@inherit = $properties.attachment_template;
@ -45,5 +44,4 @@
);
},
);
};
}
};

View file

@ -1,14 +1,13 @@
{
clearValues = (
clearValues = (
{ depthStencil = { depth = 1; stencil = 0; }; },
);
info = {
);
info = {
color = "[0.2, 0.2, 0.2, 1]";
subpass_info = (
{ name = depth; color = "[ 0.5, 0.5, 0.5, 1]" },
);
};
renderpass_base = {
};
renderpass_base = {
attachments = (
{
format = $output.format;
@ -30,23 +29,22 @@
};
}
);
};
renderpass_6 = {
};
renderpass_6 = {
@inherit = $properties.renderpass_base;
@next = (VkRenderPassMultiviewCreateInfo, {
viewMasks = (0x0000003fu);
});
};
renderpass_4 = {
};
renderpass_4 = {
@inherit = $properties.renderpass_base;
@next = (VkRenderPassMultiviewCreateInfo, {
viewMasks = (0x0000000fu);
});
};
renderpass_1 = {
};
renderpass_1 = {
@inherit = $properties.renderpass_base;
@next = (VkRenderPassMultiviewCreateInfo, {
viewMasks = (0x00000001u);
});
};
}
};

View file

@ -1960,7 +1960,7 @@ build_configs (scriptctx_t *sctx)
builtin_plists = malloc (num_plists * sizeof (plitem_t *));
num_plists = 0;
for (exprsym_t *sym = builtin_plist_syms; sym->name; sym++) {
plitem_t *item = PL_GetPropertyList (sym->value, &sctx->hashctx);
plitem_t *item = PL_GetDictionary (sym->value, &sctx->hashctx);
if (!item) {
// Syntax errors in the compiled-in plists are unrecoverable
Sys_Error ("Error parsing plist for %s", sym->name);