Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10608>
bool ShaderFromNir::process_declaration()
{
+ impl->set_shader_info(sh);
if (!impl->scan_inputs_read(sh))
return false;
sh_info().indirect_files |= 1 << TGSI_FILE_IMAGE;
}
- if (uniform->type->is_image()) {
- ++m_image_count;
- }
-
return true;
}
+void ShaderFromNirProcessor::set_shader_info(const nir_shader *sh)
+{
+ m_image_count = sh->info.num_images;
+ do_set_shader_info(sh);
+}
+
+void ShaderFromNirProcessor::do_set_shader_info(const nir_shader *sh)
+{
+ (void)sh;
+}
+
bool ShaderFromNirProcessor::scan_inputs_read(const nir_shader *sh)
{
return true;
void get_array_info(r600_shader& shader) const;
virtual bool scan_inputs_read(const nir_shader *sh);
+ void set_shader_info(const nir_shader *sh);
protected:
void inc_atomic_file_count();
+ virtual void do_set_shader_info(const nir_shader *sh);
+
enum ESlots {
es_face,
es_instanceid,