r600/sfn: rename texture coordinate offset for clarity

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21357>
This commit is contained in:
Gert Wollny 2023-02-10 17:57:16 +01:00 committed by Marge Bot
parent 869e4de6af
commit 560731279f
2 changed files with 11 additions and 11 deletions

View file

@ -49,7 +49,7 @@ TexInstr::TexInstr(Opcode op,
m_inst_mode(0),
m_resource_id(rid)
{
memset(m_offset, 0, sizeof(m_offset));
memset(m_coord_offset, 0, sizeof(m_coord_offset));
m_src.add_use(this);
}
@ -69,14 +69,14 @@ void
TexInstr::set_offset(unsigned index, int32_t val)
{
assert(index < 3);
m_offset[index] = val;
m_coord_offset[index] = val;
}
int
TexInstr::get_offset(unsigned index) const
{
assert(index < 3);
return m_offset[index] << 1;
return m_coord_offset[index] << 1;
}
void
@ -108,7 +108,7 @@ TexInstr::is_equal_to(const TexInstr& lhs) const
return false;
for (int i = 0; i < 3; ++i) {
if (m_offset[i] != lhs.m_offset[i])
if (m_coord_offset[i] != lhs.m_coord_offset[i])
return false;
}
return m_inst_mode == lhs.m_inst_mode && resource_base() == lhs.resource_base() &&
@ -158,12 +158,12 @@ TexInstr::do_print(std::ostream& os) const
if (resource_offset())
os << " SO:" << *resource_offset();
if (m_offset[0])
os << " OX:" << m_offset[0];
if (m_offset[1])
os << " OY:" << m_offset[1];
if (m_offset[2])
os << " OZ:" << m_offset[2];
if (m_coord_offset[0])
os << " OX:" << m_coord_offset[0];
if (m_coord_offset[1])
os << " OY:" << m_coord_offset[1];
if (m_coord_offset[2])
os << " OZ:" << m_coord_offset[2];
if (m_inst_mode || is_gather(m_opcode))
os << " MODE:" << m_inst_mode;

View file

@ -191,7 +191,7 @@ private:
RegisterVec4 m_src;
std::bitset<num_tex_flag> m_tex_flags;
int m_offset[3];
int m_coord_offset[3];
int m_inst_mode;
unsigned m_resource_id;