radeonsi: don't load unused compute shader input SGPRs and VGPRs
authorMarek Olšák <marek.olsak@amd.com>
Mon, 24 Apr 2017 15:27:37 +0000 (17:27 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 28 Apr 2017 19:57:44 +0000 (21:57 +0200)
commit7a515a607cf47c5ca3b02856d65dc9b963f94d83
tree8c6b5e353bfc8bdb7bfcc6181bf5a898dbcfaf16
parent46e48d404417ffe3c619287d6504f0504357d8b2
radeonsi: don't load unused compute shader input SGPRs and VGPRs

Basically, don't load GRID_SIZE or BLOCK_SIZE if they are unused, determine
whether to load BLOCK_ID for each component separately, and set the number
of THREAD_ID VGPRs to load. Now we should get the maximum CS launch wave
rate in most cases.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_compute.c
src/gallium/drivers/radeonsi/si_shader.c
src/gallium/drivers/radeonsi/si_shader.h
src/gallium/drivers/radeonsi/si_shader_internal.h