summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2009-11-25 16:08:36 +0100
committerMichal Krol <[email protected]>2009-11-25 16:08:36 +0100
commite13add8cae4637d9cd2f6c40c68de30701736abf (patch)
tree889e68563e14b6dacba8945bcec686041e0bd19e /src/gallium
parentea6b36ca3fe519e8c8dcb55b5f16353738455d0a (diff)
tgsi: Fix token builder.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_build.c33
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_build.h10
2 files changed, 2 insertions, 41 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c
index c35634c69a7..d80222bcf44 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_build.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_build.c
@@ -531,9 +531,7 @@ tgsi_build_full_instruction(
header);
}
- if( tgsi_compare_instruction_label(
- full_inst->Label,
- tgsi_default_instruction_label() ) ) {
+ if (full_inst->Instruction.Label) {
struct tgsi_instruction_label *instruction_label;
if( maxsize <= size )
@@ -550,9 +548,7 @@ tgsi_build_full_instruction(
prev_token = (struct tgsi_token *) instruction_label;
}
- if( tgsi_compare_instruction_texture(
- full_inst->Texture,
- tgsi_default_instruction_texture() ) ) {
+ if (full_inst->Instruction.Texture) {
struct tgsi_instruction_texture *instruction_texture;
if( maxsize <= size )
@@ -745,13 +741,6 @@ tgsi_build_instruction_predicate(int index,
return instruction_predicate;
}
-/** test for inequality of 32-bit values pointed to by a and b */
-static INLINE boolean
-compare32(const void *a, const void *b)
-{
- return *((uint32_t *) a) != *((uint32_t *) b);
-}
-
struct tgsi_instruction_label
tgsi_default_instruction_label( void )
{
@@ -763,15 +752,6 @@ tgsi_default_instruction_label( void )
return instruction_label;
}
-unsigned
-tgsi_compare_instruction_label(
- struct tgsi_instruction_label a,
- struct tgsi_instruction_label b )
-{
- a.Padding = b.Padding = 0;
- return compare32(&a, &b);
-}
-
struct tgsi_instruction_label
tgsi_build_instruction_label(
unsigned label,
@@ -801,15 +781,6 @@ tgsi_default_instruction_texture( void )
return instruction_texture;
}
-unsigned
-tgsi_compare_instruction_texture(
- struct tgsi_instruction_texture a,
- struct tgsi_instruction_texture b )
-{
- a.Padding = b.Padding = 0;
- return compare32(&a, &b);
-}
-
struct tgsi_instruction_texture
tgsi_build_instruction_texture(
unsigned texture,
diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.h b/src/gallium/auxiliary/tgsi/tgsi_build.h
index 0fbc8b1b0a9..f46f9b63071 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_build.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_build.h
@@ -174,11 +174,6 @@ tgsi_build_instruction_predicate(int index,
struct tgsi_instruction_label
tgsi_default_instruction_label( void );
-unsigned
-tgsi_compare_instruction_label(
- struct tgsi_instruction_label a,
- struct tgsi_instruction_label b );
-
struct tgsi_instruction_label
tgsi_build_instruction_label(
unsigned label,
@@ -189,11 +184,6 @@ tgsi_build_instruction_label(
struct tgsi_instruction_texture
tgsi_default_instruction_texture( void );
-unsigned
-tgsi_compare_instruction_texture(
- struct tgsi_instruction_texture a,
- struct tgsi_instruction_texture b );
-
struct tgsi_instruction_texture
tgsi_build_instruction_texture(
unsigned texture,