diff options
author | Dave Airlie <[email protected]> | 2012-01-06 15:07:24 +0000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2012-01-07 08:31:43 +0000 |
commit | 17707d89f438d7f52a3918f9b351e1419314cb17 (patch) | |
tree | 058445c6b3c9d8244806b7ace412df8e9ccc1a71 /src/gallium/auxiliary/draw | |
parent | e1ff84371c0e8c58297611f95ec1e2cb5d5acaa4 (diff) |
draw: don't translate non-floats to float.
translate signed/unsigned integers to coresponding uint/sint r32g32b32a32 types.
This fixes a bunch of piglit tests.
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/draw')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_fetch.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch.c b/src/gallium/auxiliary/draw/draw_pt_fetch.c index 81c7ec71ef7..93aff9ba1b5 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch.c @@ -91,6 +91,28 @@ void draw_pt_fetch_prepare( struct pt_fetch *fetch, key.element[nr].output_offset = dst_offset; dst_offset += sizeof(uint); + } else if (util_format_is_pure_sint(draw->pt.vertex_element[i].src_format)) { + 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_SINT; + key.element[nr].output_offset = dst_offset; + + ei++; + dst_offset += 4 * sizeof(int); + } else if (util_format_is_pure_uint(draw->pt.vertex_element[i].src_format)) { + 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_UINT; + key.element[nr].output_offset = dst_offset; + + ei++; + dst_offset += 4 * sizeof(unsigned); } else { key.element[nr].type = TRANSLATE_ELEMENT_NORMAL; key.element[nr].input_format = draw->pt.vertex_element[ei].src_format; |