diff options
author | Jason Ekstrand <[email protected]> | 2016-11-28 18:13:02 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-11-29 07:44:01 -0800 |
commit | faf20df143a63e58aa729446f21c38ae39a438f2 (patch) | |
tree | e110100e593499830d36f4e84d9151056f0fff68 /src/mesa/drivers/dri/i965/brw_defines.h | |
parent | 05533ce418851b12fd0a1e940a633f9280203aab (diff) |
i965/fs: Refactor handling of constant tg4 offsets
Previously, we had an OFFSET_VALUE source for logical texture instructions
that was intended to mean exactly what it says, "offset". In reality, we
only fully used it for tg4 offsets. We used offset_value.file == IMM to
mean, "you have a constant offset, go look in instr->offset" and didn't
actually use the contents of the register at all in that case except for
in nir_emit_texture where we used it as a temporary before we copy it into
instr->offset.
This commit renames OFFSET_VALUE to TG4_OFFSET and restricts its usage to
indirect tg4 offsets only. The nir_emit_texture code is refactored so that
we explicitly build a header_bits value which is placed in instr->offset
and the constant offset values (both for tg4 and regular texture
operations) are used to construct header_bits and don't go through the
offset source at all. Finally, we stop passing offset_value in to
lower_sampler_logical_send_gen5 because we can't do indirect offsets until
gen7 anyway.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_defines.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_defines.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h index 84a51b48cc6..f22a52f7394 100644 --- a/src/mesa/drivers/dri/i965/brw_defines.h +++ b/src/mesa/drivers/dri/i965/brw_defines.h @@ -1420,7 +1420,7 @@ enum tex_logical_srcs { /** Texture sampler index */ TEX_LOGICAL_SRC_SAMPLER, /** Texel offset for gathers */ - TEX_LOGICAL_SRC_OFFSET_VALUE, + TEX_LOGICAL_SRC_TG4_OFFSET, /** REQUIRED: Number of coordinate components (as UD immediate) */ TEX_LOGICAL_SRC_COORD_COMPONENTS, /** REQUIRED: Number of derivative components (as UD immediate) */ |