[Mesa-dev] [PATCH 1/6] intel/aubinator: Use brw_defines.h for command buffer opcodes
Toni Lönnberg
toni.lonnberg at intel.com
Mon Feb 20 13:27:13 UTC 2017
From: "Lonnberg, Toni" <toni.lonnberg at intel.com>
Pre-work for shader disassembly label support.
Adding label support of jump instructions for shader disassembly requires
including brw_eu.h for the handling of the INTEL_DEBUG flags. brw_eu.h
includes brw_defines.h which also defines the command buffer opcodes, so they
need to be removed from aubinator to avoid conflict.
---
src/intel/tools/aubinator.c | 47 ++++++++-------------------------------------
1 file changed, 8 insertions(+), 39 deletions(-)
diff --git a/src/intel/tools/aubinator.c b/src/intel/tools/aubinator.c
index e2bec8f..5fd6d54 100644
--- a/src/intel/tools/aubinator.c
+++ b/src/intel/tools/aubinator.c
@@ -42,6 +42,7 @@
#include "decoder.h"
#include "intel_aub.h"
#include "gen_disasm.h"
+#include "brw_eu.h"
/* Below is the only command missing from intel_aub.h in libdrm
* So, reuse intel_aub.h from libdrm and #define the
@@ -671,43 +672,10 @@ handle_load_register_imm(struct gen_spec *spec, uint32_t *p)
#define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
-#define STATE_BASE_ADDRESS 0x61010000
-
-#define MEDIA_INTERFACE_DESCRIPTOR_LOAD 0x70020000
-
-#define _3DSTATE_INDEX_BUFFER 0x780a0000
-#define _3DSTATE_VERTEX_BUFFERS 0x78080000
-
-#define _3DSTATE_VS 0x78100000
-#define _3DSTATE_GS 0x78110000
-#define _3DSTATE_HS 0x781b0000
-#define _3DSTATE_DS 0x781d0000
-
-#define _3DSTATE_CONSTANT_VS 0x78150000
-#define _3DSTATE_CONSTANT_GS 0x78160000
-#define _3DSTATE_CONSTANT_PS 0x78170000
-#define _3DSTATE_CONSTANT_HS 0x78190000
-#define _3DSTATE_CONSTANT_DS 0x781A0000
-
-#define _3DSTATE_PS 0x78200000
-
-#define _3DSTATE_BINDING_TABLE_POINTERS_VS 0x78260000
-#define _3DSTATE_BINDING_TABLE_POINTERS_HS 0x78270000
-#define _3DSTATE_BINDING_TABLE_POINTERS_DS 0x78280000
-#define _3DSTATE_BINDING_TABLE_POINTERS_GS 0x78290000
-#define _3DSTATE_BINDING_TABLE_POINTERS_PS 0x782a0000
-
-#define _3DSTATE_SAMPLER_STATE_POINTERS_VS 0x782b0000
-#define _3DSTATE_SAMPLER_STATE_POINTERS_GS 0x782e0000
-#define _3DSTATE_SAMPLER_STATE_POINTERS_PS 0x782f0000
-
-#define _3DSTATE_VIEWPORT_STATE_POINTERS_CC 0x78230000
-#define _3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP 0x78210000
-#define _3DSTATE_BLEND_STATE_POINTERS 0x78240000
-#define _3DSTATE_CC_STATE_POINTERS 0x780e0000
-#define _3DSTATE_SCISSOR_STATE_POINTERS 0x780f0000
-
-#define _MI_LOAD_REGISTER_IMM 0x11000000
+#define STATE_BASE_ADDRESS 0x6101
+#define _3DSTATE_INDEX_BUFFER 0x780a
+#define _3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP 0x7821
+#define _MI_LOAD_REGISTER_IMM 0x1100
struct custom_handler {
uint32_t opcode;
@@ -808,8 +776,7 @@ parse_commands(struct gen_spec *spec, uint32_t *cmds, int size, int engine)
}
for (i = 0; i < ARRAY_LENGTH(custom_handlers); i++) {
- if (gen_group_get_opcode(inst) ==
- custom_handlers[i].opcode)
+ if (gen_group_get_opcode(inst) == (custom_handlers[i].opcode << 16))
custom_handlers[i].handle(spec, p);
}
}
@@ -1240,6 +1207,8 @@ int main(int argc, char *argv[])
{ NULL, 0, NULL, 0 }
};
+ brw_process_intel_debug_variable();
+
i = 0;
while ((c = getopt_long(argc, argv, "", aubinator_opts, &i)) != -1) {
switch (c) {
--
2.7.4
More information about the mesa-dev
mailing list