diff options
author | Francisco Jerez <currojerez@riseup.net> | 2015-02-20 20:14:24 +0200 |
---|---|---|
committer | Francisco Jerez <currojerez@riseup.net> | 2015-05-04 17:44:17 +0300 |
commit | c74511f5dc239eefb8604294c6c1e57b3a394111 (patch) | |
tree | 0e662f48a30bd50c0acfe48cc895ef007a4e610b /src/mesa/drivers/dri/i965/brw_defines.h | |
parent | ce0e15172157b6fa11feabb3ff0672abfb273884 (diff) | |
download | external_mesa3d-c74511f5dc239eefb8604294c6c1e57b3a394111.zip external_mesa3d-c74511f5dc239eefb8604294c6c1e57b3a394111.tar.gz external_mesa3d-c74511f5dc239eefb8604294c6c1e57b3a394111.tar.bz2 |
i965: Introduce the BROADCAST pseudo-opcode.
The BROADCAST instruction picks the channel from its first source
given by an index passed in as second source. This will be used in
situations where all channels from the same SIMD thread have to agree
on the value of something, e.g. a surface binding table index.
This is in particular the case for UBO, sampler and image arrays,
which can be indexed dynamically with the restriction that all active
SIMD channels access the same index, provided to the shared unit as
part of a single scalar field of the message descriptor. Simply
taking the index value from the first channel as we were doing until
now is incorrect, because it might contain an uninitialized value if
the channel had previously been disabled by non-uniform control flow.
v2: Minor style fixes. Improve commit message.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_defines.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_defines.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h index 634885b..5072e68 100644 --- a/src/mesa/drivers/dri/i965/brw_defines.h +++ b/src/mesa/drivers/dri/i965/brw_defines.h @@ -918,6 +918,12 @@ enum opcode { SHADER_OPCODE_URB_WRITE_SIMD8, + /** + * Pick the channel from its first source register given by the index + * specified as second source. Useful for variable indexing of surfaces. + */ + SHADER_OPCODE_BROADCAST, + VEC4_OPCODE_MOV_BYTES, VEC4_OPCODE_PACK_BYTES, VEC4_OPCODE_UNPACK_UNIFORM, |