浏览代码

i965: Add a new debug mode for the VUE map

INTEL_DEBUG=vue now emits a listing of each slot in the VUE map,
and the corresponding interpolation mode.

V2: Fix whitespace issues.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
tags/mesa-10.1-devel
Chris Forbes 12 年前
父节点
当前提交
e114b13dae

+ 27
- 0
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));
}
}
}



+ 1
- 0
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 }
};


+ 1
- 0
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"

正在加载...
取消
保存