Remove immutable shaders from ShaderExecutor
authorPyry Haulos <phaulos@google.com>
Wed, 20 Jan 2016 16:09:30 +0000 (08:09 -0800)
committerPyry Haulos <phaulos@google.com>
Wed, 20 Jan 2016 16:09:30 +0000 (08:09 -0800)
Samplers are provided when updating descriptor sets, so it is not
necessary, nor allowed, to set them when building descriptor set layout.

Change-Id: I7115233383421bf59817288f32a598bb4914aa1c

external/vulkancts/modules/vulkan/shaderexecutor/vktShaderExecutor.cpp

index 4a8430a..ea952d0 100644 (file)
@@ -3021,7 +3021,6 @@ void ShaderExecutor::setupSamplerData (const VkDevice&                            vkDevice,
 {
        DE_ASSERT(numSamplers > 0);
 
-       std::vector<VkSampler>                          vkSamplers;
        de::MovePtr<SamplerArrayUniform>        samplers                (new SamplerArrayUniform());
 
        samplers->type = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
@@ -3033,12 +3032,10 @@ void ShaderExecutor::setupSamplerData (const VkDevice&                          vkDevice,
                const void*                                             samplerData             = ((deUint8*)data) + offset;
                de::MovePtr<SamplerUniform>             uniform                 = createSamplerUniform(vkDevice, vk, queue, queueFamilyIndex, memAlloc, bindingLocation, refSampler, texFormat, texSize, imageType, imageViewType, samplerData);
 
-               vkSamplers.push_back(uniform->sampler.get()->get());
-
                samplers->uniforms.push_back(SamplerUniformSp(new de::UniquePtr<SamplerUniform>(uniform)));
        }
 
-       m_descriptorSetLayoutBuilder.addArraySamplerBinding(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, numSamplers, VK_SHADER_STAGE_ALL, &vkSamplers[0]);
+       m_descriptorSetLayoutBuilder.addArraySamplerBinding(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, numSamplers, VK_SHADER_STAGE_ALL, DE_NULL);
        m_descriptorPoolBuilder.addType(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, numSamplers);
 
        m_uniformInfos.push_back(UniformInfoSp(new de::UniquePtr<UniformInfo>(samplers)));