radv: Add inputs read by TES to radv_shader_info.
authorTimur Kristóf <timur.kristof@gmail.com>
Mon, 13 Apr 2020 16:35:57 +0000 (18:35 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 24 Apr 2020 17:58:57 +0000 (17:58 +0000)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4536>

src/amd/vulkan/radv_pipeline.c
src/amd/vulkan/radv_shader.h

index 984a095aad8a742318b9aacd7591fd7906440dc9..2e535a33e39a225812bb68af888d3ab412c55e05 100644 (file)
@@ -2602,6 +2602,13 @@ radv_fill_shader_info(struct radv_pipeline *pipeline,
                filled_stages |= (1 << MESA_SHADER_FRAGMENT);
        }
 
+       if (nir[MESA_SHADER_TESS_CTRL]) {
+               infos[MESA_SHADER_TESS_CTRL].tcs.tes_inputs_read =
+                       nir[MESA_SHADER_TESS_EVAL]->info.inputs_read;
+               infos[MESA_SHADER_TESS_CTRL].tcs.tes_patch_inputs_read =
+                       nir[MESA_SHADER_TESS_EVAL]->info.patch_inputs_read;
+       }
+
        if (pipeline->device->physical_device->rad_info.chip_class >= GFX9 &&
            nir[MESA_SHADER_TESS_CTRL]) {
                struct nir_shader *combined_nir[] = {nir[MESA_SHADER_VERTEX], nir[MESA_SHADER_TESS_CTRL]};
index 23ff7ddcdcc5d4ee70682f315905fbb0fb6a55b0..165df3afe2e548ea9b9d75a7fcce3dd56f6d6655 100644 (file)
@@ -316,6 +316,8 @@ struct radv_shader_info {
        struct {
                uint64_t outputs_written;
                uint64_t patch_outputs_written;
+               uint64_t tes_inputs_read;
+               uint64_t tes_patch_inputs_read;
                unsigned tcs_vertices_out;
                uint32_t num_patches;
                uint32_t lds_size;