[Mesa-dev] [PATCH 00/10] i965: always mark used surfaces in the visitors

Iago Toral Quiroga itoral at igalia.com
Fri Oct 30 04:11:52 PDT 2015


Right now some opcodes that only use constant surface indexing mark them as
used in the generator while others do it in the visitor. When the opcode can
handle both direct and indirect surface indexing then some opcodes handle
only the constant part in the generator and leave the indirect case to the
caller. It is all very inconsistent and leads to confusion, since one has to
go and look into the generator code in each case to check if it marks surfaces
as used or not, and in which cases.

when I was working on SSBOs I was tempted to try and fix this but then I
forgot. Jordan bumped into this recently too when comparing visitor
code paths for similar opcodes (ubos and ssbos) that need to handle this
differently because they use different generator opcodes.

Since the generator opcodes never handle marking of indirect surfaces, just
leave surface marking to the caller completely, since callers always have
all the information needed for this. It also makes things more consistent
and clear for everyone: marking surfaces as used is always on the side
of the visitor, never the generator.

No piglit regressions observed in my IVB laptop. Would be nice to have
someone giving this a try with Jenkins though, to make sure I did not miss
anything in paths specific to other gens.

Iago Toral Quiroga (10):
  i965/fs: Do not mark direct used surfaces in
    VARYING_PULL_CONSTANT_LOAD
  i965/fs: Do not mark used direct surfaces in
    UNIFORM_PULL_CONSTANT_LOAD
  i965/fs: Do not mark used direct surfaces in the generator for texture
    opcodes
  i965/vec4: Do not mark used direct surfaces in
    VS_OPCODE_PULL_CONSTANT_LOAD
  i965/vec4: Do not mark used direct surfaces in the generator for
    texture opcodes
  i965/vec4: Do not mark used surfaces in SHADER_OPCODE_SHADER_TIME_ADD
  i965/fs: Do not mark used surfaces in SHADER_OPCODE_SHADER_TIME_ADD
  i965/vec4: Do not mark used surfaces in VS_OPCODE_GET_BUFFER_SIZE
  i965/fs: Do not mark used surfaces in FS_OPCODE_GET_BUFFER_SIZE
  i965/fs: Do not mark used surfaces in
    FS_OPCODE_FB_WRITE/FS_OPCODE_REP_FB_WRITE

 src/mesa/drivers/dri/i965/brw_fs.cpp             | 12 ++++++-
 src/mesa/drivers/dri/i965/brw_fs.h               |  3 +-
 src/mesa/drivers/dri/i965/brw_fs_generator.cpp   | 31 -----------------
 src/mesa/drivers/dri/i965/brw_fs_nir.cpp         | 35 +++++++++++++------
 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp     | 24 ++++++++-----
 src/mesa/drivers/dri/i965/brw_vec4.cpp           |  3 ++
 src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 19 ----------
 src/mesa/drivers/dri/i965/brw_vec4_nir.cpp       | 44 +++++++++++++++---------
 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp   |  7 ++--
 9 files changed, 87 insertions(+), 91 deletions(-)

-- 
1.9.1



More information about the mesa-dev mailing list