diff options
author | Michal Krol <michal@vmware.com> | 2010-01-05 11:48:32 +0100 |
---|---|---|
committer | Michal Krol <michal@vmware.com> | 2010-01-05 11:48:32 +0100 |
commit | 76ff89d2de3807f316954aa97ffdbb51bb3b6966 (patch) | |
tree | 7b71723f547780d985c574c25c192a4cb7f739d1 /src/gallium/auxiliary/draw/draw_pt_fetch.c | |
parent | 9b21b3c52a8a7d58d08151d1a6bf25c472dec213 (diff) | |
download | external_mesa3d-76ff89d2de3807f316954aa97ffdbb51bb3b6966.zip external_mesa3d-76ff89d2de3807f316954aa97ffdbb51bb3b6966.tar.gz external_mesa3d-76ff89d2de3807f316954aa97ffdbb51bb3b6966.tar.bz2 |
gallium: Handle InstanceID as a true 32-bit uint.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_fetch.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_fetch.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch.c b/src/gallium/auxiliary/draw/draw_pt_fetch.c index 36c27e2..55e7a7b 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch.c @@ -107,19 +107,24 @@ void draw_pt_fetch_prepare( struct pt_fetch *fetch, for (i = 0; i < nr_inputs; i++) { if (i == instance_id_index) { key.element[nr].type = TRANSLATE_ELEMENT_INSTANCE_ID; - key.element[nr].input_format = PIPE_FORMAT_R32_FLOAT; /* XXX: Make it UINT. */ + key.element[nr].input_format = PIPE_FORMAT_R32_USCALED; + key.element[nr].output_format = PIPE_FORMAT_R32_USCALED; + key.element[nr].output_offset = dst_offset; + + dst_offset += sizeof(uint); } else { key.element[nr].type = TRANSLATE_ELEMENT_NORMAL; key.element[nr].input_format = draw->pt.vertex_element[ei].src_format; key.element[nr].input_buffer = draw->pt.vertex_element[ei].vertex_buffer_index; key.element[nr].input_offset = draw->pt.vertex_element[ei].src_offset; key.element[nr].instance_divisor = draw->pt.vertex_element[ei].instance_divisor; + key.element[nr].output_format = PIPE_FORMAT_R32G32B32A32_FLOAT; + key.element[nr].output_offset = dst_offset; + ei++; + dst_offset += 4 * sizeof(float); } - key.element[nr].output_format = PIPE_FORMAT_R32G32B32A32_FLOAT; - key.element[nr].output_offset = dst_offset; - dst_offset += 4 * sizeof(float); nr++; } |