mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-05 01:24:14 +01:00
[dxvk] Support fomatting more Vulkan enum names
This commit is contained in:
parent
02aa1736f5
commit
021aff1fc0
@ -313,6 +313,105 @@ std::ostream& operator << (std::ostream& os, VkColorSpaceKHR e) {
|
||||
}
|
||||
|
||||
|
||||
std::ostream& operator << (std::ostream& os, VkFrontFace e) {
|
||||
switch (e) {
|
||||
ENUM_NAME(VK_FRONT_FACE_COUNTER_CLOCKWISE);
|
||||
ENUM_NAME(VK_FRONT_FACE_CLOCKWISE);
|
||||
ENUM_DEFAULT(e);
|
||||
}
|
||||
return os;
|
||||
}
|
||||
|
||||
std::ostream& operator << (std::ostream& os, VkPolygonMode e) {
|
||||
switch (e) {
|
||||
ENUM_NAME(VK_POLYGON_MODE_FILL);
|
||||
ENUM_NAME(VK_POLYGON_MODE_LINE);
|
||||
ENUM_NAME(VK_POLYGON_MODE_POINT);
|
||||
ENUM_DEFAULT(e);
|
||||
}
|
||||
return os;
|
||||
}
|
||||
|
||||
std::ostream& operator << (std::ostream& os, VkBlendFactor e) {
|
||||
switch (e) {
|
||||
ENUM_NAME(VK_BLEND_FACTOR_ZERO);
|
||||
ENUM_NAME(VK_BLEND_FACTOR_ONE);
|
||||
ENUM_NAME(VK_BLEND_FACTOR_SRC_COLOR);
|
||||
ENUM_NAME(VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR);
|
||||
ENUM_NAME(VK_BLEND_FACTOR_DST_COLOR);
|
||||
ENUM_NAME(VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR);
|
||||
ENUM_NAME(VK_BLEND_FACTOR_SRC_ALPHA);
|
||||
ENUM_NAME(VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA);
|
||||
ENUM_NAME(VK_BLEND_FACTOR_DST_ALPHA);
|
||||
ENUM_NAME(VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA);
|
||||
ENUM_NAME(VK_BLEND_FACTOR_CONSTANT_COLOR);
|
||||
ENUM_NAME(VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR);
|
||||
ENUM_NAME(VK_BLEND_FACTOR_CONSTANT_ALPHA);
|
||||
ENUM_NAME(VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA);
|
||||
ENUM_NAME(VK_BLEND_FACTOR_SRC_ALPHA_SATURATE);
|
||||
ENUM_NAME(VK_BLEND_FACTOR_SRC1_COLOR);
|
||||
ENUM_NAME(VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR);
|
||||
ENUM_NAME(VK_BLEND_FACTOR_SRC1_ALPHA);
|
||||
ENUM_NAME(VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA);
|
||||
ENUM_DEFAULT(e);
|
||||
}
|
||||
return os;
|
||||
}
|
||||
|
||||
std::ostream& operator << (std::ostream& os, VkBlendOp e) {
|
||||
switch (e) {
|
||||
ENUM_NAME(VK_BLEND_OP_ADD);
|
||||
ENUM_NAME(VK_BLEND_OP_SUBTRACT);
|
||||
ENUM_NAME(VK_BLEND_OP_REVERSE_SUBTRACT);
|
||||
ENUM_NAME(VK_BLEND_OP_MIN);
|
||||
ENUM_NAME(VK_BLEND_OP_MAX);
|
||||
ENUM_DEFAULT(e);
|
||||
}
|
||||
return os;
|
||||
}
|
||||
|
||||
std::ostream& operator << (std::ostream& os, VkCompareOp e) {
|
||||
switch (e) {
|
||||
ENUM_NAME(VK_COMPARE_OP_NEVER);
|
||||
ENUM_NAME(VK_COMPARE_OP_LESS);
|
||||
ENUM_NAME(VK_COMPARE_OP_EQUAL);
|
||||
ENUM_NAME(VK_COMPARE_OP_LESS_OR_EQUAL);
|
||||
ENUM_NAME(VK_COMPARE_OP_GREATER);
|
||||
ENUM_NAME(VK_COMPARE_OP_NOT_EQUAL);
|
||||
ENUM_NAME(VK_COMPARE_OP_GREATER_OR_EQUAL);
|
||||
ENUM_NAME(VK_COMPARE_OP_ALWAYS);
|
||||
ENUM_DEFAULT(e);
|
||||
}
|
||||
return os;
|
||||
}
|
||||
|
||||
std::ostream& operator << (std::ostream& os, VkVertexInputRate e) {
|
||||
switch (e) {
|
||||
ENUM_NAME(VK_VERTEX_INPUT_RATE_VERTEX);
|
||||
ENUM_NAME(VK_VERTEX_INPUT_RATE_INSTANCE);
|
||||
ENUM_DEFAULT(e);
|
||||
}
|
||||
return os;
|
||||
}
|
||||
|
||||
std::ostream& operator << (std::ostream& os, VkPrimitiveTopology e) {
|
||||
switch (e) {
|
||||
ENUM_NAME(VK_PRIMITIVE_TOPOLOGY_POINT_LIST);
|
||||
ENUM_NAME(VK_PRIMITIVE_TOPOLOGY_LINE_LIST);
|
||||
ENUM_NAME(VK_PRIMITIVE_TOPOLOGY_LINE_STRIP);
|
||||
ENUM_NAME(VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST);
|
||||
ENUM_NAME(VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP);
|
||||
ENUM_NAME(VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN);
|
||||
ENUM_NAME(VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY);
|
||||
ENUM_NAME(VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY);
|
||||
ENUM_NAME(VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY);
|
||||
ENUM_NAME(VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY);
|
||||
ENUM_NAME(VK_PRIMITIVE_TOPOLOGY_PATCH_LIST);
|
||||
ENUM_DEFAULT(e);
|
||||
}
|
||||
return os;
|
||||
}
|
||||
|
||||
std::ostream& operator << (std::ostream& os, VkOffset2D e) {
|
||||
return os << "(" << e.x << "," << e.y << ")";
|
||||
}
|
||||
|
@ -15,6 +15,13 @@ std::ostream& operator << (std::ostream& os, VkImageLayout e);
|
||||
std::ostream& operator << (std::ostream& os, VkImageViewType e);
|
||||
std::ostream& operator << (std::ostream& os, VkPresentModeKHR e);
|
||||
std::ostream& operator << (std::ostream& os, VkColorSpaceKHR e);
|
||||
std::ostream& operator << (std::ostream& os, VkFrontFace e);
|
||||
std::ostream& operator << (std::ostream& os, VkPolygonMode e);
|
||||
std::ostream& operator << (std::ostream& os, VkBlendFactor e);
|
||||
std::ostream& operator << (std::ostream& os, VkBlendOp e);
|
||||
std::ostream& operator << (std::ostream& os, VkCompareOp e);
|
||||
std::ostream& operator << (std::ostream& os, VkVertexInputRate e);
|
||||
std::ostream& operator << (std::ostream& os, VkPrimitiveTopology e);
|
||||
std::ostream& operator << (std::ostream& os, VkOffset2D e);
|
||||
std::ostream& operator << (std::ostream& os, VkOffset3D e);
|
||||
std::ostream& operator << (std::ostream& os, VkExtent2D e);
|
||||
|
Loading…
Reference in New Issue
Block a user