Mesa (main): intel/compiler: Prepare ld2dms_w for 4 mcs components
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Nov 23 07:08:04 UTC 2021
Module: Mesa
Branch: main
Commit: 24831bbd40784c3b24fb95632b9f8e09f6432ace
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=24831bbd40784c3b24fb95632b9f8e09f6432ace
Author: Topi Pohjolainen <topi.pohjolainen at intel.com>
Date: Tue Jul 7 23:18:53 2020 -0700
intel/compiler: Prepare ld2dms_w for 4 mcs components
Reviewed-by: Sagar Ghuge <sagar.ghuge at intel.com>
Reviewed-by: Francisco Jerez <currojerez at riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11766>
---
src/intel/compiler/brw_fs.cpp | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
index d45a317b66e..a39c4297cf1 100644
--- a/src/intel/compiler/brw_fs.cpp
+++ b/src/intel/compiler/brw_fs.cpp
@@ -5424,20 +5424,23 @@ lower_sampler_logical_send_gfx7(const fs_builder &bld, fs_inst *inst, opcode op,
bld.MOV(retype(sources[length++], payload_unsigned_type), sample_index);
}
+ /* Data from the multisample control surface. */
if (op == SHADER_OPCODE_TXF_CMS || op == SHADER_OPCODE_TXF_CMS_W) {
- /* Data from the multisample control surface. */
- bld.MOV(retype(sources[length], payload_unsigned_type), mcs);
- length++;
+ unsigned num_mcs_components = 1;
- /* On Gfx9+ we'll use ld2dms_w instead which has two registers for
- * the MCS data.
+ /* From the Gfx12HP BSpec: Render Engine - 3D and GPGPU Programs -
+ * Shared Functions - 3D Sampler - Messages - Message Format:
+ *
+ * ld2dms_w si mcs0 mcs1 mcs2 mcs3 u v r
*/
- if (op == SHADER_OPCODE_TXF_CMS_W) {
- bld.MOV(retype(sources[length], payload_unsigned_type),
- mcs.file == IMM ?
- mcs :
- offset(mcs, bld, 1));
- length++;
+ if (devinfo->verx10 >= 125 && op == SHADER_OPCODE_TXF_CMS_W)
+ num_mcs_components = 4;
+ else if (op == SHADER_OPCODE_TXF_CMS_W)
+ num_mcs_components = 2;
+
+ for (unsigned i = 0; i < num_mcs_components; ++i) {
+ bld.MOV(retype(sources[length++], payload_unsigned_type),
+ mcs.file == IMM ? mcs : offset(mcs, bld, i));
}
}
More information about the mesa-commit
mailing list