Mesa (staging/21.2): intel/fs: fix framebuffer reads
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Aug 31 16:27:42 UTC 2021
Module: Mesa
Branch: staging/21.2
Commit: 25f91e6ab9c0f1efbcae820f2973b447d01550fb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=25f91e6ab9c0f1efbcae820f2973b447d01550fb
Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date: Mon Aug 30 13:03:26 2021 +0300
intel/fs: fix framebuffer reads
We're missing some restrictions on those messages.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5292
Cc: mesa-stable
Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12615>
(cherry picked from commit 838c0e5eefd444df701b6d9cbcef1b06eb5eb207)
---
.pick_status.json | 2 +-
src/intel/compiler/brw_fs.cpp | 14 ++++++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.pick_status.json b/.pick_status.json
index 3514a1cc1f9..18235d38cff 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -31,7 +31,7 @@
"description": "intel/fs: fix framebuffer reads",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
index 2735a430ec3..8fbb35cf7c0 100644
--- a/src/intel/compiler/brw_fs.cpp
+++ b/src/intel/compiler/brw_fs.cpp
@@ -4871,6 +4871,20 @@ lower_fb_read_logical_send(const fs_builder &bld, fs_inst *inst)
}
}
+ /* BSpec 12470 (Gfx8-11), BSpec 47842 (Gfx12+) :
+ *
+ * "Must be zero for Render Target Read message."
+ *
+ * For bits :
+ * - 14 : Stencil Present to Render Target
+ * - 13 : Source Depth Present to Render Target
+ * - 12 : oMask to Render Target
+ * - 11 : Source0 Alpha Present to Render Target
+ */
+ ubld.group(1, 0).AND(component(header, 0),
+ component(header, 0),
+ brw_imm_ud(~INTEL_MASK(14, 11)));
+
inst->resize_sources(1);
inst->src[0] = header;
inst->opcode = FS_OPCODE_FB_READ;
More information about the mesa-commit
mailing list