diff options
author | Nicolai Hähnle <[email protected]> | 2017-05-08 13:10:35 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2017-05-10 08:58:50 +0200 |
commit | 30267256df591b481ac6dae9a1be21f17a257b6f (patch) | |
tree | 75080ee6fce8b577efff499b62ce0fde2096cb3e /src/gallium/drivers/radeonsi/si_debug.c | |
parent | 571597bf470e8b108395ac6a2a8d33108a40910f (diff) |
radeonsi: dump both enabled and required descriptor slots
This allows a meaningful dump with info == NULL (for compute shaders).
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_debug.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_debug.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/gallium/drivers/radeonsi/si_debug.c b/src/gallium/drivers/radeonsi/si_debug.c index 6e310bb9f5d..d39b3039346 100644 --- a/src/gallium/drivers/radeonsi/si_debug.c +++ b/src/gallium/drivers/radeonsi/si_debug.c @@ -464,11 +464,17 @@ static void si_dump_descriptors(struct si_context *sctx, " - Sampler", " - Image", }; - unsigned num_elements[] = { - util_last_bit(info->const_buffers_declared), - util_last_bit(info->shader_buffers_declared), - util_last_bit(info->samplers_declared), - util_last_bit(info->images_declared), + unsigned enabled_slots[] = { + sctx->const_buffers[processor].enabled_mask, + sctx->shader_buffers[processor].enabled_mask, + sctx->samplers[processor].views.enabled_mask, + sctx->images[processor].enabled_mask, + }; + unsigned required_slots[] = { + info ? info->const_buffers_declared : 0, + info ? info->shader_buffers_declared : 0, + info ? info->samplers_declared : 0, + info ? info->images_declared : 0, }; if (processor == PIPE_SHADER_VERTEX) { @@ -478,7 +484,7 @@ static void si_dump_descriptors(struct si_context *sctx, for (unsigned i = 0; i < SI_NUM_SHADER_DESCS; ++i, ++descs) si_dump_descriptor_list(descs, shader_name[processor], elem_name[i], - num_elements[i], f); + util_last_bit(enabled_slots[i] | required_slots[i]), f); } static void si_dump_gfx_descriptors(struct si_context *sctx, |