diff options
| author | Gangzheng Tong <tonggangzheng@gmail.com> | 2025-06-18 10:38:31 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-18 17:38:31 +0000 |
| commit | 3822f9243f7b80be4c47318cf3d0b8d9800e67dd (patch) | |
| tree | 2a0f92310625b7d83fccaef205087579f292281a /tools/render-test/shader-input-layout.cpp | |
| parent | 63ca2325d7f6afdbf07e8f00975fab01ec516302 (diff) | |
Fix additional VVL violations (#7377)
* fix: add sampleCount and mipMaps to st2DMS_f32v4
Fix VUID-VkImageCreateInfo-samples-02257:
The Vulkan spec states: If an OpTypeImage has an MS operand 1,
its bound image must not have been created with
VkImageCreateInfo::samples as VK_SAMPLE_COUNT_1_BIT
* Fix VUID-VkShaderModuleCreateInfo-pCode-08740
Rename VK_KHR_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME
to VK_NV_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME
* fix: add sampleCount and mipMaps to st2DMS_f32v4
Fix VUID-VkImageCreateInfo-samples-02257:
The Vulkan spec states: If an OpTypeImage has an MS operand 1,
its bound image must not have been created with
VkImageCreateInfo::samples as VK_SAMPLE_COUNT_1_BIT
* Fix VUID-VkShaderModuleCreateInfo-pCode-08740
Rename VK_KHR_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME
to VK_NV_COMPUTE_SHADER_DERIVATIVES_EXTENSION_NAME
* Fix VUID-vkCmdDispatch-None-06479
Use correct format for combined depth texture.
* Fix VUID-vkCmdDispatch-format-07753 by setting format
Parse filtering mode for sampler because the RGBA8* formats do not
support linear filtering
* Create MS texture type for sample count > 1
* Use different texture formats for depth compare and gather ops
* Use clearTexture for init the data for MS textures
Diffstat (limited to 'tools/render-test/shader-input-layout.cpp')
| -rw-r--r-- | tools/render-test/shader-input-layout.cpp | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/tools/render-test/shader-input-layout.cpp b/tools/render-test/shader-input-layout.cpp index ab9ed3c7b..bb213cdaa 100644 --- a/tools/render-test/shader-input-layout.cpp +++ b/tools/render-test/shader-input-layout.cpp @@ -171,6 +171,19 @@ struct ShaderInputLayoutParser { val->samplerDesc.isCompareSampler = true; } + else if (word == "filteringMode") + { + parser.Read("="); + auto contentWord = parser.ReadWord(); + if (contentWord == "point") + { + val->samplerDesc.filteringMode = TextureFilteringMode::Point; + } + else + { + val->samplerDesc.filteringMode = TextureFilteringMode::Linear; + } + } else { return SLANG_FAIL; @@ -643,14 +656,15 @@ struct ShaderInputLayoutParser default: throw ShaderInputLayoutFormatException( - String("Unexpected '") + parser.NextToken().Content + String("' at line") + + String("Unexpected '") + parser.NextToken().Content + String("' at line ") + String(parser.NextToken().Position.Line)); } } RefPtr<ShaderInputLayout::Val> parseVal(Misc::TokenReader& parser) { - auto word = parser.NextToken().Content; + auto nextToken = parser.NextToken(); + auto word = nextToken.Content; if (parser.AdvanceIf("begin_array")) { RefPtr<ShaderInputLayout::ArrayVal> val = new ShaderInputLayout::ArrayVal; @@ -820,8 +834,8 @@ struct ShaderInputLayoutParser else { throw ShaderInputLayoutFormatException( - String("Unknown shader input type '") + word + String("' at line") + - String(parser.NextToken().Position.Line)); + String("Unknown shader input type '") + word + String("' at line: ") + + String(nextToken.Position.Line)); } parser.ReadToken(); return nullptr; @@ -997,8 +1011,10 @@ struct ShaderInputLayoutParser parentVal = rootVal; auto lines = Misc::Split(source, '\n'); + int lineNum = 0; for (auto& line : lines) { + lineNum++; if (line.startsWith("//TEST_INPUT:")) { auto lineContent = line.subString(13, line.getLength() - 13); @@ -1010,7 +1026,7 @@ struct ShaderInputLayoutParser catch (const Misc::TextFormatException&) { StringBuilder msg; - msg << "Invalid input syntax at line " << parser.NextToken().Position.Line; + msg << "Invalid input syntax at line " << lineNum << ": " << line; throw ShaderInputLayoutFormatException(msg); } } |
