From 3822f9243f7b80be4c47318cf3d0b8d9800e67dd Mon Sep 17 00:00:00 2001 From: Gangzheng Tong Date: Wed, 18 Jun 2025 10:38:31 -0700 Subject: 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 --- tools/render-test/shader-input-layout.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'tools/render-test/shader-input-layout.h') diff --git a/tools/render-test/shader-input-layout.h b/tools/render-test/shader-input-layout.h index e0a2be886..b5ee99566 100644 --- a/tools/render-test/shader-input-layout.h +++ b/tools/render-test/shader-input-layout.h @@ -82,6 +82,7 @@ struct InputBufferDesc struct InputSamplerDesc { bool isCompareSampler = false; + TextureFilteringMode filteringMode = TextureFilteringMode::Linear; }; struct TextureData @@ -109,7 +110,8 @@ struct TextureData } void* addSlice(size_t elemCount) { - void* dst = ::malloc(m_formatSize * elemCount); + const size_t totalSize = m_formatSize * elemCount; + void* dst = ::malloc(totalSize); m_slices.add(Slice::make(dst, elemCount)); return dst; } @@ -153,9 +155,9 @@ struct TextureData uint8_t m_formatSize = 0; Slang::List m_slices; - int m_textureSize; - int m_mipLevels; - int m_arraySize; + int m_textureSize = 0; + int m_mipLevels = 1; + int m_arraySize = 1; }; class ShaderInputLayout -- cgit v1.2.3