intel/compiler: use existing helpers to pull bits of descriptors
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 22 Oct 2020 10:25:33 +0000 (13:25 +0300)
committerMarge Bot <eric+marge@anholt.net>
Sun, 2 May 2021 20:20:06 +0000 (20:20 +0000)
v2: Use new RT descriptor helper

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7455>

src/intel/compiler/brw_schedule_instructions.cpp

index 77e1d53..78a3663 100644 (file)
@@ -25,6 +25,7 @@
  *
  */
 
+#include "brw_eu.h"
 #include "brw_fs.h"
 #include "brw_fs_live_variables.h"
 #include "brw_vec4.h"
@@ -66,6 +67,7 @@ public:
    void set_latency_gfx4();
    void set_latency_gfx7(bool is_haswell);
 
+   const struct intel_device_info *devinfo;
    backend_instruction *inst;
    schedule_node **children;
    int *child_latency;
@@ -398,7 +400,7 @@ schedule_node::set_latency_gfx7(bool is_haswell)
       }
 
       case GFX6_SFID_DATAPORT_RENDER_CACHE:
-         switch ((inst->desc >> 14) & 0x1f) {
+         switch (brw_fb_desc_msg_type(devinfo, inst->desc)) {
          case GFX7_DATAPORT_RC_TYPED_SURFACE_WRITE:
          case GFX7_DATAPORT_RC_TYPED_SURFACE_READ:
             /* See also SHADER_OPCODE_TYPED_SURFACE_READ */
@@ -918,6 +920,7 @@ schedule_node::schedule_node(backend_instruction *inst,
 {
    const struct intel_device_info *devinfo = sched->bs->devinfo;
 
+   this->devinfo = devinfo;
    this->inst = inst;
    this->child_array_size = 0;
    this->children = NULL;