Pass descriptor sets to SPIR-V compilation The at draw time currently bound descriptors are passed down to the SPIR-V code generation so that we can read the sampler parameters and image view parameters. An important exception is compute shaders, which are currently compiled before the invoke calls. Also still TODO is taking the parameters into account during routine lookup in the cache. This change also eliminates the now unused 'enableMask' from PixelProgram and VertexProgram. Bug b/129523279 Change-Id: I1ea75ec5a7b83783a1efacb238143a419afa5bda Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/28446 Tested-by: Nicolas Capens <nicolascapens@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
diff --git a/src/Pipeline/PixelRoutine.cpp b/src/Pipeline/PixelRoutine.cpp index 2857fb3..b2f669a 100644 --- a/src/Pipeline/PixelRoutine.cpp +++ b/src/Pipeline/PixelRoutine.cpp
@@ -35,9 +35,11 @@ PixelRoutine::PixelRoutine( const PixelProcessor::State &state, vk::PipelineLayout const *pipelineLayout, - SpirvShader const *spirvShader) + SpirvShader const *spirvShader, + const vk::DescriptorSet::Bindings &descriptorSets) : QuadRasterizer(state, spirvShader), - routine(pipelineLayout) + routine(pipelineLayout), + descriptorSets(descriptorSets) { spirvShader->emitProlog(&routine);