X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fdrivers%2Fdri%2Fi915%2Fi915_debug.c;h=8eb1c5b49e1a41b8c068d254416e491feb8f43f1;hb=a856da63247a4b403f6350914f732e14d1530ed1;hp=c0e1242a0eae8bd289e984cdd1d8639a2373cafe;hpb=8cf9085bc7b96819d2bec1e749e15af58eefb2f3;p=mesa.git diff --git a/src/mesa/drivers/dri/i915/i915_debug.c b/src/mesa/drivers/dri/i915/i915_debug.c index c0e1242a0ea..8eb1c5b49e1 100644 --- a/src/mesa/drivers/dri/i915/i915_debug.c +++ b/src/mesa/drivers/dri/i915/i915_debug.c @@ -376,20 +376,25 @@ static void BR13( struct debug_stream *stream, } -static void BR22( struct debug_stream *stream, - GLuint val ) +static void BR2223( struct debug_stream *stream, + GLuint val22, GLuint val23 ) { - PRINTF("\t0x%08x\n", val); - BITS(val, 31, 16, "dest y1"); - BITS(val, 15, 0, "dest x1"); -} + union { GLuint val; short field[2]; } BR22, BR23; -static void BR23( struct debug_stream *stream, - GLuint val ) -{ - PRINTF("\t0x%08x\n", val); - BITS(val, 31, 16, "dest y2"); - BITS(val, 15, 0, "dest x2"); + BR22.val = val22; + BR23.val = val23; + + PRINTF("\t0x%08x\n", val22); + BITS(val22, 31, 16, "dest y1"); + BITS(val22, 15, 0, "dest x1"); + + PRINTF("\t0x%08x\n", val23); + BITS(val23, 31, 16, "dest y2"); + BITS(val23, 15, 0, "dest x2"); + + /* The blit engine may produce unexpected results when these aren't met */ + assert(BR22.field[0] < BR23.field[0]); + assert(BR22.field[1] < BR23.field[1]); } static void BR09( struct debug_stream *stream, @@ -436,8 +441,8 @@ static GLboolean debug_copy_blit( struct debug_stream *stream, PRINTF("\t0x%08x\n", ptr[j++]); BR13(stream, ptr[j++]); - BR22(stream, ptr[j++]); - BR23(stream, ptr[j++]); + BR2223(stream, ptr[j], ptr[j+1]); + j += 2; BR09(stream, ptr[j++]); BR26(stream, ptr[j++]); BR11(stream, ptr[j++]); @@ -459,8 +464,8 @@ static GLboolean debug_color_blit( struct debug_stream *stream, PRINTF("\t0x%08x\n", ptr[j++]); BR13(stream, ptr[j++]); - BR22(stream, ptr[j++]); - BR23(stream, ptr[j++]); + BR2223(stream, ptr[j], ptr[j+1]); + j += 2; BR09(stream, ptr[j++]); BR16(stream, ptr[j++]);