mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-15 01:11:27 +00:00
5eb1afdcb3
The prototypes for handle parsers needed to be changes because it turned out "single" was inappropriate for handles as "single" allocates memory for the parsed object, but handles must be written directly.
322 lines
8.5 KiB
Text
322 lines
8.5 KiB
Text
{
|
|
search = (
|
|
VkAttachmentDescription,
|
|
VkSubpassDescription,
|
|
VkSubpassDependency,
|
|
VkSpecializationInfo,
|
|
VkPipelineShaderStageCreateInfo,
|
|
VkPipelineVertexInputStateCreateInfo,
|
|
VkPipelineInputAssemblyStateCreateInfo,
|
|
VkPipelineViewportStateCreateInfo,
|
|
VkPipelineRasterizationStateCreateInfo,
|
|
VkPipelineMultisampleStateCreateInfo,
|
|
VkPipelineDepthStencilStateCreateInfo,
|
|
VkPipelineColorBlendStateCreateInfo,
|
|
VkPipelineDynamicStateCreateInfo,
|
|
VkDescriptorSetLayoutBinding,
|
|
VkDescriptorSetLayoutCreateInfo,
|
|
VkPushConstantRange,
|
|
VkPipelineLayoutCreateInfo,
|
|
VkGraphicsPipelineCreateInfo,
|
|
qfv_swapchain_t,
|
|
);
|
|
handles = {
|
|
VkShaderModule = {
|
|
symtab = shaderModules;
|
|
class = "shader module";
|
|
custom = parse_VkShaderModule_resource;
|
|
};
|
|
VkDescriptorSetLayout = {
|
|
symtab = setLayouts;
|
|
class = "set layout";
|
|
create = vkCreateDescriptorSetLayout;
|
|
};
|
|
VkPipelineLayout = {
|
|
symtab = pipelineLayouts;
|
|
class = "pipeline layout";
|
|
create = vkCreatePipelineLayout;
|
|
};
|
|
};
|
|
resources = (
|
|
{
|
|
name = shaderModules;
|
|
parse_type = QFString;
|
|
parser = parse_VkShaderModule_handleref;
|
|
type = handleref_t;
|
|
table = shaderModules;
|
|
},
|
|
{
|
|
name = setLayouts;
|
|
parse_type = QFDictionary;
|
|
parser = parse_VkDescriptorSetLayout_handleref;
|
|
type = handleref_t;
|
|
table = setLayouts;
|
|
},
|
|
{
|
|
name = pipelineLayouts;
|
|
parse_type = QFDictionary;
|
|
parser = parse_VkPipelineLayout_handleref;
|
|
type = handleref_t;
|
|
table = pipelineLayouts;
|
|
},
|
|
);
|
|
parse = {
|
|
qfv_swapchain_s = {
|
|
.name = qfv_swapchain_t;
|
|
format = auto;
|
|
};
|
|
VkSubpassDescription = {
|
|
flags = auto;
|
|
pipelineBindPoint = auto;
|
|
inputAttachments = {
|
|
type = (array, VkAttachmentReference);
|
|
size = inputAttachmentCount;
|
|
values = pInputAttachments;
|
|
};
|
|
colorAttachments = {
|
|
type = (array, VkAttachmentReference);
|
|
size = colorAttachmentCount;
|
|
values = pColorAttachments;
|
|
};
|
|
resolveAttachments = {
|
|
type = (array, VkAttachmentReference);
|
|
values = pResolveAttachments;
|
|
matchSize = colorAttachments;
|
|
};
|
|
depthStencilAttachment = {
|
|
type = (single, VkAttachmentReference);
|
|
value = pDepthStencilAttachment;
|
|
};
|
|
preserveAttachments = {
|
|
type = (array, uint32_t);
|
|
size = preserveAttachmentCount;
|
|
values = pPreserveAttachments;
|
|
};
|
|
};
|
|
VkRenderPassCreateInfo = {
|
|
//flags = auto; reserved for future use (Bits enum does not exist)
|
|
attachments = {
|
|
type = (array, VkAttachmentDescription);
|
|
size = attachmentCount;
|
|
values = pAttachments;
|
|
};
|
|
subpasses = {
|
|
type = (array, VkSubpassDescription);
|
|
size = subpassCount;
|
|
values = pSubpasses;
|
|
};
|
|
dependencies = {
|
|
type = (array, VkSubpassDependency);
|
|
size = dependencyCount;
|
|
values = pDependencies;
|
|
};
|
|
};
|
|
VkSpecializationInfo = {
|
|
mapEntries = {
|
|
type = (array, VkSpecializationMapEntry);
|
|
size = mapEntryCount;
|
|
values = pMapEntries;
|
|
};
|
|
data = {
|
|
type = data;
|
|
size = dataSize;
|
|
data = pData;
|
|
};
|
|
};
|
|
VkPipelineShaderStageCreateInfo = {
|
|
//flags = auto; reserved for future use (Bits enum does not exist)
|
|
stage = auto;
|
|
name = {
|
|
type = string;
|
|
string = pName;
|
|
};
|
|
module = {
|
|
type = (custom, QFString, parse_VkShaderModule);
|
|
fields = (module);
|
|
};
|
|
specializationInfo = {
|
|
type = (single, VkSpecializationInfo);
|
|
value = pSpecializationInfo;
|
|
};
|
|
};
|
|
VkShaderModuleCreateInfo = skip;
|
|
VkDescriptorSetLayoutBinding = {
|
|
binding = auto;
|
|
descriptorType = auto;
|
|
descriptorCount = auto;
|
|
stageFlags = auto;
|
|
// skip pImmutableSamplers (default to 0) until I know how it works
|
|
};
|
|
VkDescriptorSetLayoutCreateInfo = {
|
|
flags = auto;
|
|
bindings = {
|
|
type = (array, VkDescriptorSetLayoutBinding);
|
|
size = bindingCount;
|
|
values = pBindings;
|
|
};
|
|
};
|
|
VkPipelineVertexInputStateCreateInfo = {
|
|
//flags = auto; reserved for future use (Bits enum does not exist)
|
|
bindings = {
|
|
type = (array, VkVertexInputBindingDescription);
|
|
size = vertexBindingDescriptionCount;
|
|
values = pVertexBindingDescriptions;
|
|
};
|
|
attributes = {
|
|
type = (array, VkVertexInputAttributeDescription);
|
|
size = vertexAttributeDescriptionCount;
|
|
values = pVertexAttributeDescriptions;
|
|
};
|
|
};
|
|
VkPipelineInputAssemblyStateCreateInfo = {
|
|
//flags = auto; reserved for future use (Bits enum does not exist)
|
|
topology = auto;
|
|
primitiveRestartEnable = auto;
|
|
};
|
|
VkPipelineViewportStateCreateInfo = {
|
|
//flags = auto; reserved for future use (Bits enum does not exist)
|
|
//FIXME redo as one array
|
|
viewports = {
|
|
type = (array, VkViewport);
|
|
size = viewportCount;
|
|
values = pViewports;
|
|
};
|
|
scissors = {
|
|
type = (array, VkRect2D);
|
|
size = scissorCount;
|
|
values = pScissors;
|
|
};
|
|
};
|
|
VkPipelineRasterizationStateCreateInfo = {
|
|
//flags = auto; reserved for future use (Bits enum does not exist)
|
|
depthClampEnable = auto;
|
|
rasterizerDiscardEnable = auto;
|
|
polygonMode = auto;
|
|
cullMode = auto;
|
|
frontFace = auto;
|
|
depthBiasEnable = auto;
|
|
depthBiasConstantFactor = auto;
|
|
depthBiasClamp = auto;
|
|
depthBiasSlopeFactor = auto;
|
|
lineWidth = auto;
|
|
};
|
|
VkPipelineMultisampleStateCreateInfo = {
|
|
//flags = auto; reserved for future use (Bits enum does not exist)
|
|
rasterizationSamples = auto;
|
|
sampleShadingEnable = auto;
|
|
minSampleShading = auto;
|
|
//pSampleMask = auto; FIXME disabled until correct size is known
|
|
alphaToCoverageEnable = auto;
|
|
alphaToOneEnable = auto;
|
|
};
|
|
VkPipelineDepthStencilStateCreateInfo = {
|
|
//flags = auto; reserved for future use (Bits enum does not exist)
|
|
depthTestEnable = auto;
|
|
depthWriteEnable = auto;
|
|
depthCompareOp = auto;
|
|
depthBoundsTestEnable = auto;
|
|
stencilTestEnable = auto;
|
|
front = auto;
|
|
back = auto;
|
|
minDepthBounds = auto;
|
|
maxDepthBounds = auto;
|
|
};
|
|
VkPipelineColorBlendStateCreateInfo = {
|
|
//flags = auto; reserved for future use (Bits enum does not exist)
|
|
logicOpEnable = auto;
|
|
logicOp = auto;
|
|
attachments = {
|
|
type = (array, VkPipelineColorBlendAttachmentState);
|
|
size = attachmentCount;
|
|
values = pAttachments;
|
|
};
|
|
blendConstants = {
|
|
type = (custom, QFString, parse_RGBA);
|
|
fields = (blendConstants);
|
|
};
|
|
};
|
|
VkPipelineDynamicStateCreateInfo = {
|
|
//flags = auto; reserved for future use (Bits enum does not exist)
|
|
dynamicState = {
|
|
type = (array, VkDynamicState);
|
|
size = dynamicStateCount;
|
|
values = pDynamicStates;
|
|
};
|
|
};
|
|
VkPipelineLayoutCreateInfo = {
|
|
//flags = auto; reserved for future use (Bits enum does not exist)
|
|
setLayouts = {
|
|
type = (array, {
|
|
parse_type = (QFDictionary, QFString);
|
|
type = VkDescriptorSetLayout;
|
|
parser = parse_VkDescriptorSetLayout_array;
|
|
});
|
|
size = setLayoutCount;
|
|
values = pSetLayouts;
|
|
};
|
|
pushConstantRanges = {
|
|
type = (array, VkPushConstantRange);
|
|
size = pushConstantRangeCount;
|
|
values = pPushConstantRanges;
|
|
};
|
|
};
|
|
VkPipelineTessellationStateCreateInfo = {
|
|
//flags = auto; reserved for future use (Bits enum does not exist)
|
|
patchControlPoints = auto;
|
|
};
|
|
VkGraphicsPipelineCreateInfo = {
|
|
flags = auto;
|
|
stages = {
|
|
type = (array, VkPipelineShaderStageCreateInfo);
|
|
size = stageCount;
|
|
values = pStages;
|
|
};
|
|
vertexInput = {
|
|
type = (single, VkPipelineVertexInputStateCreateInfo);
|
|
value = pVertexInputState;
|
|
};
|
|
inputAssembly = {
|
|
type = (single, VkPipelineInputAssemblyStateCreateInfo);
|
|
value = pInputAssemblyState;
|
|
};
|
|
tessellation = {
|
|
type = (single, VkPipelineTessellationStateCreateInfo);
|
|
value = pTessellationState;
|
|
};
|
|
viewport = {
|
|
type = (single, VkPipelineViewportStateCreateInfo);
|
|
value = pViewportState;
|
|
};
|
|
rasterization = {
|
|
type = (single, VkPipelineRasterizationStateCreateInfo);
|
|
value = pRasterizationState;
|
|
};
|
|
multisample = {
|
|
type = (single, VkPipelineMultisampleStateCreateInfo);
|
|
value = pMultisampleState;
|
|
};
|
|
depthStencil = {
|
|
type = (single, VkPipelineDepthStencilStateCreateInfo);
|
|
value = pDepthStencilState;
|
|
};
|
|
colorBlend = {
|
|
type = (single, VkPipelineColorBlendStateCreateInfo);
|
|
value = pColorBlendState;
|
|
};
|
|
dynamic = {
|
|
type = (single, VkPipelineDynamicStateCreateInfo);
|
|
value = pDynamicState;
|
|
};
|
|
layout = {
|
|
type = (custom, (QFDictionary, QFString),
|
|
parse_VkPipelineLayout);
|
|
fields = (layout);
|
|
};
|
|
basePipelineHandle = {
|
|
type = (custom, QFString, parse_BasePipeline);
|
|
fields = (basePipelineHandle);
|
|
};
|
|
basePipelineIndex = auto;
|
|
}
|
|
}
|
|
}
|