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/core/tgsi_dump.c4
-rw-r--r--src/mesa/pipe/tgsi/core/tgsi_util.c15
-rw-r--r--src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.h2
3 files changed, 17 insertions, 4 deletions
diff --git a/src/mesa/pipe/tgsi/core/tgsi_dump.c b/src/mesa/pipe/tgsi/core/tgsi_dump.c
index fecb246ab1..0345fd93f7 100644
--- a/src/mesa/pipe/tgsi/core/tgsi_dump.c
+++ b/src/mesa/pipe/tgsi/core/tgsi_dump.c
@@ -400,12 +400,16 @@ tgsi_dump(
GLuint deflt = !(flags & TGSI_DUMP_NO_DEFAULT);
{
+#if 0
static GLuint counter = 0;
char buffer[64];
sprintf( buffer, "sbir-dump-%.4u.txt", counter++ );
dump.file = fopen( buffer, "wt" );
+#else
+ dump.file = stderr;
dump.tabs = 0;
+#endif
}
tgsi_parse_init( &parse, tokens );
diff --git a/src/mesa/pipe/tgsi/core/tgsi_util.c b/src/mesa/pipe/tgsi/core/tgsi_util.c
index 2331affdfd..38d6d6e6bc 100644
--- a/src/mesa/pipe/tgsi/core/tgsi_util.c
+++ b/src/mesa/pipe/tgsi/core/tgsi_util.c
@@ -1,15 +1,22 @@
#include "tgsi_platform.h"
#include "tgsi_core.h"
+union pointer_hack
+{
+ void *pointer;
+ unsigned long long uint64;
+};
+
void *
tgsi_align_128bit(
void *unaligned )
{
- GLuint *ptr, addr;
+ union pointer_hack ph;
- ptr = (GLuint *) unaligned;
- addr = (*(GLuint *) &ptr + 15) & ~15;
- return *(void **) &addr;
+ ph.uint64 = 0;
+ ph.pointer = unaligned;
+ ph.uint64 = (ph.uint64 + 15) & ~15;
+ return ph.pointer;
}
GLuint
diff --git a/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.h b/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.h
index 4c1141e579..9256318997 100644
--- a/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.h
+++ b/src/mesa/pipe/tgsi/mesa/mesa_to_tgsi.h
@@ -5,6 +5,8 @@
extern "C" {
#endif // defined __cplusplus
+struct tgsi_token;
+
GLboolean
tgsi_mesa_compile_fp_program(
const struct gl_fragment_program *program,