r600/sfn: read number of images from shader info
Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10608>
This commit is contained in:
parent
efdb888b29
commit
6a15c7d9ad
|
@ -303,6 +303,7 @@ bool ShaderFromNir::emit_instruction(nir_instr *instr)
|
|||
|
||||
bool ShaderFromNir::process_declaration()
|
||||
{
|
||||
impl->set_shader_info(sh);
|
||||
|
||||
if (!impl->scan_inputs_read(sh))
|
||||
return false;
|
||||
|
|
|
@ -285,13 +285,20 @@ bool ShaderFromNirProcessor::process_uniforms(nir_variable *uniform)
|
|||
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;
|
||||
|
|
|
@ -93,6 +93,7 @@ public:
|
|||
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:
|
||||
|
||||
|
@ -123,6 +124,8 @@ protected:
|
|||
|
||||
void inc_atomic_file_count();
|
||||
|
||||
virtual void do_set_shader_info(const nir_shader *sh);
|
||||
|
||||
enum ESlots {
|
||||
es_face,
|
||||
es_instanceid,
|
||||
|
|
Loading…
Reference in New Issue