diff options
author | Jonathan Marek <[email protected]> | 2020-06-14 23:10:01 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-06-17 15:32:30 +0000 |
commit | 159a1300ceb5752dda116b07a560e351c0324886 (patch) | |
tree | 96771390b3677262c79a54b7a5b2b2372ffa4b26 /src/freedreno/vulkan/tu_pipeline.c | |
parent | 233610f8cf8d8810173a7eac0c046574aeb485f9 (diff) |
turnip: input attachment descriptor set rework
Implement GMEM input attachments by using non-bindless texture state which
is emitted at the start of every subpass.
This achieves two things:
* More vulkan-like CmdBindDescriptorSets
* Fixing secondary command buffer input attachments with GMEM
Signed-off-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5446>
Diffstat (limited to 'src/freedreno/vulkan/tu_pipeline.c')
-rw-r--r-- | src/freedreno/vulkan/tu_pipeline.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/freedreno/vulkan/tu_pipeline.c b/src/freedreno/vulkan/tu_pipeline.c index e22b301099b..e556596c854 100644 --- a/src/freedreno/vulkan/tu_pipeline.c +++ b/src/freedreno/vulkan/tu_pipeline.c @@ -183,8 +183,7 @@ tu6_emit_load_state(struct tu_pipeline *pipeline, bool compute) switch (binding->type) { case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC: base = MAX_SETS; - offset = (layout->input_attachment_count + - layout->set[i].dynamic_offset_start + + offset = (layout->set[i].dynamic_offset_start + binding->dynamic_offset_offset) * A6XX_TEX_CONST_DWORDS; /* fallthrough */ case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER: @@ -201,9 +200,8 @@ tu6_emit_load_state(struct tu_pipeline *pipeline, bool compute) } break; case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT: - base = MAX_SETS; - offset = (layout->set[i].input_attachment_start + - binding->input_attachment_offset) * A6XX_TEX_CONST_DWORDS; + /* nothing - input attachment doesn't use bindless */ + break; case VK_DESCRIPTOR_TYPE_SAMPLER: case VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE: case VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER: { @@ -217,8 +215,7 @@ tu6_emit_load_state(struct tu_pipeline *pipeline, bool compute) } case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC: base = MAX_SETS; - offset = (layout->input_attachment_count + - layout->set[i].dynamic_offset_start + + offset = (layout->set[i].dynamic_offset_start + binding->dynamic_offset_offset) * A6XX_TEX_CONST_DWORDS; /* fallthrough */ case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER: { @@ -2055,12 +2052,6 @@ tu_pipeline_builder_parse_shader_stages(struct tu_pipeline_builder *builder, desc_sets |= builder->shaders[i]->active_desc_sets; } pipeline->active_desc_sets = desc_sets; - - if (builder->shaders[MESA_SHADER_FRAGMENT]) { - memcpy(pipeline->program.input_attachment_idx, - builder->shaders[MESA_SHADER_FRAGMENT]->attachment_idx, - sizeof(pipeline->program.input_attachment_idx)); - } } static void |