tgsi/scan: record bindless samplers/images usage
[mesa.git] / src / gallium / auxiliary / tgsi / tgsi_scan.h
index af1651b7e8215f4478b42442303aa7e4fa2ae9b8..cfec9daede53c7f1cb452ed7615b922e5ce0f59f 100644 (file)
@@ -135,6 +135,8 @@ struct tgsi_shader_info
    boolean is_msaa_sampler[PIPE_MAX_SAMPLERS];
    boolean uses_doubles; /**< uses any of the double instructions */
    boolean uses_derivatives;
+   boolean uses_bindless_samplers;
+   boolean uses_bindless_images;
    unsigned clipdist_writemask;
    unsigned culldist_writemask;
    unsigned num_written_culldistance;
@@ -196,6 +198,14 @@ tgsi_scan_arrays(const struct tgsi_token *tokens,
                  unsigned max_array_id,
                  struct tgsi_array_info *arrays);
 
+inline bool
+tgsi_is_bindless_image_file(unsigned file)
+{
+   return file != TGSI_FILE_IMAGE &&
+          file != TGSI_FILE_MEMORY &&
+          file != TGSI_FILE_BUFFER;
+}
+
 #ifdef __cplusplus
 } // extern "C"
 #endif