Commit 87dc17b5 by Shahbaz Youssefi Committed by Commit Bot

Vulkan: Generalize buffers desc set name to include images

And atomic counter buffers which are emulated with storage buffers. Bug: angleproject:3566 Change-Id: I102763900c779c3a84661491bad53aec384461f7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1713086Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
parent a71549b1
...@@ -206,13 +206,13 @@ ContextVk::ContextVk(const gl::State &state, gl::ErrorSet *errorSet, RendererVk ...@@ -206,13 +206,13 @@ ContextVk::ContextVk(const gl::State &state, gl::ErrorSet *errorSet, RendererVk
mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_TEXTURES); mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_TEXTURES);
mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_VERTEX_BUFFERS); mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_VERTEX_BUFFERS);
mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_INDEX_BUFFER); mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_INDEX_BUFFER);
mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_UNIFORM_AND_STORAGE_BUFFERS); mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_SHADER_RESOURCES);
mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_TRANSFORM_FEEDBACK_BUFFERS); mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_TRANSFORM_FEEDBACK_BUFFERS);
mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_DESCRIPTOR_SETS); mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_DESCRIPTOR_SETS);
mNewComputeCommandBufferDirtyBits.set(DIRTY_BIT_PIPELINE); mNewComputeCommandBufferDirtyBits.set(DIRTY_BIT_PIPELINE);
mNewComputeCommandBufferDirtyBits.set(DIRTY_BIT_TEXTURES); mNewComputeCommandBufferDirtyBits.set(DIRTY_BIT_TEXTURES);
mNewComputeCommandBufferDirtyBits.set(DIRTY_BIT_UNIFORM_AND_STORAGE_BUFFERS); mNewComputeCommandBufferDirtyBits.set(DIRTY_BIT_SHADER_RESOURCES);
mNewComputeCommandBufferDirtyBits.set(DIRTY_BIT_DESCRIPTOR_SETS); mNewComputeCommandBufferDirtyBits.set(DIRTY_BIT_DESCRIPTOR_SETS);
mGraphicsDirtyBitHandlers[DIRTY_BIT_DEFAULT_ATTRIBS] = mGraphicsDirtyBitHandlers[DIRTY_BIT_DEFAULT_ATTRIBS] =
...@@ -224,8 +224,8 @@ ContextVk::ContextVk(const gl::State &state, gl::ErrorSet *errorSet, RendererVk ...@@ -224,8 +224,8 @@ ContextVk::ContextVk(const gl::State &state, gl::ErrorSet *errorSet, RendererVk
mGraphicsDirtyBitHandlers[DIRTY_BIT_INDEX_BUFFER] = &ContextVk::handleDirtyGraphicsIndexBuffer; mGraphicsDirtyBitHandlers[DIRTY_BIT_INDEX_BUFFER] = &ContextVk::handleDirtyGraphicsIndexBuffer;
mGraphicsDirtyBitHandlers[DIRTY_BIT_DRIVER_UNIFORMS] = mGraphicsDirtyBitHandlers[DIRTY_BIT_DRIVER_UNIFORMS] =
&ContextVk::handleDirtyGraphicsDriverUniforms; &ContextVk::handleDirtyGraphicsDriverUniforms;
mGraphicsDirtyBitHandlers[DIRTY_BIT_UNIFORM_AND_STORAGE_BUFFERS] = mGraphicsDirtyBitHandlers[DIRTY_BIT_SHADER_RESOURCES] =
&ContextVk::handleDirtyGraphicsUniformAndStorageBuffers; &ContextVk::handleDirtyGraphicsShaderResources;
mGraphicsDirtyBitHandlers[DIRTY_BIT_TRANSFORM_FEEDBACK_BUFFERS] = mGraphicsDirtyBitHandlers[DIRTY_BIT_TRANSFORM_FEEDBACK_BUFFERS] =
&ContextVk::handleDirtyGraphicsTransformFeedbackBuffers; &ContextVk::handleDirtyGraphicsTransformFeedbackBuffers;
mGraphicsDirtyBitHandlers[DIRTY_BIT_DESCRIPTOR_SETS] = mGraphicsDirtyBitHandlers[DIRTY_BIT_DESCRIPTOR_SETS] =
...@@ -233,8 +233,8 @@ ContextVk::ContextVk(const gl::State &state, gl::ErrorSet *errorSet, RendererVk ...@@ -233,8 +233,8 @@ ContextVk::ContextVk(const gl::State &state, gl::ErrorSet *errorSet, RendererVk
mComputeDirtyBitHandlers[DIRTY_BIT_PIPELINE] = &ContextVk::handleDirtyComputePipeline; mComputeDirtyBitHandlers[DIRTY_BIT_PIPELINE] = &ContextVk::handleDirtyComputePipeline;
mComputeDirtyBitHandlers[DIRTY_BIT_TEXTURES] = &ContextVk::handleDirtyComputeTextures; mComputeDirtyBitHandlers[DIRTY_BIT_TEXTURES] = &ContextVk::handleDirtyComputeTextures;
mComputeDirtyBitHandlers[DIRTY_BIT_UNIFORM_AND_STORAGE_BUFFERS] = mComputeDirtyBitHandlers[DIRTY_BIT_SHADER_RESOURCES] =
&ContextVk::handleDirtyComputeUniformAndStorageBuffers; &ContextVk::handleDirtyComputeShaderResources;
mComputeDirtyBitHandlers[DIRTY_BIT_DESCRIPTOR_SETS] = mComputeDirtyBitHandlers[DIRTY_BIT_DESCRIPTOR_SETS] =
&ContextVk::handleDirtyComputeDescriptorSets; &ContextVk::handleDirtyComputeDescriptorSets;
...@@ -678,31 +678,29 @@ angle::Result ContextVk::handleDirtyGraphicsIndexBuffer(const gl::Context *conte ...@@ -678,31 +678,29 @@ angle::Result ContextVk::handleDirtyGraphicsIndexBuffer(const gl::Context *conte
return angle::Result::Continue; return angle::Result::Continue;
} }
ANGLE_INLINE angle::Result ContextVk::handleDirtyUniformAndStorageBuffersImpl( ANGLE_INLINE angle::Result ContextVk::handleDirtyShaderResourcesImpl(
const gl::Context *context, const gl::Context *context,
vk::CommandBuffer *commandBuffer, vk::CommandBuffer *commandBuffer,
vk::CommandGraphResource *recorder) vk::CommandGraphResource *recorder)
{ {
if (mProgram->hasUniformBuffers() || mProgram->hasStorageBuffers()) if (mProgram->hasUniformBuffers() || mProgram->hasStorageBuffers())
{ {
ANGLE_TRY(mProgram->updateUniformAndStorageBuffersDescriptorSet(this, recorder)); ANGLE_TRY(mProgram->updateShaderResourcesDescriptorSet(this, recorder));
} }
return angle::Result::Continue; return angle::Result::Continue;
} }
angle::Result ContextVk::handleDirtyGraphicsUniformAndStorageBuffers( angle::Result ContextVk::handleDirtyGraphicsShaderResources(const gl::Context *context,
const gl::Context *context, vk::CommandBuffer *commandBuffer)
vk::CommandBuffer *commandBuffer)
{ {
return handleDirtyUniformAndStorageBuffersImpl(context, commandBuffer, return handleDirtyShaderResourcesImpl(context, commandBuffer,
mDrawFramebuffer->getFramebuffer()); mDrawFramebuffer->getFramebuffer());
} }
angle::Result ContextVk::handleDirtyComputeUniformAndStorageBuffers( angle::Result ContextVk::handleDirtyComputeShaderResources(const gl::Context *context,
const gl::Context *context, vk::CommandBuffer *commandBuffer)
vk::CommandBuffer *commandBuffer)
{ {
return handleDirtyUniformAndStorageBuffersImpl(context, commandBuffer, &mDispatcher); return handleDirtyShaderResourcesImpl(context, commandBuffer, &mDispatcher);
} }
angle::Result ContextVk::handleDirtyGraphicsTransformFeedbackBuffers( angle::Result ContextVk::handleDirtyGraphicsTransformFeedbackBuffers(
...@@ -1698,7 +1696,7 @@ angle::Result ContextVk::syncState(const gl::Context *context, ...@@ -1698,7 +1696,7 @@ angle::Result ContextVk::syncState(const gl::Context *context,
case gl::State::DIRTY_BIT_PROGRAM_EXECUTABLE: case gl::State::DIRTY_BIT_PROGRAM_EXECUTABLE:
{ {
invalidateCurrentTextures(); invalidateCurrentTextures();
invalidateCurrentUniformAndStorageBuffers(); invalidateCurrentShaderResources();
if (glState.getProgram()->isCompute()) if (glState.getProgram()->isCompute())
{ {
invalidateCurrentComputePipeline(); invalidateCurrentComputePipeline();
...@@ -1726,12 +1724,13 @@ angle::Result ContextVk::syncState(const gl::Context *context, ...@@ -1726,12 +1724,13 @@ angle::Result ContextVk::syncState(const gl::Context *context,
// Nothing to do. // Nothing to do.
break; break;
case gl::State::DIRTY_BIT_SHADER_STORAGE_BUFFER_BINDING: case gl::State::DIRTY_BIT_SHADER_STORAGE_BUFFER_BINDING:
invalidateCurrentUniformAndStorageBuffers(); invalidateCurrentShaderResources();
break; break;
case gl::State::DIRTY_BIT_UNIFORM_BUFFER_BINDINGS: case gl::State::DIRTY_BIT_UNIFORM_BUFFER_BINDINGS:
invalidateCurrentUniformAndStorageBuffers(); invalidateCurrentShaderResources();
break; break;
case gl::State::DIRTY_BIT_ATOMIC_COUNTER_BUFFER_BINDING: case gl::State::DIRTY_BIT_ATOMIC_COUNTER_BUFFER_BINDING:
invalidateCurrentShaderResources();
break; break;
case gl::State::DIRTY_BIT_IMAGE_BINDINGS: case gl::State::DIRTY_BIT_IMAGE_BINDINGS:
break; break;
...@@ -1951,14 +1950,14 @@ void ContextVk::invalidateCurrentTextures() ...@@ -1951,14 +1950,14 @@ void ContextVk::invalidateCurrentTextures()
} }
} }
void ContextVk::invalidateCurrentUniformAndStorageBuffers() void ContextVk::invalidateCurrentShaderResources()
{ {
ASSERT(mProgram); ASSERT(mProgram);
if (mProgram->hasUniformBuffers() || mProgram->hasStorageBuffers()) if (mProgram->hasUniformBuffers() || mProgram->hasStorageBuffers())
{ {
mGraphicsDirtyBits.set(DIRTY_BIT_UNIFORM_AND_STORAGE_BUFFERS); mGraphicsDirtyBits.set(DIRTY_BIT_SHADER_RESOURCES);
mGraphicsDirtyBits.set(DIRTY_BIT_DESCRIPTOR_SETS); mGraphicsDirtyBits.set(DIRTY_BIT_DESCRIPTOR_SETS);
mComputeDirtyBits.set(DIRTY_BIT_UNIFORM_AND_STORAGE_BUFFERS); mComputeDirtyBits.set(DIRTY_BIT_SHADER_RESOURCES);
mComputeDirtyBits.set(DIRTY_BIT_DESCRIPTOR_SETS); mComputeDirtyBits.set(DIRTY_BIT_DESCRIPTOR_SETS);
} }
} }
......
...@@ -319,7 +319,7 @@ class ContextVk : public ContextImpl, public vk::Context, public vk::RenderPassO ...@@ -319,7 +319,7 @@ class ContextVk : public ContextImpl, public vk::Context, public vk::RenderPassO
DIRTY_BIT_VERTEX_BUFFERS, DIRTY_BIT_VERTEX_BUFFERS,
DIRTY_BIT_INDEX_BUFFER, DIRTY_BIT_INDEX_BUFFER,
DIRTY_BIT_DRIVER_UNIFORMS, DIRTY_BIT_DRIVER_UNIFORMS,
DIRTY_BIT_UNIFORM_AND_STORAGE_BUFFERS, DIRTY_BIT_SHADER_RESOURCES, // excluding textures, which are handled separately.
DIRTY_BIT_TRANSFORM_FEEDBACK_BUFFERS, DIRTY_BIT_TRANSFORM_FEEDBACK_BUFFERS,
DIRTY_BIT_DESCRIPTOR_SETS, DIRTY_BIT_DESCRIPTOR_SETS,
DIRTY_BIT_MAX, DIRTY_BIT_MAX,
...@@ -384,7 +384,7 @@ class ContextVk : public ContextImpl, public vk::Context, public vk::RenderPassO ...@@ -384,7 +384,7 @@ class ContextVk : public ContextImpl, public vk::Context, public vk::RenderPassO
} }
void invalidateCurrentTextures(); void invalidateCurrentTextures();
void invalidateCurrentUniformAndStorageBuffers(); void invalidateCurrentShaderResources();
void invalidateDriverUniforms(); void invalidateDriverUniforms();
// Handlers for graphics pipeline dirty bits. // Handlers for graphics pipeline dirty bits.
...@@ -400,8 +400,8 @@ class ContextVk : public ContextImpl, public vk::Context, public vk::RenderPassO ...@@ -400,8 +400,8 @@ class ContextVk : public ContextImpl, public vk::Context, public vk::RenderPassO
vk::CommandBuffer *commandBuffer); vk::CommandBuffer *commandBuffer);
angle::Result handleDirtyGraphicsDriverUniforms(const gl::Context *context, angle::Result handleDirtyGraphicsDriverUniforms(const gl::Context *context,
vk::CommandBuffer *commandBuffer); vk::CommandBuffer *commandBuffer);
angle::Result handleDirtyGraphicsUniformAndStorageBuffers(const gl::Context *context, angle::Result handleDirtyGraphicsShaderResources(const gl::Context *context,
vk::CommandBuffer *commandBuffer); vk::CommandBuffer *commandBuffer);
angle::Result handleDirtyGraphicsTransformFeedbackBuffers(const gl::Context *context, angle::Result handleDirtyGraphicsTransformFeedbackBuffers(const gl::Context *context,
vk::CommandBuffer *commandBuffer); vk::CommandBuffer *commandBuffer);
angle::Result handleDirtyGraphicsDescriptorSets(const gl::Context *context, angle::Result handleDirtyGraphicsDescriptorSets(const gl::Context *context,
...@@ -412,8 +412,8 @@ class ContextVk : public ContextImpl, public vk::Context, public vk::RenderPassO ...@@ -412,8 +412,8 @@ class ContextVk : public ContextImpl, public vk::Context, public vk::RenderPassO
vk::CommandBuffer *commandBuffer); vk::CommandBuffer *commandBuffer);
angle::Result handleDirtyComputeTextures(const gl::Context *context, angle::Result handleDirtyComputeTextures(const gl::Context *context,
vk::CommandBuffer *commandBuffer); vk::CommandBuffer *commandBuffer);
angle::Result handleDirtyComputeUniformAndStorageBuffers(const gl::Context *context, angle::Result handleDirtyComputeShaderResources(const gl::Context *context,
vk::CommandBuffer *commandBuffer); vk::CommandBuffer *commandBuffer);
angle::Result handleDirtyComputeDescriptorSets(const gl::Context *context, angle::Result handleDirtyComputeDescriptorSets(const gl::Context *context,
vk::CommandBuffer *commandBuffer); vk::CommandBuffer *commandBuffer);
...@@ -421,9 +421,9 @@ class ContextVk : public ContextImpl, public vk::Context, public vk::RenderPassO ...@@ -421,9 +421,9 @@ class ContextVk : public ContextImpl, public vk::Context, public vk::RenderPassO
angle::Result handleDirtyTexturesImpl(const gl::Context *context, angle::Result handleDirtyTexturesImpl(const gl::Context *context,
vk::CommandBuffer *commandBuffer, vk::CommandBuffer *commandBuffer,
vk::CommandGraphResource *recorder); vk::CommandGraphResource *recorder);
angle::Result handleDirtyUniformAndStorageBuffersImpl(const gl::Context *context, angle::Result handleDirtyShaderResourcesImpl(const gl::Context *context,
vk::CommandBuffer *commandBuffer, vk::CommandBuffer *commandBuffer,
vk::CommandGraphResource *recorder); vk::CommandGraphResource *recorder);
angle::Result submitFrame(const VkSubmitInfo &submitInfo, angle::Result submitFrame(const VkSubmitInfo &submitInfo,
vk::PrimaryCommandBuffer &&commandBuffer); vk::PrimaryCommandBuffer &&commandBuffer);
......
...@@ -717,7 +717,7 @@ uint32_t AssignInterfaceBlockBindings(const std::vector<gl::InterfaceBlock> &blo ...@@ -717,7 +717,7 @@ uint32_t AssignInterfaceBlockBindings(const std::vector<gl::InterfaceBlock> &blo
uint32_t bindingStart, uint32_t bindingStart,
gl::ShaderMap<IntermediateShaderSource> *shaderSources) gl::ShaderMap<IntermediateShaderSource> *shaderSources)
{ {
const std::string buffersDescriptorSet = "set = " + Str(kBufferDescriptorSetIndex); const std::string resourcesDescriptorSet = "set = " + Str(kShaderResourceDescriptorSetIndex);
uint32_t bindingIndex = bindingStart; uint32_t bindingIndex = bindingStart;
for (const gl::InterfaceBlock &block : blocks) for (const gl::InterfaceBlock &block : blocks)
...@@ -725,7 +725,7 @@ uint32_t AssignInterfaceBlockBindings(const std::vector<gl::InterfaceBlock> &blo ...@@ -725,7 +725,7 @@ uint32_t AssignInterfaceBlockBindings(const std::vector<gl::InterfaceBlock> &blo
if (!block.isArray || block.arrayElement == 0) if (!block.isArray || block.arrayElement == 0)
{ {
const std::string bindingString = const std::string bindingString =
buffersDescriptorSet + ", binding = " + Str(bindingIndex++); resourcesDescriptorSet + ", binding = " + Str(bindingIndex++);
AssignResourceBinding(block.activeShaders(), block.name, bindingString, qualifier, AssignResourceBinding(block.activeShaders(), block.name, bindingString, qualifier,
kUnusedBlockSubstitution, shaderSources); kUnusedBlockSubstitution, shaderSources);
......
...@@ -444,8 +444,8 @@ angle::Result ProgramVk::linkImpl(const gl::Context *glContext, gl::InfoLog &inf ...@@ -444,8 +444,8 @@ angle::Result ProgramVk::linkImpl(const gl::Context *glContext, gl::InfoLog &inf
getStorageBlockBindingsOffset(), getStorageBlockBindingsOffset(),
VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, &buffersSetDesc); VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, &buffersSetDesc);
ANGLE_TRY(renderer->getDescriptorSetLayout(contextVk, buffersSetDesc, ANGLE_TRY(renderer->getDescriptorSetLayout(
&mDescriptorSetLayouts[kBufferDescriptorSetIndex])); contextVk, buffersSetDesc, &mDescriptorSetLayouts[kShaderResourceDescriptorSetIndex]));
// Textures: // Textures:
vk::DescriptorSetLayoutDesc texturesSetDesc; vk::DescriptorSetLayoutDesc texturesSetDesc;
...@@ -479,7 +479,7 @@ angle::Result ProgramVk::linkImpl(const gl::Context *glContext, gl::InfoLog &inf ...@@ -479,7 +479,7 @@ angle::Result ProgramVk::linkImpl(const gl::Context *glContext, gl::InfoLog &inf
vk::PipelineLayoutDesc pipelineLayoutDesc; vk::PipelineLayoutDesc pipelineLayoutDesc;
pipelineLayoutDesc.updateDescriptorSetLayout(kUniformsAndXfbDescriptorSetIndex, pipelineLayoutDesc.updateDescriptorSetLayout(kUniformsAndXfbDescriptorSetIndex,
uniformsAndXfbSetDesc); uniformsAndXfbSetDesc);
pipelineLayoutDesc.updateDescriptorSetLayout(kBufferDescriptorSetIndex, buffersSetDesc); pipelineLayoutDesc.updateDescriptorSetLayout(kShaderResourceDescriptorSetIndex, buffersSetDesc);
pipelineLayoutDesc.updateDescriptorSetLayout(kTextureDescriptorSetIndex, texturesSetDesc); pipelineLayoutDesc.updateDescriptorSetLayout(kTextureDescriptorSetIndex, texturesSetDesc);
pipelineLayoutDesc.updateDescriptorSetLayout(kDriverUniformsDescriptorSetIndex, pipelineLayoutDesc.updateDescriptorSetLayout(kDriverUniformsDescriptorSetIndex,
driverUniformsSetDesc); driverUniformsSetDesc);
...@@ -520,7 +520,7 @@ angle::Result ProgramVk::linkImpl(const gl::Context *glContext, gl::InfoLog &inf ...@@ -520,7 +520,7 @@ angle::Result ProgramVk::linkImpl(const gl::Context *glContext, gl::InfoLog &inf
contextVk, uniformAndXfbSetSize.data(), uniformAndXfbSetSize.size())); contextVk, uniformAndXfbSetSize.data(), uniformAndXfbSetSize.size()));
if (bufferSetSize.size() > 0) if (bufferSetSize.size() > 0)
{ {
ANGLE_TRY(mDynamicDescriptorPools[kBufferDescriptorSetIndex].init( ANGLE_TRY(mDynamicDescriptorPools[kShaderResourceDescriptorSetIndex].init(
contextVk, bufferSetSize.data(), bufferSetSize.size())); contextVk, bufferSetSize.data(), bufferSetSize.size()));
} }
if (textureCount > 0) if (textureCount > 0)
...@@ -1089,7 +1089,7 @@ void ProgramVk::updateBuffersDescriptorSet(ContextVk *contextVk, ...@@ -1089,7 +1089,7 @@ void ProgramVk::updateBuffersDescriptorSet(ContextVk *contextVk,
const std::vector<gl::InterfaceBlock> &blocks, const std::vector<gl::InterfaceBlock> &blocks,
VkDescriptorType descriptorType) VkDescriptorType descriptorType)
{ {
VkDescriptorSet descriptorSet = mDescriptorSets[kBufferDescriptorSetIndex]; VkDescriptorSet descriptorSet = mDescriptorSets[kShaderResourceDescriptorSetIndex];
ASSERT(descriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER || ASSERT(descriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER ||
descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER); descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER);
...@@ -1192,11 +1192,10 @@ void ProgramVk::updateBuffersDescriptorSet(ContextVk *contextVk, ...@@ -1192,11 +1192,10 @@ void ProgramVk::updateBuffersDescriptorSet(ContextVk *contextVk,
vkUpdateDescriptorSets(device, writeCount, writeDescriptorInfo.data(), 0, nullptr); vkUpdateDescriptorSets(device, writeCount, writeDescriptorInfo.data(), 0, nullptr);
} }
angle::Result ProgramVk::updateUniformAndStorageBuffersDescriptorSet( angle::Result ProgramVk::updateShaderResourcesDescriptorSet(ContextVk *contextVk,
ContextVk *contextVk, vk::CommandGraphResource *recorder)
vk::CommandGraphResource *recorder)
{ {
ANGLE_TRY(allocateDescriptorSet(contextVk, kBufferDescriptorSetIndex)); ANGLE_TRY(allocateDescriptorSet(contextVk, kShaderResourceDescriptorSetIndex));
updateBuffersDescriptorSet(contextVk, recorder, mState.getUniformBlocks(), updateBuffersDescriptorSet(contextVk, recorder, mState.getUniformBlocks(),
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER); VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER);
......
...@@ -107,8 +107,8 @@ class ProgramVk : public ProgramImpl ...@@ -107,8 +107,8 @@ class ProgramVk : public ProgramImpl
angle::Result updateUniforms(ContextVk *contextVk); angle::Result updateUniforms(ContextVk *contextVk);
angle::Result updateTexturesDescriptorSet(ContextVk *contextVk); angle::Result updateTexturesDescriptorSet(ContextVk *contextVk);
angle::Result updateUniformAndStorageBuffersDescriptorSet(ContextVk *contextVk, angle::Result updateShaderResourcesDescriptorSet(ContextVk *contextVk,
vk::CommandGraphResource *recorder); vk::CommandGraphResource *recorder);
angle::Result updateTransformFeedbackDescriptorSet(ContextVk *contextVk, angle::Result updateTransformFeedbackDescriptorSet(ContextVk *contextVk,
vk::FramebufferHelper *framebuffer); vk::FramebufferHelper *framebuffer);
......
...@@ -897,7 +897,7 @@ class PipelineLayoutCache final : angle::NonCopyable ...@@ -897,7 +897,7 @@ class PipelineLayoutCache final : angle::NonCopyable
// correspond to default uniforms in the vertex and fragment shaders respectively. Additionally, // correspond to default uniforms in the vertex and fragment shaders respectively. Additionally,
// transform feedback buffers are bound from binding 2 and up. // transform feedback buffers are bound from binding 2 and up.
// - Set 1 contains all textures. // - Set 1 contains all textures.
// - Set 2 contains all uniform and storage blocks. // - Set 2 contains all other shader resources.
// - Set 3 contains the ANGLE driver uniforms at binding 0. Note that driver uniforms are updated // - Set 3 contains the ANGLE driver uniforms at binding 0. Note that driver uniforms are updated
// only under rare circumstances, such as viewport or depth range change. However, there is only // only under rare circumstances, such as viewport or depth range change. However, there is only
// one binding in this set. // one binding in this set.
...@@ -906,8 +906,8 @@ class PipelineLayoutCache final : angle::NonCopyable ...@@ -906,8 +906,8 @@ class PipelineLayoutCache final : angle::NonCopyable
constexpr uint32_t kUniformsAndXfbDescriptorSetIndex = 0; constexpr uint32_t kUniformsAndXfbDescriptorSetIndex = 0;
// Textures set index: // Textures set index:
constexpr uint32_t kTextureDescriptorSetIndex = 1; constexpr uint32_t kTextureDescriptorSetIndex = 1;
// Uniform blocks set index: // Other shader resources set index:
constexpr uint32_t kBufferDescriptorSetIndex = 2; constexpr uint32_t kShaderResourceDescriptorSetIndex = 2;
// ANGLE driver uniforms set index (binding is always 3): // ANGLE driver uniforms set index (binding is always 3):
constexpr uint32_t kDriverUniformsDescriptorSetIndex = 3; constexpr uint32_t kDriverUniformsDescriptorSetIndex = 3;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment