mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-22 20:41:20 +00:00
[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:
parent
3cdcc2c62c
commit
45bcb31684
9 changed files with 2358 additions and 2374 deletions
|
@ -1,260 +1,258 @@
|
|||
{
|
||||
samplers = {
|
||||
linear = {
|
||||
magFilter = linear;
|
||||
minFilter = linear;
|
||||
mipmapMode = linear;
|
||||
addressModeU = clamp_to_edge;
|
||||
addressModeV = clamp_to_edge;
|
||||
addressModeW = clamp_to_edge;
|
||||
mipLodBias = 0;
|
||||
anisotropyEnable = false;
|
||||
maxAnisotropy = 0;
|
||||
compareEnable = false;
|
||||
compareOp = always;
|
||||
minLod = 0;
|
||||
maxLod = 0;
|
||||
borderColor = float_transparent_black;
|
||||
unnormalizedCoordinates = false;
|
||||
};
|
||||
samplers = {
|
||||
linear = {
|
||||
magFilter = linear;
|
||||
minFilter = linear;
|
||||
mipmapMode = linear;
|
||||
addressModeU = clamp_to_edge;
|
||||
addressModeV = clamp_to_edge;
|
||||
addressModeW = clamp_to_edge;
|
||||
mipLodBias = 0;
|
||||
anisotropyEnable = false;
|
||||
maxAnisotropy = 0;
|
||||
compareEnable = false;
|
||||
compareOp = always;
|
||||
minLod = 0;
|
||||
maxLod = 0;
|
||||
borderColor = float_transparent_black;
|
||||
unnormalizedCoordinates = false;
|
||||
};
|
||||
descriptorPools = {
|
||||
output_pool = {
|
||||
flags = 0;
|
||||
maxSets = "$frames.size * 2z";
|
||||
bindings = (
|
||||
{
|
||||
type = combined_image_sampler;
|
||||
descriptorCount = "$frames.size * 2z";
|
||||
},
|
||||
);
|
||||
};
|
||||
};
|
||||
setLayouts = {
|
||||
matrix_set = {
|
||||
bindings = (
|
||||
{
|
||||
binding = 0;
|
||||
descriptorType = uniform_buffer;
|
||||
descriptorCount = 1;
|
||||
stageFlags = vertex|geometry|fragment;
|
||||
},
|
||||
);
|
||||
};
|
||||
output_set = {
|
||||
bindings = (
|
||||
{
|
||||
binding = 0;
|
||||
descriptorType = combined_image_sampler;
|
||||
descriptorCount = 1;
|
||||
stageFlags = fragment;
|
||||
},
|
||||
);
|
||||
};
|
||||
};
|
||||
pipelineLayouts = {
|
||||
output_layout = {
|
||||
setLayouts = (matrix_set, output_set);
|
||||
};
|
||||
waterwarp_layout = {
|
||||
@inherit = $properties.pipelineLayouts.output_layout;
|
||||
pushConstantRanges = (
|
||||
{
|
||||
stageFlags = fragment;
|
||||
offset = 0;
|
||||
size = "4";
|
||||
}
|
||||
);
|
||||
};
|
||||
fisheye_layout = {
|
||||
@inherit = $properties.pipelineLayouts.output_layout;
|
||||
pushConstantRanges = (
|
||||
{
|
||||
stageFlags = fragment;
|
||||
offset = 0;
|
||||
size = "2 * 4";
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
depthStencil = {
|
||||
disable = {
|
||||
depthTestEnable = false;
|
||||
depthWriteEnable = false;
|
||||
depthCompareOp = less_or_equal;
|
||||
depthBoundsTestEnable = false;
|
||||
stencilTestEnable = false;
|
||||
};
|
||||
};
|
||||
|
||||
inputAssembly = {
|
||||
};
|
||||
|
||||
vertexInput = {
|
||||
index_only = {
|
||||
bindings = ();
|
||||
attributes = ();
|
||||
};
|
||||
};
|
||||
|
||||
rasterization = {
|
||||
cw_cull_back = {
|
||||
depthClampEnable = false;
|
||||
rasterizerDiscardEnable = false;
|
||||
polygonMode = fill;
|
||||
cullMode = back;
|
||||
frontFace = clockwise;
|
||||
depthBiasEnable = false;
|
||||
lineWidth = 1;
|
||||
};
|
||||
counter_cw_cull_back = {
|
||||
depthClampEnable = false;
|
||||
rasterizerDiscardEnable = false;
|
||||
polygonMode = fill;
|
||||
cullMode = back;
|
||||
frontFace = counter_clockwise;
|
||||
depthBiasEnable = false;
|
||||
lineWidth = 1;
|
||||
};
|
||||
};
|
||||
|
||||
multisample = {
|
||||
rasterizationSamples = $msaaSamples;
|
||||
sampleShadingEnable = false;
|
||||
minSampleShading = 0.5f;
|
||||
alphaToCoverageEnable = false;
|
||||
alphaToOneEnable = false;
|
||||
};
|
||||
|
||||
viewport = {
|
||||
viewports = (
|
||||
};
|
||||
descriptorPools = {
|
||||
output_pool = {
|
||||
flags = 0;
|
||||
maxSets = "$frames.size * 2z";
|
||||
bindings = (
|
||||
{
|
||||
x = 0; y = 0;
|
||||
width = 640; height = 480;
|
||||
minDepth = 0; maxDepth = 1;
|
||||
}
|
||||
);
|
||||
scissors = (
|
||||
{
|
||||
offset = { x = 0; y = 0 };
|
||||
extent = { width = 640; height = 480; };
|
||||
type = combined_image_sampler;
|
||||
descriptorCount = "$frames.size * 2z";
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
attachmentBlendOp = {
|
||||
disabled = {
|
||||
blendEnable = false;
|
||||
srcColorBlendFactor = src_alpha;
|
||||
dstColorBlendFactor = one_minus_src_alpha;
|
||||
colorBlendOp = add;
|
||||
srcAlphaBlendFactor = src_alpha;
|
||||
dstAlphaBlendFactor = one_minus_src_alpha;
|
||||
alphaBlendOp = add;
|
||||
colorWriteMask = r|g|b|a;
|
||||
};
|
||||
alpha_blend = {
|
||||
blendEnable = true;
|
||||
srcColorBlendFactor = one;
|
||||
dstColorBlendFactor = one_minus_src_alpha;
|
||||
colorBlendOp = add;
|
||||
srcAlphaBlendFactor = one;
|
||||
dstAlphaBlendFactor = one_minus_src_alpha;
|
||||
alphaBlendOp = add;
|
||||
colorWriteMask = r|g|b|a;
|
||||
};
|
||||
};
|
||||
setLayouts = {
|
||||
matrix_set = {
|
||||
bindings = (
|
||||
{
|
||||
binding = 0;
|
||||
descriptorType = uniform_buffer;
|
||||
descriptorCount = 1;
|
||||
stageFlags = vertex|geometry|fragment;
|
||||
},
|
||||
);
|
||||
};
|
||||
output_set = {
|
||||
bindings = (
|
||||
{
|
||||
binding = 0;
|
||||
descriptorType = combined_image_sampler;
|
||||
descriptorCount = 1;
|
||||
stageFlags = fragment;
|
||||
},
|
||||
);
|
||||
};
|
||||
};
|
||||
pipelineLayouts = {
|
||||
output_layout = {
|
||||
setLayouts = (matrix_set, output_set);
|
||||
};
|
||||
waterwarp_layout = {
|
||||
@inherit = $properties.pipelineLayouts.output_layout;
|
||||
pushConstantRanges = (
|
||||
{
|
||||
stageFlags = fragment;
|
||||
offset = 0;
|
||||
size = "4";
|
||||
}
|
||||
);
|
||||
};
|
||||
fisheye_layout = {
|
||||
@inherit = $properties.pipelineLayouts.output_layout;
|
||||
pushConstantRanges = (
|
||||
{
|
||||
stageFlags = fragment;
|
||||
offset = 0;
|
||||
size = "2 * 4";
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
fstriangle = {
|
||||
vertexStage = {
|
||||
stage = vertex;
|
||||
name = main;
|
||||
module = $builtin/fstriangle.vert;
|
||||
};
|
||||
vertexStageST = {
|
||||
stage = vertex;
|
||||
name = main;
|
||||
module = $builtin/fstrianglest.vert;
|
||||
};
|
||||
vertexInput = {
|
||||
bindings = ();
|
||||
attributes = ();
|
||||
};
|
||||
inputAssembly = {
|
||||
topology = triangle_list;
|
||||
primitiveRestartEnable = false;
|
||||
};
|
||||
depthStencil = {
|
||||
disable = {
|
||||
depthTestEnable = false;
|
||||
depthWriteEnable = false;
|
||||
depthCompareOp = less_or_equal;
|
||||
depthBoundsTestEnable = false;
|
||||
stencilTestEnable = false;
|
||||
};
|
||||
};
|
||||
|
||||
inputAssembly = {
|
||||
};
|
||||
|
||||
vertexInput = {
|
||||
index_only = {
|
||||
bindings = ();
|
||||
attributes = ();
|
||||
};
|
||||
};
|
||||
|
||||
rasterization = {
|
||||
cw_cull_back = {
|
||||
depthClampEnable = false;
|
||||
rasterizerDiscardEnable = false;
|
||||
polygonMode = fill;
|
||||
cullMode = back;
|
||||
frontFace = clockwise;
|
||||
depthBiasEnable = false;
|
||||
lineWidth = 1;
|
||||
};
|
||||
counter_cw_cull_back = {
|
||||
depthClampEnable = false;
|
||||
rasterizerDiscardEnable = false;
|
||||
polygonMode = fill;
|
||||
cullMode = back;
|
||||
frontFace = counter_clockwise;
|
||||
depthBiasEnable = false;
|
||||
lineWidth = 1;
|
||||
};
|
||||
};
|
||||
|
||||
multisample = {
|
||||
rasterizationSamples = $msaaSamples;
|
||||
sampleShadingEnable = false;
|
||||
minSampleShading = 0.5f;
|
||||
alphaToCoverageEnable = false;
|
||||
alphaToOneEnable = false;
|
||||
};
|
||||
|
||||
viewport = {
|
||||
viewports = (
|
||||
{
|
||||
x = 0; y = 0;
|
||||
width = 640; height = 480;
|
||||
minDepth = 0; maxDepth = 1;
|
||||
}
|
||||
);
|
||||
scissors = (
|
||||
{
|
||||
offset = { x = 0; y = 0 };
|
||||
extent = { width = 640; height = 480; };
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
attachmentBlendOp = {
|
||||
disabled = {
|
||||
blendEnable = false;
|
||||
srcColorBlendFactor = src_alpha;
|
||||
dstColorBlendFactor = one_minus_src_alpha;
|
||||
colorBlendOp = add;
|
||||
srcAlphaBlendFactor = src_alpha;
|
||||
dstAlphaBlendFactor = one_minus_src_alpha;
|
||||
alphaBlendOp = add;
|
||||
colorWriteMask = r|g|b|a;
|
||||
};
|
||||
alpha_blend = {
|
||||
blendEnable = true;
|
||||
srcColorBlendFactor = one;
|
||||
dstColorBlendFactor = one_minus_src_alpha;
|
||||
colorBlendOp = add;
|
||||
srcAlphaBlendFactor = one;
|
||||
dstAlphaBlendFactor = one_minus_src_alpha;
|
||||
alphaBlendOp = add;
|
||||
colorWriteMask = r|g|b|a;
|
||||
};
|
||||
};
|
||||
|
||||
fstriangle = {
|
||||
vertexStage = {
|
||||
stage = vertex;
|
||||
name = main;
|
||||
module = $builtin/fstriangle.vert;
|
||||
};
|
||||
vertexStageST = {
|
||||
stage = vertex;
|
||||
name = main;
|
||||
module = $builtin/fstrianglest.vert;
|
||||
};
|
||||
vertexInput = {
|
||||
bindings = ();
|
||||
attributes = ();
|
||||
};
|
||||
inputAssembly = {
|
||||
topology = triangle_list;
|
||||
primitiveRestartEnable = false;
|
||||
};
|
||||
colorBlend = {
|
||||
logicOpEnable = false;
|
||||
attachments = ($properties.attachmentBlendOp.disabled);
|
||||
};
|
||||
};
|
||||
|
||||
pipelines = {
|
||||
base = {
|
||||
viewport = $properties.viewport;
|
||||
rasterization = $properties.rasterization.counter_cw_cull_back;
|
||||
multisample = $properties.multisample;
|
||||
depthStencil = $properties.depthStencil.disable;
|
||||
colorBlend = {
|
||||
logicOpEnable = false;
|
||||
attachments = ($properties.attachmentBlendOp.disabled);
|
||||
attachments = (
|
||||
$properties.attachmentBlendOp.disabled,
|
||||
$properties.attachmentBlendOp.disabled,
|
||||
$properties.attachmentBlendOp.disabled,
|
||||
$properties.attachmentBlendOp.disabled,
|
||||
);
|
||||
};
|
||||
dynamic = {
|
||||
dynamicState = ( viewport, scissor );
|
||||
};
|
||||
renderPass = output;
|
||||
};
|
||||
|
||||
pipelines = {
|
||||
base = {
|
||||
viewport = $properties.viewport;
|
||||
rasterization = $properties.rasterization.counter_cw_cull_back;
|
||||
multisample = $properties.multisample;
|
||||
depthStencil = $properties.depthStencil.disable;
|
||||
colorBlend = {
|
||||
logicOpEnable = false;
|
||||
attachments = (
|
||||
$properties.attachmentBlendOp.disabled,
|
||||
$properties.attachmentBlendOp.disabled,
|
||||
$properties.attachmentBlendOp.disabled,
|
||||
$properties.attachmentBlendOp.disabled,
|
||||
);
|
||||
};
|
||||
dynamic = {
|
||||
dynamicState = ( viewport, scissor );
|
||||
};
|
||||
renderPass = output;
|
||||
};
|
||||
output_base = {
|
||||
@inherit = $properties.pipelines.base;
|
||||
vertexInput = $properties.fstriangle.vertexInput;
|
||||
inputAssembly = $properties.fstriangle.inputAssembly;
|
||||
colorBlend = $properties.fstriangle.colorBlend;
|
||||
};
|
||||
output = {
|
||||
@inherit = $properties.pipelines.output_base;
|
||||
subpass = 0;
|
||||
stages = (
|
||||
$properties.fstriangle.vertexStage,
|
||||
{
|
||||
stage = fragment;
|
||||
name = main;
|
||||
module = $builtin/output.frag;
|
||||
},
|
||||
);
|
||||
layout = output_layout;
|
||||
};
|
||||
waterwarp = {
|
||||
@inherit = $properties.pipelines.output_base;
|
||||
subpass = 0;
|
||||
stages = (
|
||||
$properties.fstriangle.vertexStageST,
|
||||
{
|
||||
stage = fragment;
|
||||
name = main;
|
||||
module = $builtin/waterwarp.frag;
|
||||
},
|
||||
);
|
||||
layout = waterwarp_layout;
|
||||
};
|
||||
fisheye = {
|
||||
@inherit = $properties.pipelines.output_base;
|
||||
subpass = 0;
|
||||
stages = (
|
||||
$properties.fstriangle.vertexStageST,
|
||||
{
|
||||
stage = fragment;
|
||||
name = main;
|
||||
module = $builtin/fisheye.frag;
|
||||
},
|
||||
);
|
||||
layout = fisheye_layout;
|
||||
};
|
||||
output_base = {
|
||||
@inherit = $properties.pipelines.base;
|
||||
vertexInput = $properties.fstriangle.vertexInput;
|
||||
inputAssembly = $properties.fstriangle.inputAssembly;
|
||||
colorBlend = $properties.fstriangle.colorBlend;
|
||||
};
|
||||
}
|
||||
output = {
|
||||
@inherit = $properties.pipelines.output_base;
|
||||
subpass = 0;
|
||||
stages = (
|
||||
$properties.fstriangle.vertexStage,
|
||||
{
|
||||
stage = fragment;
|
||||
name = main;
|
||||
module = $builtin/output.frag;
|
||||
},
|
||||
);
|
||||
layout = output_layout;
|
||||
};
|
||||
waterwarp = {
|
||||
@inherit = $properties.pipelines.output_base;
|
||||
subpass = 0;
|
||||
stages = (
|
||||
$properties.fstriangle.vertexStageST,
|
||||
{
|
||||
stage = fragment;
|
||||
name = main;
|
||||
module = $builtin/waterwarp.frag;
|
||||
},
|
||||
);
|
||||
layout = waterwarp_layout;
|
||||
};
|
||||
fisheye = {
|
||||
@inherit = $properties.pipelines.output_base;
|
||||
subpass = 0;
|
||||
stages = (
|
||||
$properties.fstriangle.vertexStageST,
|
||||
{
|
||||
stage = fragment;
|
||||
name = main;
|
||||
module = $builtin/fisheye.frag;
|
||||
},
|
||||
);
|
||||
layout = fisheye_layout;
|
||||
};
|
||||
};
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,330 +1,328 @@
|
|||
{
|
||||
flat_color_image_template = {
|
||||
imageType = `2d;
|
||||
samples = 1;
|
||||
extent = {
|
||||
width = $output.extent.width;
|
||||
height = $output.extent.height;
|
||||
depth = 1;
|
||||
};
|
||||
mipLevels = 1;
|
||||
arrayLayers = 6;
|
||||
tiling = optimal;
|
||||
usage = color_attachment|input_attachment|transient_attachment;
|
||||
initialLayout = undefined;
|
||||
};
|
||||
images = {
|
||||
depth = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
format = x8_d24_unorm_pack32;
|
||||
usage = depth_stencil_attachment|input_attachment|transient_attachment;
|
||||
};
|
||||
color = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
format = r8g8b8a8_unorm;
|
||||
};
|
||||
emission = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
format = r16g16b16a16_sfloat;
|
||||
};
|
||||
normal = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
format = r16g16b16a16_sfloat;
|
||||
};
|
||||
position = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
format = r32g32b32a32_sfloat;
|
||||
};
|
||||
opaque = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
format = r16g16b16a16_sfloat;
|
||||
};
|
||||
};
|
||||
flat_color_view_template = {
|
||||
viewType = `2d_array;
|
||||
components = {
|
||||
r = identity;
|
||||
g = identity;
|
||||
b = identity;
|
||||
a = identity;
|
||||
};
|
||||
subresourceRange = {
|
||||
aspectMask = color;
|
||||
levelCount = 1;
|
||||
layerCount = 6;
|
||||
};
|
||||
};
|
||||
imageViews = {
|
||||
depth = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = depth;
|
||||
format = $properties.images.depth.format;
|
||||
subresourceRange = {
|
||||
aspectMask = depth;
|
||||
};
|
||||
};
|
||||
color = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = color;
|
||||
format = $properties.images.color.format;
|
||||
};
|
||||
emission = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = emission;
|
||||
format = $properties.images.emission.format;
|
||||
};
|
||||
normal = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = normal;
|
||||
format = $properties.images.normal.format;
|
||||
};
|
||||
position = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = position;
|
||||
format = $properties.images.position.format;
|
||||
};
|
||||
opaque = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = opaque;
|
||||
format = $properties.images.opaque.format;
|
||||
};
|
||||
aview = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = $output.image;
|
||||
format = $output.format;
|
||||
};
|
||||
};
|
||||
output = {
|
||||
image = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
flags = cube_compatible;
|
||||
usage = color_attachment|input_attachment|sampled;
|
||||
format = $output.format;
|
||||
};
|
||||
view = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
viewType = cube;
|
||||
image = $output.image;
|
||||
format = $output.format;
|
||||
};
|
||||
format = r16g16b16a16_sfloat;
|
||||
finalLayout = shader_read_only_optimal;
|
||||
};
|
||||
framebuffer = {
|
||||
renderPass = defcube;
|
||||
attachments = (depth, color, emission, normal, position, opaque,
|
||||
$properties.imageViews.aview);
|
||||
flat_color_image_template = {
|
||||
imageType = `2d;
|
||||
samples = 1;
|
||||
extent = {
|
||||
width = $output.extent.width;
|
||||
height = $output.extent.height;
|
||||
layers = 1;
|
||||
depth = 1;
|
||||
};
|
||||
clearValues = (
|
||||
{ depthStencil = { depth = 1; stencil = 0; }; },
|
||||
{ color = "[0, 0, 0, 1]"; }, // color
|
||||
{ color = "[0, 0, 0, 1]"; }, // emission
|
||||
{ color = "[0, 0, 0, 1]"; }, // normal
|
||||
{ color = "[0, 0, 0, 1]"; }, // position
|
||||
{ color = "[0, 0, 0, 1]"; }, // opaque
|
||||
{ color = "[0, 0, 0, 1]"; }, // output
|
||||
mipLevels = 1;
|
||||
arrayLayers = 6;
|
||||
tiling = optimal;
|
||||
usage = color_attachment|input_attachment|transient_attachment;
|
||||
initialLayout = undefined;
|
||||
};
|
||||
images = {
|
||||
depth = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
format = x8_d24_unorm_pack32;
|
||||
usage = depth_stencil_attachment|input_attachment|transient_attachment;
|
||||
};
|
||||
color = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
format = r8g8b8a8_unorm;
|
||||
};
|
||||
emission = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
format = r16g16b16a16_sfloat;
|
||||
};
|
||||
normal = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
format = r16g16b16a16_sfloat;
|
||||
};
|
||||
position = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
format = r32g32b32a32_sfloat;
|
||||
};
|
||||
opaque = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
format = r16g16b16a16_sfloat;
|
||||
};
|
||||
};
|
||||
flat_color_view_template = {
|
||||
viewType = `2d_array;
|
||||
components = {
|
||||
r = identity;
|
||||
g = identity;
|
||||
b = identity;
|
||||
a = identity;
|
||||
};
|
||||
subresourceRange = {
|
||||
aspectMask = color;
|
||||
levelCount = 1;
|
||||
layerCount = 6;
|
||||
};
|
||||
};
|
||||
imageViews = {
|
||||
depth = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = depth;
|
||||
format = $properties.images.depth.format;
|
||||
subresourceRange = {
|
||||
aspectMask = depth;
|
||||
};
|
||||
};
|
||||
color = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = color;
|
||||
format = $properties.images.color.format;
|
||||
};
|
||||
emission = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = emission;
|
||||
format = $properties.images.emission.format;
|
||||
};
|
||||
normal = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = normal;
|
||||
format = $properties.images.normal.format;
|
||||
};
|
||||
position = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = position;
|
||||
format = $properties.images.position.format;
|
||||
};
|
||||
opaque = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = opaque;
|
||||
format = $properties.images.opaque.format;
|
||||
};
|
||||
aview = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = $output.image;
|
||||
format = $output.format;
|
||||
};
|
||||
};
|
||||
output = {
|
||||
image = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
flags = cube_compatible;
|
||||
usage = color_attachment|input_attachment|sampled;
|
||||
format = $output.format;
|
||||
};
|
||||
view = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
viewType = cube;
|
||||
image = $output.image;
|
||||
format = $output.format;
|
||||
};
|
||||
format = r16g16b16a16_sfloat;
|
||||
finalLayout = shader_read_only_optimal;
|
||||
};
|
||||
framebuffer = {
|
||||
renderPass = defcube;
|
||||
attachments = (depth, color, emission, normal, position, opaque,
|
||||
$properties.imageViews.aview);
|
||||
width = $output.extent.width;
|
||||
height = $output.extent.height;
|
||||
layers = 1;
|
||||
};
|
||||
clearValues = (
|
||||
{ depthStencil = { depth = 1; stencil = 0; }; },
|
||||
{ color = "[0, 0, 0, 1]"; }, // color
|
||||
{ color = "[0, 0, 0, 1]"; }, // emission
|
||||
{ color = "[0, 0, 0, 1]"; }, // normal
|
||||
{ color = "[0, 0, 0, 1]"; }, // position
|
||||
{ color = "[0, 0, 0, 1]"; }, // opaque
|
||||
{ color = "[0, 0, 0, 1]"; }, // output
|
||||
);
|
||||
attachment_template = {
|
||||
samples = 1;
|
||||
loadOp = dont_care;
|
||||
storeOp = store;
|
||||
stencilLoadOp = dont_care;
|
||||
stencilStoreOp = dont_care;
|
||||
initialLayout = undefined;
|
||||
finalLayout = color_attachment_optimal;
|
||||
};
|
||||
info = {
|
||||
color = "[0, 1, 0, 1]";
|
||||
subpass_info = (
|
||||
{ name = depth; color = "[ 0.5, 0.5, 0.5, 1]" },
|
||||
{ name = translucent; color = "[ 0.25, 0.25, 0.6, 1]" },
|
||||
{ name = g-buffef; color = "[ 0.3, 0.7, 0.3, 1]" },
|
||||
{ name = lighting; color = "[ 0.8, 0.8, 0.8, 1]" },
|
||||
{ name = compose; color = "[ 0.7, 0.3, 0.3, 1]" },
|
||||
);
|
||||
attachment_template = {
|
||||
samples = 1;
|
||||
loadOp = dont_care;
|
||||
storeOp = store;
|
||||
stencilLoadOp = dont_care;
|
||||
stencilStoreOp = dont_care;
|
||||
initialLayout = undefined;
|
||||
finalLayout = color_attachment_optimal;
|
||||
};
|
||||
info = {
|
||||
color = "[0, 1, 0, 1]";
|
||||
subpass_info = (
|
||||
{ name = depth; color = "[ 0.5, 0.5, 0.5, 1]" },
|
||||
{ name = translucent; color = "[ 0.25, 0.25, 0.6, 1]" },
|
||||
{ name = g-buffef; color = "[ 0.3, 0.7, 0.3, 1]" },
|
||||
{ name = lighting; color = "[ 0.8, 0.8, 0.8, 1]" },
|
||||
{ name = compose; color = "[ 0.7, 0.3, 0.3, 1]" },
|
||||
);
|
||||
};
|
||||
renderpass = {
|
||||
attachments = (
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.depth.format;
|
||||
loadOp = clear;
|
||||
finalLayout = depth_stencil_attachment_optimal;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.color.format;
|
||||
loadOp = clear;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.emission.format;
|
||||
loadOp = clear;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.normal.format;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.position.format;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.opaque.format;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $output.format;
|
||||
loadOp = clear;
|
||||
storeOp = store;
|
||||
finalLayout = $output.finalLayout;
|
||||
},
|
||||
);
|
||||
subpasses = (
|
||||
{ // 0 depth
|
||||
pipelineBindPoint = graphics;
|
||||
depthStencilAttachment = {
|
||||
};
|
||||
renderpass = {
|
||||
attachments = (
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.depth.format;
|
||||
loadOp = clear;
|
||||
finalLayout = depth_stencil_attachment_optimal;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.color.format;
|
||||
loadOp = clear;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.emission.format;
|
||||
loadOp = clear;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.normal.format;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.position.format;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.opaque.format;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $output.format;
|
||||
loadOp = clear;
|
||||
storeOp = store;
|
||||
finalLayout = $output.finalLayout;
|
||||
},
|
||||
);
|
||||
subpasses = (
|
||||
{ // 0 depth
|
||||
pipelineBindPoint = graphics;
|
||||
depthStencilAttachment = {
|
||||
attachment = 0;
|
||||
layout = depth_stencil_attachment_optimal;
|
||||
};
|
||||
},
|
||||
{ // 1 translucent-frags
|
||||
pipelineBindPoint = graphics;
|
||||
depthStencilAttachment = {
|
||||
attachment = 0;
|
||||
layout = depth_stencil_read_only_optimal;
|
||||
};
|
||||
preserveAttachments = (1, 2, 3, 4, 5);
|
||||
},
|
||||
{ // 2 g-buffer generation
|
||||
pipelineBindPoint = graphics;
|
||||
colorAttachments = (
|
||||
{ // color
|
||||
attachment = 1;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
{ // emission
|
||||
attachment = 2;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
{ // normal
|
||||
attachment = 3;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
{ // position
|
||||
attachment = 4;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
);
|
||||
depthStencilAttachment = {
|
||||
attachment = 0;
|
||||
layout = depth_stencil_read_only_optimal;
|
||||
};
|
||||
preserveAttachments = (6);
|
||||
},
|
||||
{ // 3 lighting
|
||||
pipelineBindPoint = graphics;
|
||||
inputAttachments = (
|
||||
{ // depth
|
||||
attachment = 0;
|
||||
layout = depth_stencil_attachment_optimal;
|
||||
};
|
||||
},
|
||||
{ // 1 translucent-frags
|
||||
pipelineBindPoint = graphics;
|
||||
depthStencilAttachment = {
|
||||
attachment = 0;
|
||||
layout = depth_stencil_read_only_optimal;
|
||||
};
|
||||
preserveAttachments = (1, 2, 3, 4, 5);
|
||||
},
|
||||
{ // 2 g-buffer generation
|
||||
pipelineBindPoint = graphics;
|
||||
colorAttachments = (
|
||||
{ // color
|
||||
attachment = 1;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
{ // emission
|
||||
attachment = 2;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
{ // normal
|
||||
attachment = 3;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
{ // position
|
||||
attachment = 4;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
);
|
||||
depthStencilAttachment = {
|
||||
attachment = 0;
|
||||
layout = depth_stencil_read_only_optimal;
|
||||
};
|
||||
preserveAttachments = (6);
|
||||
},
|
||||
{ // 3 lighting
|
||||
pipelineBindPoint = graphics;
|
||||
inputAttachments = (
|
||||
{ // depth
|
||||
attachment = 0;
|
||||
layout = shader_read_only_optimal;
|
||||
},
|
||||
{ // color
|
||||
attachment = 1;
|
||||
layout = shader_read_only_optimal;
|
||||
},
|
||||
{ // emission
|
||||
attachment = 2;
|
||||
layout = shader_read_only_optimal;
|
||||
},
|
||||
{ // normal
|
||||
attachment = 3;
|
||||
layout = shader_read_only_optimal;
|
||||
},
|
||||
{ // position
|
||||
attachment = 4;
|
||||
layout = shader_read_only_optimal;
|
||||
},
|
||||
);
|
||||
colorAttachments = (
|
||||
{ // opaque
|
||||
attachment = 5;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
);
|
||||
preserveAttachments = (6);
|
||||
},
|
||||
{ // 4 compose
|
||||
pipelineBindPoint = graphics;
|
||||
inputAttachments = (
|
||||
{ // opaque
|
||||
attachment = 5;
|
||||
layout = shader_read_only_optimal;
|
||||
},
|
||||
);
|
||||
colorAttachments = (
|
||||
{ // output
|
||||
attachment = 6;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
);
|
||||
preserveAttachments = (0, 1, 2, 3, 4);
|
||||
},
|
||||
);
|
||||
dependencies = (
|
||||
{
|
||||
srcSubpass = 0; // depth
|
||||
dstSubpass = 1; // translucent
|
||||
srcStageMask = late_fragment_tests;
|
||||
dstStageMask = fragment_shader|early_fragment_tests;
|
||||
srcAccessMask = depth_stencil_attachment_write;
|
||||
dstAccessMask = input_attachment_read|depth_stencil_attachment_read;
|
||||
dependencyFlags = by_region|view_local;
|
||||
},
|
||||
{
|
||||
srcSubpass = 0; // depth
|
||||
dstSubpass = 2; // g-buffer
|
||||
srcStageMask = late_fragment_tests;
|
||||
dstStageMask = early_fragment_tests;
|
||||
srcAccessMask = depth_stencil_attachment_write;
|
||||
dstAccessMask = depth_stencil_attachment_read;
|
||||
dependencyFlags = by_region|view_local;
|
||||
},
|
||||
{
|
||||
srcSubpass = 2; // g-buffer
|
||||
dstSubpass = 3; // lighting
|
||||
srcStageMask = color_attachment_output;
|
||||
dstStageMask = fragment_shader;
|
||||
srcAccessMask = color_attachment_write;
|
||||
dstAccessMask = input_attachment_read;
|
||||
dependencyFlags = by_region|view_local;
|
||||
},
|
||||
{
|
||||
srcSubpass = 3; // lighting
|
||||
dstSubpass = 4; // compose
|
||||
srcStageMask = color_attachment_output;
|
||||
dstStageMask = fragment_shader;
|
||||
srcAccessMask = color_attachment_write;
|
||||
dstAccessMask = input_attachment_read;
|
||||
dependencyFlags = by_region|view_local;
|
||||
},
|
||||
{
|
||||
srcSubpass = 1; // translucent-frags
|
||||
dstSubpass = 4; // translucent-final/compose
|
||||
srcStageMask = color_attachment_output;
|
||||
dstStageMask = fragment_shader;
|
||||
srcAccessMask = color_attachment_write;
|
||||
dstAccessMask = input_attachment_read;
|
||||
dependencyFlags = by_region|view_local;
|
||||
},
|
||||
);
|
||||
@next = (VkRenderPassMultiviewCreateInfo, {
|
||||
viewMasks = (0x3fu, 0x3fu, 0x3fu, 0x3fu, 0x3fu);
|
||||
viewOffsets = ( 0, 0, 0, 0, 0);
|
||||
});
|
||||
};
|
||||
}
|
||||
layout = shader_read_only_optimal;
|
||||
},
|
||||
{ // color
|
||||
attachment = 1;
|
||||
layout = shader_read_only_optimal;
|
||||
},
|
||||
{ // emission
|
||||
attachment = 2;
|
||||
layout = shader_read_only_optimal;
|
||||
},
|
||||
{ // normal
|
||||
attachment = 3;
|
||||
layout = shader_read_only_optimal;
|
||||
},
|
||||
{ // position
|
||||
attachment = 4;
|
||||
layout = shader_read_only_optimal;
|
||||
},
|
||||
);
|
||||
colorAttachments = (
|
||||
{ // opaque
|
||||
attachment = 5;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
);
|
||||
preserveAttachments = (6);
|
||||
},
|
||||
{ // 4 compose
|
||||
pipelineBindPoint = graphics;
|
||||
inputAttachments = (
|
||||
{ // opaque
|
||||
attachment = 5;
|
||||
layout = shader_read_only_optimal;
|
||||
},
|
||||
);
|
||||
colorAttachments = (
|
||||
{ // output
|
||||
attachment = 6;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
);
|
||||
preserveAttachments = (0, 1, 2, 3, 4);
|
||||
},
|
||||
);
|
||||
dependencies = (
|
||||
{
|
||||
srcSubpass = 0; // depth
|
||||
dstSubpass = 1; // translucent
|
||||
srcStageMask = late_fragment_tests;
|
||||
dstStageMask = fragment_shader|early_fragment_tests;
|
||||
srcAccessMask = depth_stencil_attachment_write;
|
||||
dstAccessMask = input_attachment_read|depth_stencil_attachment_read;
|
||||
dependencyFlags = by_region|view_local;
|
||||
},
|
||||
{
|
||||
srcSubpass = 0; // depth
|
||||
dstSubpass = 2; // g-buffer
|
||||
srcStageMask = late_fragment_tests;
|
||||
dstStageMask = early_fragment_tests;
|
||||
srcAccessMask = depth_stencil_attachment_write;
|
||||
dstAccessMask = depth_stencil_attachment_read;
|
||||
dependencyFlags = by_region|view_local;
|
||||
},
|
||||
{
|
||||
srcSubpass = 2; // g-buffer
|
||||
dstSubpass = 3; // lighting
|
||||
srcStageMask = color_attachment_output;
|
||||
dstStageMask = fragment_shader;
|
||||
srcAccessMask = color_attachment_write;
|
||||
dstAccessMask = input_attachment_read;
|
||||
dependencyFlags = by_region|view_local;
|
||||
},
|
||||
{
|
||||
srcSubpass = 3; // lighting
|
||||
dstSubpass = 4; // compose
|
||||
srcStageMask = color_attachment_output;
|
||||
dstStageMask = fragment_shader;
|
||||
srcAccessMask = color_attachment_write;
|
||||
dstAccessMask = input_attachment_read;
|
||||
dependencyFlags = by_region|view_local;
|
||||
},
|
||||
{
|
||||
srcSubpass = 1; // translucent-frags
|
||||
dstSubpass = 4; // translucent-final/compose
|
||||
srcStageMask = color_attachment_output;
|
||||
dstStageMask = fragment_shader;
|
||||
srcAccessMask = color_attachment_write;
|
||||
dstAccessMask = input_attachment_read;
|
||||
dependencyFlags = by_region|view_local;
|
||||
},
|
||||
);
|
||||
@next = (VkRenderPassMultiviewCreateInfo, {
|
||||
viewMasks = (0x3fu, 0x3fu, 0x3fu, 0x3fu, 0x3fu);
|
||||
viewOffsets = ( 0, 0, 0, 0, 0);
|
||||
});
|
||||
};
|
||||
|
|
|
@ -1,319 +1,317 @@
|
|||
{
|
||||
flat_color_image_template = {
|
||||
imageType = `2d;
|
||||
samples = 1;
|
||||
extent = {
|
||||
width = $output.extent.width;
|
||||
height = $output.extent.height;
|
||||
depth = 1;
|
||||
};
|
||||
mipLevels = 1;
|
||||
arrayLayers = 1;
|
||||
tiling = optimal;
|
||||
usage = color_attachment|input_attachment|transient_attachment;
|
||||
initialLayout = undefined;
|
||||
};
|
||||
images = {
|
||||
depth = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
format = x8_d24_unorm_pack32;
|
||||
usage = depth_stencil_attachment|input_attachment|transient_attachment;
|
||||
};
|
||||
color = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
format = r8g8b8a8_unorm;
|
||||
};
|
||||
emission = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
format = r16g16b16a16_sfloat;
|
||||
};
|
||||
normal = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
format = r16g16b16a16_sfloat;
|
||||
};
|
||||
position = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
format = r32g32b32a32_sfloat;
|
||||
};
|
||||
opaque = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
format = r16g16b16a16_sfloat;
|
||||
};
|
||||
};
|
||||
flat_color_view_template = {
|
||||
viewType = VK_IMAGE_VIEW_TYPE_2D;
|
||||
components = {
|
||||
r = identity;
|
||||
g = identity;
|
||||
b = identity;
|
||||
a = identity;
|
||||
};
|
||||
subresourceRange = {
|
||||
aspectMask = color;
|
||||
levelCount = 1;
|
||||
layerCount = 1;
|
||||
};
|
||||
};
|
||||
imageViews = {
|
||||
depth = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = depth;
|
||||
format = $properties.images.depth.format;
|
||||
subresourceRange = {
|
||||
aspectMask = depth;
|
||||
};
|
||||
};
|
||||
color = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = color;
|
||||
format = $properties.images.color.format;
|
||||
};
|
||||
emission = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = emission;
|
||||
format = $properties.images.emission.format;
|
||||
};
|
||||
normal = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = normal;
|
||||
format = $properties.images.normal.format;
|
||||
};
|
||||
position = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = position;
|
||||
format = $properties.images.position.format;
|
||||
};
|
||||
opaque = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = opaque;
|
||||
format = $properties.images.opaque.format;
|
||||
};
|
||||
};
|
||||
output = {
|
||||
image = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
usage = color_attachment|input_attachment|sampled;
|
||||
format = $output.format;
|
||||
};
|
||||
view = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = $output.image;
|
||||
format = $output.format;
|
||||
};
|
||||
format = r16g16b16a16_sfloat;
|
||||
finalLayout = shader_read_only_optimal;
|
||||
};
|
||||
framebuffer = {
|
||||
renderPass = deferred;
|
||||
attachments = (depth, color, emission, normal, position, opaque,
|
||||
$output.view);
|
||||
flat_color_image_template = {
|
||||
imageType = `2d;
|
||||
samples = 1;
|
||||
extent = {
|
||||
width = $output.extent.width;
|
||||
height = $output.extent.height;
|
||||
layers = 1;
|
||||
depth = 1;
|
||||
};
|
||||
clearValues = (
|
||||
{ depthStencil = { depth = 1; stencil = 0; }; },
|
||||
{ color = "[0, 0, 0, 1]"; }, // color
|
||||
{ color = "[0, 0, 0, 1]"; }, // emission
|
||||
{ color = "[0, 0, 0, 1]"; }, // normal
|
||||
{ color = "[0, 0, 0, 1]"; }, // position
|
||||
{ color = "[0, 0, 0, 1]"; }, // opaque
|
||||
{ color = "[0, 0, 0, 1]"; }, // output
|
||||
mipLevels = 1;
|
||||
arrayLayers = 1;
|
||||
tiling = optimal;
|
||||
usage = color_attachment|input_attachment|transient_attachment;
|
||||
initialLayout = undefined;
|
||||
};
|
||||
images = {
|
||||
depth = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
format = x8_d24_unorm_pack32;
|
||||
usage = depth_stencil_attachment|input_attachment|transient_attachment;
|
||||
};
|
||||
color = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
format = r8g8b8a8_unorm;
|
||||
};
|
||||
emission = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
format = r16g16b16a16_sfloat;
|
||||
};
|
||||
normal = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
format = r16g16b16a16_sfloat;
|
||||
};
|
||||
position = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
format = r32g32b32a32_sfloat;
|
||||
};
|
||||
opaque = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
format = r16g16b16a16_sfloat;
|
||||
};
|
||||
};
|
||||
flat_color_view_template = {
|
||||
viewType = VK_IMAGE_VIEW_TYPE_2D;
|
||||
components = {
|
||||
r = identity;
|
||||
g = identity;
|
||||
b = identity;
|
||||
a = identity;
|
||||
};
|
||||
subresourceRange = {
|
||||
aspectMask = color;
|
||||
levelCount = 1;
|
||||
layerCount = 1;
|
||||
};
|
||||
};
|
||||
imageViews = {
|
||||
depth = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = depth;
|
||||
format = $properties.images.depth.format;
|
||||
subresourceRange = {
|
||||
aspectMask = depth;
|
||||
};
|
||||
};
|
||||
color = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = color;
|
||||
format = $properties.images.color.format;
|
||||
};
|
||||
emission = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = emission;
|
||||
format = $properties.images.emission.format;
|
||||
};
|
||||
normal = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = normal;
|
||||
format = $properties.images.normal.format;
|
||||
};
|
||||
position = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = position;
|
||||
format = $properties.images.position.format;
|
||||
};
|
||||
opaque = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = opaque;
|
||||
format = $properties.images.opaque.format;
|
||||
};
|
||||
};
|
||||
output = {
|
||||
image = {
|
||||
@inherit = $properties.flat_color_image_template;
|
||||
usage = color_attachment|input_attachment|sampled;
|
||||
format = $output.format;
|
||||
};
|
||||
view = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = $output.image;
|
||||
format = $output.format;
|
||||
};
|
||||
format = r16g16b16a16_sfloat;
|
||||
finalLayout = shader_read_only_optimal;
|
||||
};
|
||||
framebuffer = {
|
||||
renderPass = deferred;
|
||||
attachments = (depth, color, emission, normal, position, opaque,
|
||||
$output.view);
|
||||
width = $output.extent.width;
|
||||
height = $output.extent.height;
|
||||
layers = 1;
|
||||
};
|
||||
clearValues = (
|
||||
{ depthStencil = { depth = 1; stencil = 0; }; },
|
||||
{ color = "[0, 0, 0, 1]"; }, // color
|
||||
{ color = "[0, 0, 0, 1]"; }, // emission
|
||||
{ color = "[0, 0, 0, 1]"; }, // normal
|
||||
{ color = "[0, 0, 0, 1]"; }, // position
|
||||
{ color = "[0, 0, 0, 1]"; }, // opaque
|
||||
{ color = "[0, 0, 0, 1]"; }, // output
|
||||
);
|
||||
attachment_template = {
|
||||
samples = 1;
|
||||
loadOp = dont_care;
|
||||
storeOp = dont_care;
|
||||
stencilLoadOp = dont_care;
|
||||
stencilStoreOp = dont_care;
|
||||
initialLayout = undefined;
|
||||
finalLayout = color_attachment_optimal;
|
||||
};
|
||||
info = {
|
||||
color = "[0, 1, 0, 1]";
|
||||
subpass_info = (
|
||||
{ name = depth; color = "[ 0.5, 0.5, 0.5, 1]" },
|
||||
{ name = translucent; color = "[ 0.25, 0.25, 0.6, 1]" },
|
||||
{ name = g-buffef; color = "[ 0.3, 0.7, 0.3, 1]" },
|
||||
{ name = lighting; color = "[ 0.8, 0.8, 0.8, 1]" },
|
||||
{ name = compose; color = "[ 0.7, 0.3, 0.3, 1]" },
|
||||
);
|
||||
attachment_template = {
|
||||
samples = 1;
|
||||
loadOp = dont_care;
|
||||
storeOp = dont_care;
|
||||
stencilLoadOp = dont_care;
|
||||
stencilStoreOp = dont_care;
|
||||
initialLayout = undefined;
|
||||
finalLayout = color_attachment_optimal;
|
||||
};
|
||||
info = {
|
||||
color = "[0, 1, 0, 1]";
|
||||
subpass_info = (
|
||||
{ name = depth; color = "[ 0.5, 0.5, 0.5, 1]" },
|
||||
{ name = translucent; color = "[ 0.25, 0.25, 0.6, 1]" },
|
||||
{ name = g-buffef; color = "[ 0.3, 0.7, 0.3, 1]" },
|
||||
{ name = lighting; color = "[ 0.8, 0.8, 0.8, 1]" },
|
||||
{ name = compose; color = "[ 0.7, 0.3, 0.3, 1]" },
|
||||
);
|
||||
};
|
||||
renderpass = {
|
||||
attachments = (
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.depth.format;
|
||||
loadOp = clear;
|
||||
finalLayout = depth_stencil_attachment_optimal;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.color.format;
|
||||
loadOp = clear;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.emission.format;
|
||||
loadOp = clear;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.normal.format;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.position.format;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.opaque.format;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $output.format;
|
||||
loadOp = clear;
|
||||
storeOp = store;
|
||||
finalLayout = $output.finalLayout;
|
||||
},
|
||||
);
|
||||
subpasses = (
|
||||
{ // 0 depth
|
||||
pipelineBindPoint = graphics;
|
||||
depthStencilAttachment = {
|
||||
};
|
||||
renderpass = {
|
||||
attachments = (
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.depth.format;
|
||||
loadOp = clear;
|
||||
finalLayout = depth_stencil_attachment_optimal;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.color.format;
|
||||
loadOp = clear;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.emission.format;
|
||||
loadOp = clear;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.normal.format;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.position.format;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.opaque.format;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $output.format;
|
||||
loadOp = clear;
|
||||
storeOp = store;
|
||||
finalLayout = $output.finalLayout;
|
||||
},
|
||||
);
|
||||
subpasses = (
|
||||
{ // 0 depth
|
||||
pipelineBindPoint = graphics;
|
||||
depthStencilAttachment = {
|
||||
attachment = 0;
|
||||
layout = depth_stencil_attachment_optimal;
|
||||
};
|
||||
},
|
||||
{ // 1 translucent-frags
|
||||
pipelineBindPoint = graphics;
|
||||
depthStencilAttachment = {
|
||||
attachment = 0;
|
||||
layout = depth_stencil_read_only_optimal;
|
||||
};
|
||||
preserveAttachments = (1, 2, 3, 4, 5);
|
||||
},
|
||||
{ // 2 g-buffer generation
|
||||
pipelineBindPoint = graphics;
|
||||
colorAttachments = (
|
||||
{ // color
|
||||
attachment = 1;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
{ // emission
|
||||
attachment = 2;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
{ // normal
|
||||
attachment = 3;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
{ // position
|
||||
attachment = 4;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
);
|
||||
depthStencilAttachment = {
|
||||
attachment = 0;
|
||||
layout = depth_stencil_read_only_optimal;
|
||||
};
|
||||
preserveAttachments = (6);
|
||||
},
|
||||
{ // 3 lighting
|
||||
pipelineBindPoint = graphics;
|
||||
inputAttachments = (
|
||||
{ // depth
|
||||
attachment = 0;
|
||||
layout = depth_stencil_attachment_optimal;
|
||||
};
|
||||
},
|
||||
{ // 1 translucent-frags
|
||||
pipelineBindPoint = graphics;
|
||||
depthStencilAttachment = {
|
||||
attachment = 0;
|
||||
layout = depth_stencil_read_only_optimal;
|
||||
};
|
||||
preserveAttachments = (1, 2, 3, 4, 5);
|
||||
},
|
||||
{ // 2 g-buffer generation
|
||||
pipelineBindPoint = graphics;
|
||||
colorAttachments = (
|
||||
{ // color
|
||||
attachment = 1;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
{ // emission
|
||||
attachment = 2;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
{ // normal
|
||||
attachment = 3;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
{ // position
|
||||
attachment = 4;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
);
|
||||
depthStencilAttachment = {
|
||||
attachment = 0;
|
||||
layout = depth_stencil_read_only_optimal;
|
||||
};
|
||||
preserveAttachments = (6);
|
||||
},
|
||||
{ // 3 lighting
|
||||
pipelineBindPoint = graphics;
|
||||
inputAttachments = (
|
||||
{ // depth
|
||||
attachment = 0;
|
||||
layout = shader_read_only_optimal;
|
||||
},
|
||||
{ // color
|
||||
attachment = 1;
|
||||
layout = shader_read_only_optimal;
|
||||
},
|
||||
{ // emission
|
||||
attachment = 2;
|
||||
layout = shader_read_only_optimal;
|
||||
},
|
||||
{ // normal
|
||||
attachment = 3;
|
||||
layout = shader_read_only_optimal;
|
||||
},
|
||||
{ // position
|
||||
attachment = 4;
|
||||
layout = shader_read_only_optimal;
|
||||
},
|
||||
);
|
||||
colorAttachments = (
|
||||
{ // opaque
|
||||
attachment = 5;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
);
|
||||
preserveAttachments = (6);
|
||||
},
|
||||
{ // 4 compose
|
||||
pipelineBindPoint = graphics;
|
||||
inputAttachments = (
|
||||
{ // opaque
|
||||
attachment = 5;
|
||||
layout = shader_read_only_optimal;
|
||||
},
|
||||
);
|
||||
colorAttachments = (
|
||||
{ // output
|
||||
attachment = 6;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
);
|
||||
preserveAttachments = (0, 1, 2, 3, 4);
|
||||
},
|
||||
);
|
||||
dependencies = (
|
||||
{
|
||||
srcSubpass = 0; // depth
|
||||
dstSubpass = 1; // translucent
|
||||
srcStageMask = late_fragment_tests;
|
||||
dstStageMask = fragment_shader|early_fragment_tests;
|
||||
srcAccessMask = depth_stencil_attachment_write;
|
||||
dstAccessMask = input_attachment_read|depth_stencil_attachment_read;
|
||||
dependencyFlags = by_region;
|
||||
},
|
||||
{
|
||||
srcSubpass = 0; // depth
|
||||
dstSubpass = 2; // g-buffer
|
||||
srcStageMask = late_fragment_tests;
|
||||
dstStageMask = early_fragment_tests;
|
||||
srcAccessMask = depth_stencil_attachment_write;
|
||||
dstAccessMask = depth_stencil_attachment_read;
|
||||
dependencyFlags = by_region;
|
||||
},
|
||||
{
|
||||
srcSubpass = 2; // g-buffer
|
||||
dstSubpass = 3; // lighting
|
||||
srcStageMask = color_attachment_output;
|
||||
dstStageMask = fragment_shader;
|
||||
srcAccessMask = color_attachment_write;
|
||||
dstAccessMask = input_attachment_read;
|
||||
dependencyFlags = by_region;
|
||||
},
|
||||
{
|
||||
srcSubpass = 3; // lighting
|
||||
dstSubpass = 4; // compose
|
||||
srcStageMask = color_attachment_output;
|
||||
dstStageMask = fragment_shader;
|
||||
srcAccessMask = color_attachment_write;
|
||||
dstAccessMask = input_attachment_read;
|
||||
dependencyFlags = by_region;
|
||||
},
|
||||
{
|
||||
srcSubpass = 1; // translucent-frags
|
||||
dstSubpass = 4; // translucent-final/compose
|
||||
srcStageMask = color_attachment_output;
|
||||
dstStageMask = fragment_shader;
|
||||
srcAccessMask = color_attachment_write;
|
||||
dstAccessMask = input_attachment_read;
|
||||
dependencyFlags = by_region;
|
||||
},
|
||||
);
|
||||
};
|
||||
}
|
||||
layout = shader_read_only_optimal;
|
||||
},
|
||||
{ // color
|
||||
attachment = 1;
|
||||
layout = shader_read_only_optimal;
|
||||
},
|
||||
{ // emission
|
||||
attachment = 2;
|
||||
layout = shader_read_only_optimal;
|
||||
},
|
||||
{ // normal
|
||||
attachment = 3;
|
||||
layout = shader_read_only_optimal;
|
||||
},
|
||||
{ // position
|
||||
attachment = 4;
|
||||
layout = shader_read_only_optimal;
|
||||
},
|
||||
);
|
||||
colorAttachments = (
|
||||
{ // opaque
|
||||
attachment = 5;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
);
|
||||
preserveAttachments = (6);
|
||||
},
|
||||
{ // 4 compose
|
||||
pipelineBindPoint = graphics;
|
||||
inputAttachments = (
|
||||
{ // opaque
|
||||
attachment = 5;
|
||||
layout = shader_read_only_optimal;
|
||||
},
|
||||
);
|
||||
colorAttachments = (
|
||||
{ // output
|
||||
attachment = 6;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
);
|
||||
preserveAttachments = (0, 1, 2, 3, 4);
|
||||
},
|
||||
);
|
||||
dependencies = (
|
||||
{
|
||||
srcSubpass = 0; // depth
|
||||
dstSubpass = 1; // translucent
|
||||
srcStageMask = late_fragment_tests;
|
||||
dstStageMask = fragment_shader|early_fragment_tests;
|
||||
srcAccessMask = depth_stencil_attachment_write;
|
||||
dstAccessMask = input_attachment_read|depth_stencil_attachment_read;
|
||||
dependencyFlags = by_region;
|
||||
},
|
||||
{
|
||||
srcSubpass = 0; // depth
|
||||
dstSubpass = 2; // g-buffer
|
||||
srcStageMask = late_fragment_tests;
|
||||
dstStageMask = early_fragment_tests;
|
||||
srcAccessMask = depth_stencil_attachment_write;
|
||||
dstAccessMask = depth_stencil_attachment_read;
|
||||
dependencyFlags = by_region;
|
||||
},
|
||||
{
|
||||
srcSubpass = 2; // g-buffer
|
||||
dstSubpass = 3; // lighting
|
||||
srcStageMask = color_attachment_output;
|
||||
dstStageMask = fragment_shader;
|
||||
srcAccessMask = color_attachment_write;
|
||||
dstAccessMask = input_attachment_read;
|
||||
dependencyFlags = by_region;
|
||||
},
|
||||
{
|
||||
srcSubpass = 3; // lighting
|
||||
dstSubpass = 4; // compose
|
||||
srcStageMask = color_attachment_output;
|
||||
dstStageMask = fragment_shader;
|
||||
srcAccessMask = color_attachment_write;
|
||||
dstAccessMask = input_attachment_read;
|
||||
dependencyFlags = by_region;
|
||||
},
|
||||
{
|
||||
srcSubpass = 1; // translucent-frags
|
||||
dstSubpass = 4; // translucent-final/compose
|
||||
srcStageMask = color_attachment_output;
|
||||
dstStageMask = fragment_shader;
|
||||
srcAccessMask = color_attachment_write;
|
||||
dstAccessMask = input_attachment_read;
|
||||
dependencyFlags = by_region;
|
||||
},
|
||||
);
|
||||
};
|
||||
|
|
|
@ -1,199 +1,197 @@
|
|||
{
|
||||
flat_color_image_template = {
|
||||
imageType = `2d;
|
||||
samples = $msaaSamples;
|
||||
extent = {
|
||||
width = $output.extent.width;
|
||||
height = $output.extent.height;
|
||||
depth = 1;
|
||||
};
|
||||
mipLevels = 1;
|
||||
arrayLayers = 1;
|
||||
tiling = optimal;
|
||||
usage = color_attachment|transient_attachment;
|
||||
flat_color_image_template = {
|
||||
imageType = `2d;
|
||||
samples = $msaaSamples;
|
||||
extent = {
|
||||
width = $output.extent.width;
|
||||
height = $output.extent.height;
|
||||
depth = 1;
|
||||
};
|
||||
images = {
|
||||
depth = {
|
||||
@inherit = @properties.flat_color_image_template;
|
||||
format = x8_d24_unorm_pack32;
|
||||
usage = depth_stencil_attachment|transient_attachment;
|
||||
};
|
||||
color = {
|
||||
@inherit = @properties.flat_color_image_template;
|
||||
format = $output.format;
|
||||
};
|
||||
mipLevels = 1;
|
||||
arrayLayers = 1;
|
||||
tiling = optimal;
|
||||
usage = color_attachment|transient_attachment;
|
||||
};
|
||||
images = {
|
||||
depth = {
|
||||
@inherit = @properties.flat_color_image_template;
|
||||
format = x8_d24_unorm_pack32;
|
||||
usage = depth_stencil_attachment|transient_attachment;
|
||||
};
|
||||
flat_color_view_template = {
|
||||
viewType = `2d;
|
||||
components = {
|
||||
r = identity;
|
||||
g = identity;
|
||||
b = identity;
|
||||
a = identity;
|
||||
};
|
||||
color = {
|
||||
@inherit = @properties.flat_color_image_template;
|
||||
format = $output.format;
|
||||
};
|
||||
};
|
||||
flat_color_view_template = {
|
||||
viewType = `2d;
|
||||
components = {
|
||||
r = identity;
|
||||
g = identity;
|
||||
b = identity;
|
||||
a = identity;
|
||||
};
|
||||
subresourceRange = {
|
||||
aspectMask = color;
|
||||
levelCount = 1;
|
||||
layerCount = 1;
|
||||
};
|
||||
};
|
||||
imageViews = {
|
||||
depth = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = depth;
|
||||
format = $properties.images.depth.format;
|
||||
subresourceRange = {
|
||||
aspectMask = color;
|
||||
levelCount = 1;
|
||||
layerCount = 1;
|
||||
aspectMask = depth;
|
||||
};
|
||||
};
|
||||
imageViews = {
|
||||
depth = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = depth;
|
||||
color = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = color;
|
||||
format = $properties.images.color.format;
|
||||
};
|
||||
};
|
||||
framebuffer = {
|
||||
renderPass = $properties.renderpass;
|
||||
attachment = ($output.view, depth);
|
||||
width = $output.extent.width;
|
||||
height = $output.extent.height;
|
||||
layers = 1;
|
||||
};
|
||||
framebuffer_msaa = {
|
||||
renderPass = $properties.renderpass_msaa;
|
||||
attachment = ($output.view, depth, color);
|
||||
width = $output.extent.width;
|
||||
height = $output.extent.height;
|
||||
layers = 1;
|
||||
};
|
||||
attachment_template = {
|
||||
samples = 1;
|
||||
loadOp = dont_care;
|
||||
storeOp = dont_care;
|
||||
stencilLoadOp = dont_care;
|
||||
stencilStoreOp = dont_care;
|
||||
initialLayout = undefined;
|
||||
finalLayout = color_attachment_optimal;
|
||||
};
|
||||
renderpass = {
|
||||
attachments = (
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $output.format;
|
||||
loadOp = clear;
|
||||
storeOp = store;
|
||||
finalLayout = present_src_khr;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.depth.format;
|
||||
subresourceRange = {
|
||||
aspectMask = depth;
|
||||
loadOp = clear;
|
||||
finalLayout = depth_stencil_attachment_optimal;
|
||||
},
|
||||
);
|
||||
subpasses = (
|
||||
{
|
||||
pipelineBindPoint = graphics;
|
||||
colorAttachments = (
|
||||
{
|
||||
attachment = 0;
|
||||
layout = color_attachment_optimal;
|
||||
}
|
||||
);
|
||||
depthStencilAttachment = {
|
||||
attachment = 1;
|
||||
layout = depth_stencil_attachment_optimal;
|
||||
};
|
||||
};
|
||||
color = {
|
||||
@inherit = $properties.flat_color_view_template;
|
||||
image = color;
|
||||
format = $properties.images.color.format;
|
||||
};
|
||||
};
|
||||
framebuffer = {
|
||||
renderPass = $properties.renderpass;
|
||||
attachment = ($output.view, depth);
|
||||
width = $output.extent.width;
|
||||
height = $output.extent.height;
|
||||
layers = 1;
|
||||
};
|
||||
framebuffer_msaa = {
|
||||
renderPass = $properties.renderpass_msaa;
|
||||
attachment = ($output.view, depth, color);
|
||||
width = $output.extent.width;
|
||||
height = $output.extent.height;
|
||||
layers = 1;
|
||||
};
|
||||
attachment_template = {
|
||||
samples = 1;
|
||||
loadOp = dont_care;
|
||||
storeOp = dont_care;
|
||||
stencilLoadOp = dont_care;
|
||||
stencilStoreOp = dont_care;
|
||||
initialLayout = undefined;
|
||||
finalLayout = color_attachment_optimal;
|
||||
};
|
||||
renderpass = {
|
||||
attachments = (
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $output.format;
|
||||
loadOp = clear;
|
||||
storeOp = store;
|
||||
finalLayout = present_src_khr;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.depth.format;
|
||||
loadOp = clear;
|
||||
finalLayout = depth_stencil_attachment_optimal;
|
||||
},
|
||||
);
|
||||
subpasses = (
|
||||
{
|
||||
pipelineBindPoint = graphics;
|
||||
colorAttachments = (
|
||||
{
|
||||
attachment = 0;
|
||||
layout = color_attachment_optimal;
|
||||
}
|
||||
);
|
||||
depthStencilAttachment = {
|
||||
attachment = 1;
|
||||
layout = depth_stencil_attachment_optimal;
|
||||
};
|
||||
preserveAttachments = ();
|
||||
},
|
||||
);
|
||||
dependencies = (
|
||||
{
|
||||
srcSubpass = ~0u; // external
|
||||
dstSubpass = 0;
|
||||
srcStageMask = top_of_pipe;
|
||||
dstStageMask = color_attachment_output;
|
||||
srcAccessMask = memory_read;
|
||||
dstAccessMask = color_attachment_write;
|
||||
dependencyFlags = by_region;
|
||||
},
|
||||
{
|
||||
srcSubpass = 0;
|
||||
dstSubpass = ~0u; // external
|
||||
srcStageMask = color_attachment_output;
|
||||
dstStageMask = bottom_of_pipe;
|
||||
srcAccessMask = color_attachment_write;
|
||||
dstAccessMask = memory_read;
|
||||
dependencyFlags = by_region;
|
||||
},
|
||||
);
|
||||
};
|
||||
renderpass_msaa = {
|
||||
attachments = (
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $output.format;
|
||||
storeOp = store;
|
||||
finalLayout = present_src_khr;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.depth.format;
|
||||
samples = $msaaSamples;
|
||||
loadOp = clear;
|
||||
storeOp = dont_care;
|
||||
finalLayout = depth_stencil_attachment_optimal;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $swapchain.format;
|
||||
samples = $msaaSamples;
|
||||
loadOp = clear;
|
||||
storeOp = store;// dont_care?
|
||||
finalLayout = color_attachment_optimal;
|
||||
},
|
||||
);
|
||||
subpasses = (
|
||||
{
|
||||
pipelineBindPoint = graphics;
|
||||
colorAttachments = (
|
||||
{
|
||||
attachment = 2;
|
||||
layout = color_attachment_optimal;
|
||||
}
|
||||
);
|
||||
resolveAttachments = (
|
||||
{
|
||||
attachment = 0;
|
||||
layout = color_attachment_optimal;
|
||||
}
|
||||
);
|
||||
depthStencilAttachment = {
|
||||
attachment = 1;
|
||||
layout = depth_stencil_attachment_optimal;
|
||||
};
|
||||
preserveAttachments = ();
|
||||
},
|
||||
);
|
||||
dependencies = (
|
||||
{
|
||||
srcSubpass = ~0u; // external
|
||||
dstSubpass = 0;
|
||||
srcStageMask = top_of_pipe;
|
||||
dstStageMask = color_attachment_output;
|
||||
srcAccessMask = memory_read;
|
||||
dstAccessMask = color_attachment_write;
|
||||
dependencyFlags = by_region;
|
||||
},
|
||||
{
|
||||
srcSubpass = 0;
|
||||
dstSubpass = ~0u; // external
|
||||
srcStageMask = color_attachment_output;
|
||||
dstStageMask = bottom_of_pipe;
|
||||
srcAccessMask = color_attachment_write;
|
||||
dstAccessMask = memory_read;
|
||||
dependencyFlags = by_region;
|
||||
},
|
||||
);
|
||||
};
|
||||
}
|
||||
preserveAttachments = ();
|
||||
},
|
||||
);
|
||||
dependencies = (
|
||||
{
|
||||
srcSubpass = ~0u; // external
|
||||
dstSubpass = 0;
|
||||
srcStageMask = top_of_pipe;
|
||||
dstStageMask = color_attachment_output;
|
||||
srcAccessMask = memory_read;
|
||||
dstAccessMask = color_attachment_write;
|
||||
dependencyFlags = by_region;
|
||||
},
|
||||
{
|
||||
srcSubpass = 0;
|
||||
dstSubpass = ~0u; // external
|
||||
srcStageMask = color_attachment_output;
|
||||
dstStageMask = bottom_of_pipe;
|
||||
srcAccessMask = color_attachment_write;
|
||||
dstAccessMask = memory_read;
|
||||
dependencyFlags = by_region;
|
||||
},
|
||||
);
|
||||
};
|
||||
renderpass_msaa = {
|
||||
attachments = (
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $output.format;
|
||||
storeOp = store;
|
||||
finalLayout = present_src_khr;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $properties.images.depth.format;
|
||||
samples = $msaaSamples;
|
||||
loadOp = clear;
|
||||
storeOp = dont_care;
|
||||
finalLayout = depth_stencil_attachment_optimal;
|
||||
},
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $swapchain.format;
|
||||
samples = $msaaSamples;
|
||||
loadOp = clear;
|
||||
storeOp = store;// dont_care?
|
||||
finalLayout = color_attachment_optimal;
|
||||
},
|
||||
);
|
||||
subpasses = (
|
||||
{
|
||||
pipelineBindPoint = graphics;
|
||||
colorAttachments = (
|
||||
{
|
||||
attachment = 2;
|
||||
layout = color_attachment_optimal;
|
||||
}
|
||||
);
|
||||
resolveAttachments = (
|
||||
{
|
||||
attachment = 0;
|
||||
layout = color_attachment_optimal;
|
||||
}
|
||||
);
|
||||
depthStencilAttachment = {
|
||||
attachment = 1;
|
||||
layout = depth_stencil_attachment_optimal;
|
||||
};
|
||||
preserveAttachments = ();
|
||||
},
|
||||
);
|
||||
dependencies = (
|
||||
{
|
||||
srcSubpass = ~0u; // external
|
||||
dstSubpass = 0;
|
||||
srcStageMask = top_of_pipe;
|
||||
dstStageMask = color_attachment_output;
|
||||
srcAccessMask = memory_read;
|
||||
dstAccessMask = color_attachment_write;
|
||||
dependencyFlags = by_region;
|
||||
},
|
||||
{
|
||||
srcSubpass = 0;
|
||||
dstSubpass = ~0u; // external
|
||||
srcStageMask = color_attachment_output;
|
||||
dstStageMask = bottom_of_pipe;
|
||||
srcAccessMask = color_attachment_write;
|
||||
dstAccessMask = memory_read;
|
||||
dependencyFlags = by_region;
|
||||
},
|
||||
);
|
||||
};
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
{
|
||||
properties = {
|
||||
color = {
|
||||
bsp = "[0.0, 0.5, 0.6, 1]";
|
||||
|
@ -1161,4 +1160,3 @@ renderpasses = {
|
|||
});
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,49 +1,47 @@
|
|||
{
|
||||
framebuffer = {
|
||||
renderPass = output;
|
||||
attachments = ($output.view);
|
||||
width = $output.extent.width;
|
||||
height = $output.extent.height;
|
||||
layers = 1;
|
||||
};
|
||||
clearValues = (
|
||||
{ color = "[0, 0, 0, 1]"; }, // output
|
||||
framebuffer = {
|
||||
renderPass = output;
|
||||
attachments = ($output.view);
|
||||
width = $output.extent.width;
|
||||
height = $output.extent.height;
|
||||
layers = 1;
|
||||
};
|
||||
clearValues = (
|
||||
{ color = "[0, 0, 0, 1]"; }, // output
|
||||
);
|
||||
attachment_template = {
|
||||
samples = 1;
|
||||
loadOp = dont_care;
|
||||
storeOp = dont_care;
|
||||
stencilLoadOp = dont_care;
|
||||
stencilStoreOp = dont_care;
|
||||
initialLayout = undefined;
|
||||
finalLayout = color_attachment_optimal;
|
||||
};
|
||||
info = {
|
||||
color = "[0.9, 0.9, 0.9, 1]";
|
||||
subpass_info = (
|
||||
{ name = compose; color = "[ 0.9, 0.9, 0.9, 1]" },
|
||||
);
|
||||
attachment_template = {
|
||||
samples = 1;
|
||||
loadOp = dont_care;
|
||||
storeOp = dont_care;
|
||||
stencilLoadOp = dont_care;
|
||||
stencilStoreOp = dont_care;
|
||||
initialLayout = undefined;
|
||||
finalLayout = color_attachment_optimal;
|
||||
};
|
||||
info = {
|
||||
color = "[0.9, 0.9, 0.9, 1]";
|
||||
subpass_info = (
|
||||
{ name = compose; color = "[ 0.9, 0.9, 0.9, 1]" },
|
||||
);
|
||||
};
|
||||
renderpass = {
|
||||
attachments = (
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $output.format;
|
||||
loadOp = clear;
|
||||
storeOp = store;
|
||||
finalLayout = present_src_khr;
|
||||
},
|
||||
);
|
||||
subpasses = (
|
||||
{ // 0 output
|
||||
pipelineBindPoint = graphics;
|
||||
colorAttachments = (
|
||||
{ // output
|
||||
attachment = 0;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
};
|
||||
}
|
||||
};
|
||||
renderpass = {
|
||||
attachments = (
|
||||
{
|
||||
@inherit = $properties.attachment_template;
|
||||
format = $output.format;
|
||||
loadOp = clear;
|
||||
storeOp = store;
|
||||
finalLayout = present_src_khr;
|
||||
},
|
||||
);
|
||||
subpasses = (
|
||||
{ // 0 output
|
||||
pipelineBindPoint = graphics;
|
||||
colorAttachments = (
|
||||
{ // output
|
||||
attachment = 0;
|
||||
layout = color_attachment_optimal;
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
};
|
||||
|
|
|
@ -1,52 +1,50 @@
|
|||
{
|
||||
clearValues = (
|
||||
{ depthStencil = { depth = 1; stencil = 0; }; },
|
||||
clearValues = (
|
||||
{ depthStencil = { depth = 1; stencil = 0; }; },
|
||||
);
|
||||
info = {
|
||||
color = "[0.2, 0.2, 0.2, 1]";
|
||||
subpass_info = (
|
||||
{ name = depth; color = "[ 0.5, 0.5, 0.5, 1]" },
|
||||
);
|
||||
info = {
|
||||
color = "[0.2, 0.2, 0.2, 1]";
|
||||
subpass_info = (
|
||||
{ name = depth; color = "[ 0.5, 0.5, 0.5, 1]" },
|
||||
);
|
||||
};
|
||||
renderpass_base = {
|
||||
attachments = (
|
||||
{
|
||||
format = $output.format;
|
||||
samples = 1;
|
||||
loadOp = dont_care;
|
||||
storeOp = store;
|
||||
stencilLoadOp = dont_care;
|
||||
stencilStoreOp = dont_care;
|
||||
initialLayout = undefined;
|
||||
finalLayout = shader_read_only_optimal;
|
||||
},
|
||||
);
|
||||
subpasses = (
|
||||
{ // 0 depth
|
||||
pipelineBindPoint = graphics;
|
||||
depthStencilAttachment = {
|
||||
attachment = 0;
|
||||
layout = depth_stencil_attachment_optimal;
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
renderpass_6 = {
|
||||
@inherit = $properties.renderpass_base;
|
||||
@next = (VkRenderPassMultiviewCreateInfo, {
|
||||
viewMasks = (0x0000003fu);
|
||||
});
|
||||
};
|
||||
renderpass_4 = {
|
||||
@inherit = $properties.renderpass_base;
|
||||
@next = (VkRenderPassMultiviewCreateInfo, {
|
||||
viewMasks = (0x0000000fu);
|
||||
});
|
||||
};
|
||||
renderpass_1 = {
|
||||
@inherit = $properties.renderpass_base;
|
||||
@next = (VkRenderPassMultiviewCreateInfo, {
|
||||
viewMasks = (0x00000001u);
|
||||
});
|
||||
};
|
||||
}
|
||||
};
|
||||
renderpass_base = {
|
||||
attachments = (
|
||||
{
|
||||
format = $output.format;
|
||||
samples = 1;
|
||||
loadOp = dont_care;
|
||||
storeOp = store;
|
||||
stencilLoadOp = dont_care;
|
||||
stencilStoreOp = dont_care;
|
||||
initialLayout = undefined;
|
||||
finalLayout = shader_read_only_optimal;
|
||||
},
|
||||
);
|
||||
subpasses = (
|
||||
{ // 0 depth
|
||||
pipelineBindPoint = graphics;
|
||||
depthStencilAttachment = {
|
||||
attachment = 0;
|
||||
layout = depth_stencil_attachment_optimal;
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
renderpass_6 = {
|
||||
@inherit = $properties.renderpass_base;
|
||||
@next = (VkRenderPassMultiviewCreateInfo, {
|
||||
viewMasks = (0x0000003fu);
|
||||
});
|
||||
};
|
||||
renderpass_4 = {
|
||||
@inherit = $properties.renderpass_base;
|
||||
@next = (VkRenderPassMultiviewCreateInfo, {
|
||||
viewMasks = (0x0000000fu);
|
||||
});
|
||||
};
|
||||
renderpass_1 = {
|
||||
@inherit = $properties.renderpass_base;
|
||||
@next = (VkRenderPassMultiviewCreateInfo, {
|
||||
viewMasks = (0x00000001u);
|
||||
});
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue