From 698ba86962d10d927d7ac4eb781e05e33f08c9eb Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 1 Jun 2018 10:41:13 -0400 Subject: 1st stage renderer binding refactor (#587) * 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. * Add Resource::Type member to Resource::DescBase. * Removed the CompactIndexSlice from binding. Just bind the indices needed. * BindingRegister -> RegisterSet * RegisterSet -> RegisterRange * Typo fix for debug build. * Remove comment that no longer applied. --- tools/render-test/main.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'tools/render-test/main.cpp') diff --git a/tools/render-test/main.cpp b/tools/render-test/main.cpp index f72a05824..767c33e14 100644 --- a/tools/render-test/main.cpp +++ b/tools/render-test/main.cpp @@ -131,12 +131,9 @@ SlangResult RenderTestApp::initialize(Renderer* renderer, ShaderCompiler* shader // in the test file if ((gOptions.shaderType == Options::ShaderProgramType::Graphics || gOptions.shaderType == Options::ShaderProgramType::GraphicsCompute) - && bindingStateDesc.findBindingIndex(Resource::BindFlag::ConstantBuffer, -1, 0) < 0) + && bindingStateDesc.findBindingIndex(Resource::BindFlag::ConstantBuffer, 0) < 0) { - BindingState::ShaderBindSet shaderBindSet; - shaderBindSet.setAll(bindingStateDesc.makeCompactSlice(0)); - - bindingStateDesc.addResource(BindingType::Buffer, m_constantBuffer, shaderBindSet); + bindingStateDesc.addResource(BindingType::Buffer, m_constantBuffer, BindingState::RegisterRange::makeSingle(0) ); m_numAddedConstantBuffers++; } -- cgit v1.2.3