Pre-work for shader disassembly label support.
From: "Lonnberg, Toni" <toni.lonnberg@intel.com>
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4245>
#include "brw_eu.h"
#include "util/half_float.h"
#include "brw_eu.h"
#include "util/half_float.h"
-static bool
-has_jip(const struct gen_device_info *devinfo, enum opcode opcode)
+bool
+brw_has_jip(const struct gen_device_info *devinfo, enum opcode opcode)
{
if (devinfo->gen < 6)
return false;
{
if (devinfo->gen < 6)
return false;
opcode == BRW_OPCODE_HALT;
}
opcode == BRW_OPCODE_HALT;
}
-static bool
-has_uip(const struct gen_device_info *devinfo, enum opcode opcode)
+bool
+brw_has_uip(const struct gen_device_info *devinfo, enum opcode opcode)
{
if (devinfo->gen < 6)
return false;
{
if (devinfo->gen < 6)
return false;
if (opcode == BRW_OPCODE_SEND && devinfo->gen < 6)
format(file, " %"PRIu64, brw_inst_base_mrf(devinfo, inst));
if (opcode == BRW_OPCODE_SEND && devinfo->gen < 6)
format(file, " %"PRIu64, brw_inst_base_mrf(devinfo, inst));
- if (has_uip(devinfo, opcode)) {
+ if (brw_has_uip(devinfo, opcode)) {
/* Instructions that have UIP also have JIP. */
pad(file, 16);
format(file, "JIP: %d", brw_inst_jip(devinfo, inst));
pad(file, 32);
format(file, "UIP: %d", brw_inst_uip(devinfo, inst));
/* Instructions that have UIP also have JIP. */
pad(file, 16);
format(file, "JIP: %d", brw_inst_jip(devinfo, inst));
pad(file, 32);
format(file, "UIP: %d", brw_inst_uip(devinfo, inst));
- } else if (has_jip(devinfo, opcode)) {
+ } else if (brw_has_jip(devinfo, opcode)) {
pad(file, 16);
if (devinfo->gen >= 7) {
format(file, "JIP: %d", brw_inst_jip(devinfo, inst));
pad(file, 16);
if (devinfo->gen >= 7) {
format(file, "JIP: %d", brw_inst_jip(devinfo, inst));
void brw_init_codegen(const struct gen_device_info *, struct brw_codegen *p,
void *mem_ctx);
void brw_init_codegen(const struct gen_device_info *, struct brw_codegen *p,
void *mem_ctx);
+bool brw_has_jip(const struct gen_device_info *devinfo, enum opcode opcode);
+bool brw_has_uip(const struct gen_device_info *devinfo, enum opcode opcode);
int brw_disassemble_inst(FILE *file, const struct gen_device_info *devinfo,
const struct brw_inst *inst, bool is_compacted);
void brw_disassemble(const struct gen_device_info *devinfo,
int brw_disassemble_inst(FILE *file, const struct gen_device_info *devinfo,
const struct brw_inst *inst, bool is_compacted);
void brw_disassemble(const struct gen_device_info *devinfo,