mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-22 20:41:20 +00:00
[vulkan] Clean up the old config files
This commit is contained in:
parent
17ee6911f9
commit
05c17d7247
9 changed files with 0 additions and 2464 deletions
|
@ -191,24 +191,10 @@ libs_video_renderer_librender_sw_la_SOURCES = \
|
|||
libs/video/renderer/sw/transform.S \
|
||||
libs/video/renderer/sw/vid_common_sw.c
|
||||
|
||||
pl_quake_def_src = libs/video/renderer/vulkan/pl_quake_def.plist
|
||||
pl_quake_def_gen = libs/video/renderer/vulkan/pl_quake_def.plc
|
||||
pl_output_src = libs/video/renderer/vulkan/pl_output.plist
|
||||
pl_output_gen = libs/video/renderer/vulkan/pl_output.plc
|
||||
rp_defcube_src = libs/video/renderer/vulkan/rp_defcube.plist
|
||||
rp_defcube_gen = libs/video/renderer/vulkan/rp_defcube.plc
|
||||
rp_deferred_src = libs/video/renderer/vulkan/rp_deferred.plist
|
||||
rp_deferred_gen = libs/video/renderer/vulkan/rp_deferred.plc
|
||||
rp_forward_src = libs/video/renderer/vulkan/rp_forward.plist
|
||||
rp_forward_gen = libs/video/renderer/vulkan/rp_forward.plc
|
||||
rp_main_def_src = libs/video/renderer/vulkan/rp_main_def.plist
|
||||
rp_main_def_gen = libs/video/renderer/vulkan/rp_main_def.plc
|
||||
smp_quake_src = libs/video/renderer/vulkan/smp_quake.plist
|
||||
smp_quake_gen = libs/video/renderer/vulkan/smp_quake.plc
|
||||
rp_output_src = libs/video/renderer/vulkan/rp_output.plist
|
||||
rp_output_gen = libs/video/renderer/vulkan/rp_output.plc
|
||||
rp_shadow_src = libs/video/renderer/vulkan/rp_shadow.plist
|
||||
rp_shadow_gen = libs/video/renderer/vulkan/rp_shadow.plc
|
||||
|
||||
video_renderer_vulkan_libs = \
|
||||
libs/video/renderer/librender_vulkan.la \
|
||||
|
@ -266,15 +252,8 @@ libs_video_renderer_librender_vulkan_la_SOURCES = \
|
|||
libs/video/renderer/vulkan/vkparse.lo: \
|
||||
libs/video/renderer/vulkan/vkparse.c \
|
||||
$(vkparse_src) \
|
||||
$(pl_quake_def_gen) \
|
||||
$(pl_output_gen) \
|
||||
${rp_defcube_gen} \
|
||||
${rp_deferred_gen} \
|
||||
$(rp_forward_gen) \
|
||||
$(rp_main_def_gen) \
|
||||
$(smp_quake_gen)
|
||||
$(rp_output_gen) \
|
||||
${rp_shadow_gen}
|
||||
|
||||
libs/video/renderer/vulkan/shader.lo: \
|
||||
libs/video/renderer/vulkan/shader.c \
|
||||
|
@ -529,15 +508,8 @@ BUILT_SOURCES += $(shader_gen)
|
|||
EXTRA_DIST += \
|
||||
libs/video/renderer/vulkan/vkparse.plist \
|
||||
libs/video/renderer/vulkan/vkparse.h \
|
||||
$(rp_defcube_src) \
|
||||
$(rp_deferred_src) \
|
||||
$(rp_forward_src) \
|
||||
$(rp_main_def_src) \
|
||||
$(smp_quake_src) \
|
||||
$(rp_output_src) \
|
||||
$(rp_shadow_src) \
|
||||
$(pl_quake_def_src) \
|
||||
$(pl_output_src) \
|
||||
$(oit_blend) \
|
||||
$(oit_store) \
|
||||
$(oit_h) \
|
||||
|
|
|
@ -1,258 +0,0 @@
|
|||
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 = (
|
||||
{
|
||||
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,
|
||||
$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;
|
||||
};
|
||||
};
|
File diff suppressed because it is too large
Load diff
|
@ -1,328 +0,0 @@
|
|||
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);
|
||||
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]" },
|
||||
);
|
||||
};
|
||||
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 = 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,317 +0,0 @@
|
|||
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);
|
||||
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]" },
|
||||
);
|
||||
};
|
||||
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 = 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,197 +0,0 @@
|
|||
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;
|
||||
};
|
||||
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;
|
||||
};
|
||||
};
|
||||
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 = 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;
|
||||
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;
|
||||
},
|
||||
);
|
||||
};
|
|
@ -1,47 +0,0 @@
|
|||
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]" },
|
||||
);
|
||||
};
|
||||
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,50 +0,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]" },
|
||||
);
|
||||
};
|
||||
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);
|
||||
});
|
||||
};
|
|
@ -1838,30 +1838,6 @@ Vulkan_Init_Cvars (void)
|
|||
}
|
||||
|
||||
static exprsym_t builtin_plist_syms[] = {
|
||||
{ .name = "quake_deferred",
|
||||
.value = (void *)
|
||||
#include "libs/video/renderer/vulkan/pl_quake_def.plc"
|
||||
},
|
||||
{ .name = "qf_output",
|
||||
.value = (void *)
|
||||
#include "libs/video/renderer/vulkan/pl_output.plc"
|
||||
},
|
||||
{ .name = "defcube",
|
||||
.value = (void *)
|
||||
#include "libs/video/renderer/vulkan/rp_defcube.plc"
|
||||
},
|
||||
{ .name = "deferred",
|
||||
.value = (void *)
|
||||
#include "libs/video/renderer/vulkan/rp_deferred.plc"
|
||||
},
|
||||
{ .name = "shadow",
|
||||
.value = (void *)
|
||||
#include "libs/video/renderer/vulkan/rp_shadow.plc"
|
||||
},
|
||||
{ .name = "forward",
|
||||
.value = (void *)
|
||||
#include "libs/video/renderer/vulkan/rp_forward.plc"
|
||||
},
|
||||
{ .name = "main_def",
|
||||
.value = (void *)
|
||||
#include "libs/video/renderer/vulkan/rp_main_def.plc"
|
||||
|
@ -1870,10 +1846,6 @@ static exprsym_t builtin_plist_syms[] = {
|
|||
.value = (void *)
|
||||
#include "libs/video/renderer/vulkan/smp_quake.plc"
|
||||
},
|
||||
{ .name = "output",
|
||||
.value = (void *)
|
||||
#include "libs/video/renderer/vulkan/rp_output.plc"
|
||||
},
|
||||
{}
|
||||
};
|
||||
static plitem_t **builtin_plists;
|
||||
|
|
Loading…
Reference in a new issue