radv/gfx10: implement radv_emit_global_shader_pointers()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 25 Jun 2019 09:40:02 +0000 (11:40 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sun, 7 Jul 2019 15:03:38 +0000 (17:03 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_device.c

index 5248814c92b6d1e9eedfed06d22279fb81a1f0b2..d22d3d7a627abba63f98c2fe3f45d0c2336831d5 100644 (file)
@@ -2439,7 +2439,17 @@ radv_emit_global_shader_pointers(struct radv_queue *queue,
 
        radv_cs_add_buffer(queue->device->ws, cs, descriptor_bo);
 
-       if (queue->device->physical_device->rad_info.chip_class >= GFX9) {
+       if (queue->device->physical_device->rad_info.chip_class >= GFX10) {
+               uint32_t regs[] = {R_00B030_SPI_SHADER_USER_DATA_PS_0,
+                                  R_00B130_SPI_SHADER_USER_DATA_VS_0,
+                                  R_00B230_SPI_SHADER_USER_DATA_GS_0,
+                                  R_00B430_SPI_SHADER_USER_DATA_HS_0};
+
+               for (int i = 0; i < ARRAY_SIZE(regs); ++i) {
+                       radv_emit_shader_pointer(queue->device, cs, regs[i],
+                                                va, true);
+               }
+       } else if (queue->device->physical_device->rad_info.chip_class >= GFX9) {
                uint32_t regs[] = {R_00B030_SPI_SHADER_USER_DATA_PS_0,
                                   R_00B130_SPI_SHADER_USER_DATA_VS_0,
                                   R_00B208_SPI_SHADER_USER_DATA_ADDR_LO_GS,