diff options
author | Samuel Pitoiset <[email protected]> | 2017-05-16 12:25:28 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-06-14 10:04:36 +0200 |
commit | 2c3a7d584095bacb129a3fbbd6ccd5eac34d1451 (patch) | |
tree | e08fdb8b4728764183471895b7ee137845271193 /src/gallium/drivers/radeonsi/si_shader.h | |
parent | e1813a8635fb9775791721cf421de05803c3fcb5 (diff) |
radeonsi: track use of bindless samplers/images from tgsi_shader_info
This adds some new helper functions to know if the current draw
call (or dispatch compute) is using bindless samplers/images,
based on TGSI analysis.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader.h')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index ed1df2bfa7d..063747a4096 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -630,4 +630,16 @@ si_get_main_shader_part(struct si_shader_selector *sel, return &sel->main_shader_part; } +static inline bool +si_shader_uses_bindless_samplers(struct si_shader_selector *selector) +{ + return selector ? selector->info.uses_bindless_samplers : false; +} + +static inline bool +si_shader_uses_bindless_images(struct si_shader_selector *selector) +{ + return selector ? selector->info.uses_bindless_images : false; +} + #endif |