summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/tgsi
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/tgsi')
-rw-r--r--src/mesa/pipe/tgsi/exec/tgsi_exec.c10
-rwxr-xr-xsrc/mesa/pipe/tgsi/exec/tgsi_sse2.c53
-rw-r--r--src/mesa/pipe/tgsi/util/tgsi_build.c1
-rw-r--r--src/mesa/pipe/tgsi/util/tgsi_dump.c3
-rw-r--r--src/mesa/pipe/tgsi/util/tgsi_parse.c1
-rw-r--r--src/mesa/pipe/tgsi/util/tgsi_util.c1
6 files changed, 40 insertions, 29 deletions
diff --git a/src/mesa/pipe/tgsi/exec/tgsi_exec.c b/src/mesa/pipe/tgsi/exec/tgsi_exec.c
index dcc39362a9..336ae1c8b6 100644
--- a/src/mesa/pipe/tgsi/exec/tgsi_exec.c
+++ b/src/mesa/pipe/tgsi/exec/tgsi_exec.c
@@ -143,7 +143,7 @@ tgsi_exec_prepare( struct tgsi_exec_machine *mach )
k = tgsi_parse_init( &parse, mach->Tokens );
if (k != TGSI_PARSE_OK) {
- fprintf(stderr, "Problem parsing!\n");
+ debug_printf("Problem parsing!\n");
return;
}
@@ -249,7 +249,7 @@ tgsi_exec_machine_init(
k = tgsi_parse_init (&parse, mach->Tokens);
if (k != TGSI_PARSE_OK) {
- fprintf( stderr, "Problem parsing!\n" );
+ debug_printf( "Problem parsing!\n" );
return;
}
@@ -1236,7 +1236,7 @@ exec_tex(struct tgsi_exec_machine *mach,
uint chan_index;
float lodBias;
- /* printf("Sampler %u unit %u\n", sampler, unit); */
+ /* debug_printf("Sampler %u unit %u\n", sampler, unit); */
switch (inst->InstructionExtTexture.Texture) {
case TGSI_TEXTURE_1D:
@@ -2010,7 +2010,7 @@ exec_instruction(
case TGSI_OPCODE_TXB:
/* Texture lookup with lod bias */
- /* src[0] = texcoord (src[0].w = load bias) */
+ /* src[0] = texcoord (src[0].w = LOD bias) */
/* src[1] = sampler unit */
exec_tex(mach, inst, TRUE);
break;
@@ -2026,7 +2026,7 @@ exec_instruction(
case TGSI_OPCODE_TXL:
/* Texture lookup with explit LOD */
- /* src[0] = texcoord (src[0].w = load bias) */
+ /* src[0] = texcoord (src[0].w = LOD) */
/* src[1] = sampler unit */
exec_tex(mach, inst, TRUE);
break;
diff --git a/src/mesa/pipe/tgsi/exec/tgsi_sse2.c b/src/mesa/pipe/tgsi/exec/tgsi_sse2.c
index f8660e7ad1..40bacf8552 100755
--- a/src/mesa/pipe/tgsi/exec/tgsi_sse2.c
+++ b/src/mesa/pipe/tgsi/exec/tgsi_sse2.c
@@ -48,28 +48,28 @@ _print_reg(
case file_REG32:
switch( reg.idx ) {
case reg_AX:
- printf( "EAX" );
+ debug_printf( "EAX" );
break;
case reg_CX:
- printf( "ECX" );
+ debug_printf( "ECX" );
break;
case reg_DX:
- printf( "EDX" );
+ debug_printf( "EDX" );
break;
case reg_BX:
- printf( "EBX" );
+ debug_printf( "EBX" );
break;
case reg_SP:
- printf( "ESP" );
+ debug_printf( "ESP" );
break;
case reg_BP:
- printf( "EBP" );
+ debug_printf( "EBP" );
break;
case reg_SI:
- printf( "ESI" );
+ debug_printf( "ESI" );
break;
case reg_DI:
- printf( "EDI" );
+ debug_printf( "EDI" );
break;
}
break;
@@ -77,7 +77,7 @@ _print_reg(
assert( 0 );
break;
case file_XMM:
- printf( "XMM%u", reg.idx );
+ debug_printf( "XMM%u", reg.idx );
break;
case file_x87:
assert( 0 );
@@ -92,35 +92,35 @@ _fill(
unsigned count = 10 - strlen( op );
while( count-- ) {
- printf( " " );
+ debug_printf( " " );
}
}
-#define DUMP_START() printf( "\nsse-dump start ----------------" )
-#define DUMP_END() printf( "\nsse-dump end ----------------\n" )
-#define DUMP( OP ) printf( "\n%s", OP )
+#define DUMP_START() debug_printf( "\nsse-dump start ----------------" )
+#define DUMP_END() debug_printf( "\nsse-dump end ----------------\n" )
+#define DUMP( OP ) debug_printf( "\n%s", OP )
#define DUMP_I( OP, I ) do {\
- printf( "\n%s", OP );\
+ debug_printf( "\n%s", OP );\
_fill( OP );\
- printf( "%u", I ); } while( 0 )
+ debug_printf( "%u", I ); } while( 0 )
#define DUMP_R( OP, R0 ) do {\
- printf( "\n%s", OP );\
+ debug_printf( "\n%s", OP );\
_fill( OP );\
_print_reg( R0 ); } while( 0 )
#define DUMP_RR( OP, R0, R1 ) do {\
- printf( "\n%s", OP );\
+ debug_printf( "\n%s", OP );\
_fill( OP );\
_print_reg( R0 );\
- printf( ", " );\
+ debug_printf( ", " );\
_print_reg( R1 ); } while( 0 )
#define DUMP_RRI( OP, R0, R1, I ) do {\
- printf( "\n%s", OP );\
+ debug_printf( "\n%s", OP );\
_fill( OP );\
_print_reg( R0 );\
- printf( ", " );\
+ debug_printf( ", " );\
_print_reg( R1 );\
- printf( ", " );\
- printf( "%u", I ); } while( 0 )
+ debug_printf( ", " );\
+ debug_printf( "%u", I ); } while( 0 )
#else
@@ -198,9 +198,15 @@ get_output_base( void )
static struct x86_reg
get_temp_base( void )
{
+#ifdef WIN32
return x86_make_reg(
file_REG32,
reg_BX );
+#else
+ return x86_make_reg(
+ file_REG32,
+ reg_SI );
+#endif
}
static struct x86_reg
@@ -2248,8 +2254,7 @@ tgsi_emit_sse2(
case TGSI_TOKEN_TYPE_IMMEDIATE:
/* XXX implement this */
- assert(0);
- break;
+ return 0;
default:
assert( 0 );
diff --git a/src/mesa/pipe/tgsi/util/tgsi_build.c b/src/mesa/pipe/tgsi/util/tgsi_build.c
index 67f7d2c2c2..a00ff1c2a5 100644
--- a/src/mesa/pipe/tgsi/util/tgsi_build.c
+++ b/src/mesa/pipe/tgsi/util/tgsi_build.c
@@ -1,3 +1,4 @@
+#include "pipe/p_debug.h"
#include "pipe/p_util.h"
#include "pipe/p_shader_tokens.h"
#include "tgsi_build.h"
diff --git a/src/mesa/pipe/tgsi/util/tgsi_dump.c b/src/mesa/pipe/tgsi/util/tgsi_dump.c
index cdbc0dbc9c..b5c54847e0 100644
--- a/src/mesa/pipe/tgsi/util/tgsi_dump.c
+++ b/src/mesa/pipe/tgsi/util/tgsi_dump.c
@@ -25,6 +25,9 @@
*
**************************************************************************/
+#include <stdio.h>
+
+#include "pipe/p_debug.h"
#include "pipe/p_util.h"
#include "pipe/p_shader_tokens.h"
#include "tgsi_dump.h"
diff --git a/src/mesa/pipe/tgsi/util/tgsi_parse.c b/src/mesa/pipe/tgsi/util/tgsi_parse.c
index f0f8d44ac2..bf6b89ce56 100644
--- a/src/mesa/pipe/tgsi/util/tgsi_parse.c
+++ b/src/mesa/pipe/tgsi/util/tgsi_parse.c
@@ -25,6 +25,7 @@
*
**************************************************************************/
+#include "pipe/p_debug.h"
#include "pipe/p_util.h"
#include "pipe/p_shader_tokens.h"
#include "tgsi_parse.h"
diff --git a/src/mesa/pipe/tgsi/util/tgsi_util.c b/src/mesa/pipe/tgsi/util/tgsi_util.c
index 1e76b0f133..4cdd89182a 100644
--- a/src/mesa/pipe/tgsi/util/tgsi_util.c
+++ b/src/mesa/pipe/tgsi/util/tgsi_util.c
@@ -1,3 +1,4 @@
+#include "pipe/p_debug.h"
#include "pipe/p_util.h"
#include "pipe/p_shader_tokens.h"
#include "tgsi_parse.h"