intel/compiler: Introduce a new brw_isa_info structure

This structure will contain the opcode mapping tables in the next
commit.  For now, this is the mechanical change to plumb it into all
the necessary places, and it continues simply holding devinfo.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17309>
This commit is contained in:
Kenneth Graunke
2022-06-29 14:13:31 -07:00
committed by Marge Bot
parent 342471e93d
commit 72e9843991
48 changed files with 541 additions and 399 deletions

View File

@@ -183,7 +183,7 @@ print_cs_prog_data_fields(FILE *fp, const char *prefix, const char *pad,
static void
print_kernel(FILE *fp, const char *prefix,
const struct brw_kernel *kernel,
const struct intel_device_info *devinfo)
const struct brw_isa_info *isa)
{
struct mesa_sha1 sha1_ctx;
_mesa_sha1_init(&sha1_ctx);
@@ -231,7 +231,7 @@ print_kernel(FILE *fp, const char *prefix,
fprintf(fp, "#if 0 /* BEGIN KERNEL ASSEMBLY */\n");
fprintf(fp, "\n");
intel_disassemble(devinfo, kernel->code, 0, fp);
intel_disassemble(isa, kernel->code, 0, fp);
fprintf(fp, "\n");
fprintf(fp, "#endif /* END KERNEL ASSEMBLY */\n");
print_u32_data(fp, prefix, "code", kernel->code,
@@ -386,6 +386,9 @@ int main(int argc, char **argv)
return -1;
}
struct brw_isa_info _isa, *isa = &_isa;
brw_init_isa_info(isa, devinfo);
if (entry_point == NULL) {
fprintf(stderr, "No entry-point name specified.\n");
print_usage(argv[0], stderr);
@@ -559,10 +562,10 @@ int main(int argc, char **argv)
if (outfile != NULL) {
FILE *fp = fopen(outfile, "w");
print_kernel(fp, prefix, &kernel, devinfo);
print_kernel(fp, prefix, &kernel, isa);
fclose(fp);
} else {
print_kernel(stdout, prefix, &kernel, devinfo);
print_kernel(stdout, prefix, &kernel, isa);
}
ralloc_free(mem_ctx);