diff options
author | Jordan Justen <[email protected]> | 2018-02-26 20:31:22 -0800 |
---|---|---|
committer | Jordan Justen <[email protected]> | 2018-03-05 09:51:04 -0800 |
commit | 755e7e6c20b8778bd5becb516c437f44c7b37984 (patch) | |
tree | eab6e5a801118605ff59cbc0f5b47d86f3f848b2 /src/intel/common | |
parent | bd3392423ddc82f1e8fe63c10b673b1bb70decf3 (diff) |
intel/common: Use isl for decoder surface formats
Signed-off-by: Jordan Justen <[email protected]>
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Diffstat (limited to 'src/intel/common')
-rw-r--r-- | src/intel/common/gen_decoder.c | 8 | ||||
-rw-r--r-- | src/intel/common/meson.build | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/intel/common/gen_decoder.c b/src/intel/common/gen_decoder.c index 87a81b4b05a..7ca71c0d9fc 100644 --- a/src/intel/common/gen_decoder.c +++ b/src/intel/common/gen_decoder.c @@ -35,6 +35,7 @@ #include "gen_decoder.h" +#include "isl/isl.h" #include "genxml/genX_xml.h" #define XML_BUFFER_SIZE 4096 @@ -954,6 +955,13 @@ iter_decode_field(struct gen_field_iterator *iter) int length = strlen(iter->value); snprintf(iter->value + length, sizeof(iter->value) - length, " (%s)", enum_name); + } else if (strcmp(iter->name, "Surface Format") == 0) { + if (isl_format_is_valid((enum isl_format)v.qw)) { + const char *fmt_name = isl_format_get_name((enum isl_format)v.qw); + int length = strlen(iter->value); + snprintf(iter->value + length, sizeof(iter->value) - length, + " (%s)", fmt_name); + } } } diff --git a/src/intel/common/meson.build b/src/intel/common/meson.build index d35d5e8f78e..5e0394a5b86 100644 --- a/src/intel/common/meson.build +++ b/src/intel/common/meson.build @@ -38,5 +38,6 @@ libintel_common = static_library( files_libintel_common, include_directories : [inc_common, inc_intel], c_args : [c_vis_args, no_override_init_args], + link_with : [libisl], dependencies : [dep_expat, dep_libdrm, dep_thread], ) |