Commit d7231b92 authored by Gert Wollny's avatar Gert Wollny

r600/sfn: code cleanup

parent 63172dcd
......@@ -433,7 +433,8 @@ bool ShaderFromNirProcessor::process_uniforms(nir_variable *uniform)
m_uniform_type_map[uniform->data.location] = uniform->type;
if (uniform->type->contains_atomic()) {
sh_info().nhwatomic += uniform->type->atomic_size() / ATOMIC_COUNTER_SIZE;
int natomics = uniform->type->atomic_size() / ATOMIC_COUNTER_SIZE;
sh_info().nhwatomic += natomics;
if (uniform->type->is_array())
sh_info().indirect_files |= 1 << TGSI_FILE_HW_ATOMIC;
......@@ -445,7 +446,7 @@ bool ShaderFromNirProcessor::process_uniforms(nir_variable *uniform)
atom.buffer_id = uniform->data.binding;
atom.hw_idx = m_next_hwatomic_loc;
atom.start = m_next_hwatomic_loc;
atom.end = atom.start + uniform->type->atomic_size() / ATOMIC_COUNTER_SIZE - 1;
atom.end = atom.start + natomics - 1;
m_next_hwatomic_loc = atom.end + 1;
//atom.array_id = uniform->type->is_array() ? 1 : 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment