mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 02:11:19 +00:00
[vulkan] Parse VkBool32 correctly as bool type
This makes it much clearer whether something is just a flag or an index of some sort.
This commit is contained in:
parent
bb4ca7683e
commit
03f614ccb9
4 changed files with 46 additions and 19 deletions
|
@ -19,14 +19,14 @@
|
|||
addressModeV = clamp_to_edge;
|
||||
addressModeW = clamp_to_edge;
|
||||
mipLodBias = 0;
|
||||
anisotropyEnable = 0;//FIXME false!!!
|
||||
anisotropyEnable = false;
|
||||
maxAnisotropy = 0;
|
||||
compareEnable = 0;//FIXME false!!!
|
||||
compareEnable = false;
|
||||
compareOp = always;
|
||||
minLod = 0;
|
||||
maxLod = 0;
|
||||
borderColor = float_transparent_black;
|
||||
unnormalizedCoordinates = 1;//FIXME true!!!
|
||||
unnormalizedCoordinates = true;
|
||||
};
|
||||
};
|
||||
descriptorPools = {
|
||||
|
@ -132,7 +132,7 @@
|
|||
};
|
||||
inputAssembly = {
|
||||
topology = triangle_strip;
|
||||
primitiveRestartEnable = 1;
|
||||
primitiveRestartEnable = true;
|
||||
};
|
||||
viewport = {
|
||||
viewports = (
|
||||
|
@ -150,32 +150,32 @@
|
|||
);
|
||||
};
|
||||
rasterization = {
|
||||
depthClampEnable = 0;
|
||||
rasterizerDiscardEnable = 0;
|
||||
depthClampEnable = false;
|
||||
rasterizerDiscardEnable = false;
|
||||
polygonMode = fill;
|
||||
cullMode = back;
|
||||
frontFace = counter_clockwise;
|
||||
depthBiasEnable = 0;
|
||||
depthBiasEnable = false;
|
||||
lineWidth = 1;
|
||||
};
|
||||
multisample = {
|
||||
rasterizationSamples = $msaaSamples;
|
||||
sampleShadingEnable = 0;
|
||||
sampleShadingEnable = false;
|
||||
minSampleShading = 0.5f;
|
||||
alphaToCoverageEnable = 0;
|
||||
alphaToOneEnable = 0;
|
||||
alphaToCoverageEnable = false;
|
||||
alphaToOneEnable = false;
|
||||
};
|
||||
depthStencil = {
|
||||
depthTestEnable = 1;
|
||||
depthWriteEnable = 1;
|
||||
depthTestEnable = true;
|
||||
depthWriteEnable = true;
|
||||
depthCompareOp = less;
|
||||
depthBoundsTestEnable = 0;
|
||||
stencilTestEnable = 0;
|
||||
depthBoundsTestEnable = false;
|
||||
stencilTestEnable = false;
|
||||
};
|
||||
colorBlend = {
|
||||
logicOpEnable = 0;
|
||||
logicOpEnable = false;
|
||||
attachments = ({
|
||||
blendEnable = 0;
|
||||
blendEnable = false;
|
||||
srcColorBlendFactor = src_color;
|
||||
dstColorBlendFactor = zero;
|
||||
colorBlendOp = add;
|
||||
|
|
|
@ -28,14 +28,16 @@
|
|||
[enumObj addToQueue];
|
||||
}
|
||||
} else if (name == "VkBool32") {
|
||||
// drop
|
||||
id enumObj = [(id) Hash_Find (available_types, name) resolveType];
|
||||
[enumObj addToQueue];
|
||||
} else if ([alias class] == [Enum class]
|
||||
|| [alias class] == [Struct class]) {
|
||||
[alias addToQueue];
|
||||
} else if (alias.type.meta == ty_basic && alias.type.type == ev_pointer) {
|
||||
Type *type = [Type findType:alias.type.fldptr.aux_type];
|
||||
if (!type) {
|
||||
// pointer to opaque struct. Probably VK_DEFINE_NON_DISPATCHABLE_HANDLE or VK_DEFINE_HANDLE
|
||||
// pointer to opaque struct. Probably
|
||||
// VK_DEFINE_NON_DISPATCHABLE_HANDLE or VK_DEFINE_HANDLE
|
||||
string createInfo = name + "CreateInfo";
|
||||
id structObj = (id) Hash_Find (available_types, createInfo);
|
||||
if (structObj) {
|
||||
|
@ -62,6 +64,10 @@
|
|||
return [enumObj cexprType];
|
||||
}
|
||||
}
|
||||
if (name == "VkBool32") {
|
||||
id enumObj = [(id) Hash_Find (available_types, name) resolveType];
|
||||
return [enumObj cexprType];
|
||||
}
|
||||
if (name == "uint32_t") {
|
||||
return "cexpr_uint";
|
||||
}
|
||||
|
@ -83,6 +89,10 @@
|
|||
return [enumObj parseType];
|
||||
}
|
||||
}
|
||||
if (name == "VkBool32") {
|
||||
id enumObj = [(id) Hash_Find (available_types, name) resolveType];
|
||||
return [enumObj parseType];
|
||||
}
|
||||
if (name == "uint32_t" || name == "size_t") {
|
||||
return "QFString";
|
||||
}
|
||||
|
@ -101,6 +111,10 @@
|
|||
return [enumObj parseFunc];
|
||||
}
|
||||
}
|
||||
if (name == "VkBool32") {
|
||||
id enumObj = [(id) Hash_Find (available_types, name) resolveType];
|
||||
return [enumObj parseFunc];
|
||||
}
|
||||
if (name == "uint32_t") {
|
||||
return "parse_uint32_t";
|
||||
}
|
||||
|
@ -119,6 +133,10 @@
|
|||
return [enumObj parseData];
|
||||
}
|
||||
}
|
||||
if (name == "VkBool32") {
|
||||
id enumObj = [(id) Hash_Find (available_types, name) resolveType];
|
||||
return [enumObj parseData];
|
||||
}
|
||||
if (name == "uint32_t" || name == "size_t") {
|
||||
return "0";
|
||||
}
|
||||
|
|
|
@ -3,6 +3,12 @@
|
|||
#include "vkenum.h"
|
||||
#include "vkgen.h"
|
||||
|
||||
typedef enum VkBool32 {
|
||||
VK_FALSE,
|
||||
VK_TRUE,
|
||||
VK_MAX_ENUM = VK_TRUE
|
||||
} VkBool32;
|
||||
|
||||
@implementation Enum
|
||||
-(void)process
|
||||
{
|
||||
|
|
|
@ -117,7 +117,10 @@ scan_types (void)
|
|||
string tag = str_mid(type.strct.tag, 4);
|
||||
Type *avail_type = [Type fromType: type];
|
||||
if (avail_type) {
|
||||
Hash_Add (available_types, avail_type);
|
||||
if (!Hash_Find (available_types, [avail_type name])) {
|
||||
printf ("scan: %s %s\n", tag, [avail_type name]);
|
||||
Hash_Add (available_types, avail_type);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue