summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/translate
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2010-01-05 11:48:32 +0100
committerMichal Krol <[email protected]>2010-01-05 11:48:32 +0100
commit76ff89d2de3807f316954aa97ffdbb51bb3b6966 (patch)
tree7b71723f547780d985c574c25c192a4cb7f739d1 /src/gallium/auxiliary/translate
parent9b21b3c52a8a7d58d08151d1a6bf25c472dec213 (diff)
gallium: Handle InstanceID as a true 32-bit uint.
Diffstat (limited to 'src/gallium/auxiliary/translate')
-rw-r--r--src/gallium/auxiliary/translate/translate_sse.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/src/gallium/auxiliary/translate/translate_sse.c b/src/gallium/auxiliary/translate/translate_sse.c
index 8e152a002a3..c13e7427387 100644
--- a/src/gallium/auxiliary/translate/translate_sse.c
+++ b/src/gallium/auxiliary/translate/translate_sse.c
@@ -50,15 +50,13 @@ typedef void (PIPE_CDECL *run_func)( struct translate *translate,
unsigned start,
unsigned count,
unsigned instance_id,
- void *output_buffer,
- float instance_id_float );
+ void *output_buffer);
typedef void (PIPE_CDECL *run_elts_func)( struct translate *translate,
const unsigned *elts,
unsigned count,
unsigned instance_id,
- void *output_buffer,
- float instance_id_float );
+ void *output_buffer);
struct translate_buffer {
const void *base_ptr;
@@ -102,7 +100,6 @@ struct translate_sse {
boolean use_instancing;
unsigned instance_id;
- float instance_id_float; /* XXX: needed while no integer support in TGSI */
run_func gen_run;
run_elts_func gen_run_elts;
@@ -451,7 +448,7 @@ static struct x86_reg get_buffer_ptr( struct translate_sse *p,
{
if (var_idx == ELEMENT_BUFFER_INSTANCE_ID) {
return x86_make_disp(p->machine_EDX,
- get_offset(p, &p->instance_id_float));
+ get_offset(p, &p->instance_id));
}
if (linear && p->nr_buffer_varients == 1) {
return p->idx_EBX;
@@ -587,14 +584,6 @@ static boolean build_vertex_emit( struct translate_sse *p,
x86_mov(p->func,
x86_make_disp(p->machine_EDX, get_offset(p, &p->instance_id)),
p->tmp_EAX);
-
- /* XXX: temporary */
- x86_mov(p->func,
- p->tmp_EAX,
- x86_fn_arg(p->func, 6));
- x86_mov(p->func,
- x86_make_disp(p->machine_EDX, get_offset(p, &p->instance_id_float)),
- p->tmp_EAX);
}
/* Get vertex count, compare to zero
@@ -715,8 +704,7 @@ static void PIPE_CDECL translate_sse_run_elts( struct translate *translate,
elts,
count,
instance_id,
- output_buffer,
- (float)instance_id );
+ output_buffer);
}
static void PIPE_CDECL translate_sse_run( struct translate *translate,
@@ -731,8 +719,7 @@ static void PIPE_CDECL translate_sse_run( struct translate *translate,
start,
count,
instance_id,
- output_buffer,
- (float)instance_id);
+ output_buffer);
}