From 8b67c7b3fc163156a02a40430f7038ab2f199924 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 29 May 2018 16:48:04 -0400 Subject: Feature/vulkan texture (#579) * First pass at support for textures in vulkan. * Binding state has first pass support for VkImageView VkSampler. * Split out _calcImageViewType * Fix bug in debug build around constant buffer being added but not part of the binding description for the test. * Offset recalculated for vk texture construction just store the texture size for each mip level. * When outputing a vector type with a size of 1 in GLSL, it needs to be output as the underlying type. For example vector should be output as float in GLSL. * Vulkan render-test produces right output for the test tests/compute/textureSamplingTest.slang -slang -gcompute -o tests/compute/textureSamplingTest.slang.actual.txt -vk * Small improvement around xml encoding a string. * More generalized test synthesis. * Fix image usage flags for Vulkan. * Improvements to what gets synthesized vulkan tests. * Do transition on all mip levels. * Fixing problems appearing from vulkan debug layer. * Disable Vulkan synthesized tests for now. --- tools/render-test/vk-util.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/render-test/vk-util.h') diff --git a/tools/render-test/vk-util.h b/tools/render-test/vk-util.h index 6e2c2388c..2d98a1c0f 100644 --- a/tools/render-test/vk-util.h +++ b/tools/render-test/vk-util.h @@ -10,6 +10,8 @@ /// Calls handleFail which on debug builds asserts #define SLANG_VK_RETURN_ON_FAIL(x) { VkResult _res = x; if (_res != VK_SUCCESS) { return VulkanUtil::handleFail(_res); } } +#define SLANG_VK_RETURN_NULL_ON_FAIL(x) { VkResult _res = x; if (_res != VK_SUCCESS) { VulkanUtil::handleFail(_res); return nullptr; } } + /// Is similar to SLANG_VK_RETURN_ON_FAIL, but does not return. Will call checkFail on failure - which asserts on debug builds. #define SLANG_VK_CHECK(x) { VkResult _res = x; if (_res != VK_SUCCESS) { VulkanUtil::checkFail(_res); } } -- cgit v1.2.3