summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_defines.h
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2016-05-19 00:10:03 -0700
committerFrancisco Jerez <currojerez@riseup.net>2016-05-27 23:29:04 -0700
commit81bc6de8c0f7faafd0f3b0aee944a14ba3ef0b64 (patch)
tree15be42f1cedc34eb105d7d8fb7d0838c5c9a005c /src/mesa/drivers/dri/i965/brw_defines.h
parent41562eb8f33558f02ff8f53b3094a0e6d54e4c49 (diff)
downloadexternal_mesa3d-81bc6de8c0f7faafd0f3b0aee944a14ba3ef0b64.zip
external_mesa3d-81bc6de8c0f7faafd0f3b0aee944a14ba3ef0b64.tar.gz
external_mesa3d-81bc6de8c0f7faafd0f3b0aee944a14ba3ef0b64.tar.bz2
i965/ir: Make BROADCAST emit an unmasked single-channel move.
Alternatively we could have extended the current semantics to 32-wide mode by changing brw_broadcast() to emit multiple indexed MOV instructions in the generator copying the selected value to all destination registers, but it seemed rather silly to waste EU cycles unnecessarily copying the exact same value 32 times in the GRF. The vstride change in the Align16 path is required to avoid assertions in validate_reg() since the change causes the execution size of the MOV and SEL instructions to be equal to the source region width. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_defines.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_defines.h6
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 a5f3b52..51eb856 100644
--- a/src/mesa/drivers/dri/i965/brw_defines.h
+++ b/src/mesa/drivers/dri/i965/brw_defines.h
@@ -1082,6 +1082,12 @@ enum opcode {
/**
* Pick the channel from its first source register given by the index
* specified as second source. Useful for variable indexing of surfaces.
+ *
+ * Note that because the result of this instruction is by definition
+ * uniform and it can always be splatted to multiple channels using a
+ * scalar regioning mode, only the first channel of the destination region
+ * is guaranteed to be updated, which implies that BROADCAST instructions
+ * should usually be marked force_writemask_all.
*/
SHADER_OPCODE_BROADCAST,