diff options
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_interpolation_map.c | 27 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_context.c | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_context.h | 1 |
3 files changed, 29 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_interpolation_map.c b/src/mesa/drivers/dri/i965/brw_interpolation_map.c index 7b7dbef1354..597fc965f54 100644 --- a/src/mesa/drivers/dri/i965/brw_interpolation_map.c +++ b/src/mesa/drivers/dri/i965/brw_interpolation_map.c @@ -23,6 +23,17 @@ #include "brw_state.h" +static char const *get_qual_name(int mode) +{ + switch (mode) { + case INTERP_QUALIFIER_NONE: return "none"; + case INTERP_QUALIFIER_FLAT: return "flat"; + case INTERP_QUALIFIER_SMOOTH: return "smooth"; + case INTERP_QUALIFIER_NOPERSPECTIVE: return "nopersp"; + default: return "???"; + } +} + /* Set up interpolation modes for every element in the VUE */ static void @@ -72,6 +83,22 @@ brw_setup_vue_interpolation(struct brw_context *brw) brw->interpolation_mode.mode[i] = mode; } + + if (unlikely(INTEL_DEBUG & DEBUG_VUE)) { + printf("VUE map:\n"); + for (int i = 0; i < vue_map->num_slots; i++) { + int varying = vue_map->slot_to_varying[i]; + if (varying == -1) { + printf("%d: --\n", i); + continue; + } + + printf("%d: %d %s ofs %d\n", + i, varying, + get_qual_name(brw->interpolation_mode.mode[i]), + brw_vue_slot_to_offset(i)); + } + } } diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c index 461d4931c41..840c1a5bf1b 100644 --- a/src/mesa/drivers/dri/i965/intel_context.c +++ b/src/mesa/drivers/dri/i965/intel_context.c @@ -332,6 +332,7 @@ static const struct dri_debug_control debug_control[] = { { "shader_time", DEBUG_SHADER_TIME }, { "no16", DEBUG_NO16 }, { "blorp", DEBUG_BLORP }, + { "vue", DEBUG_VUE }, { NULL, 0 } }; diff --git a/src/mesa/drivers/dri/i965/intel_context.h b/src/mesa/drivers/dri/i965/intel_context.h index 188ac895a5f..734c57cdc03 100644 --- a/src/mesa/drivers/dri/i965/intel_context.h +++ b/src/mesa/drivers/dri/i965/intel_context.h @@ -190,6 +190,7 @@ extern int INTEL_DEBUG; #define DEBUG_SHADER_TIME 0x8000000 #define DEBUG_BLORP 0x10000000 #define DEBUG_NO16 0x20000000 +#define DEBUG_VUE 0x40000000 #ifdef HAVE_ANDROID_PLATFORM #define LOG_TAG "INTEL-MESA" |