summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2011-10-10 17:20:30 +0100
committerDave Airlie <[email protected]>2011-10-10 17:22:17 +0100
commit9e66b25880febecb529582c6ead920637d73f51e (patch)
tree3713129a31538f891559b8e86ab7885f96570008 /src/gallium/auxiliary/util
parent6bf8c7c01001c2f83c2f05f6c143906a6e6374b1 (diff)
u_blitter: clean up velem setup
as per Brian's suggestion, drop the pointless loops. Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r--src/gallium/auxiliary/util/u_blitter.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index 89dae95566f..b0d538de691 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -217,25 +217,17 @@ struct blitter_context *util_blitter_create(struct pipe_context *pipe)
if (ctx->vertex_has_integers) {
memset(&velem[0], 0, sizeof(velem[0]) * 2);
- for (i = 0; i < 2; i++) {
- velem[i].src_offset = i * 4 * sizeof(float);
- if (i == 0) {
- velem[i].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
- } else {
- velem[i].src_format = PIPE_FORMAT_R32G32B32A32_SINT;
- }
- }
+ velem[0].src_offset = 0;
+ velem[0].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
+ velem[1].src_offset = 4 * sizeof(float);
+ velem[1].src_format = PIPE_FORMAT_R32G32B32A32_SINT;
ctx->velem_sint_state = pipe->create_vertex_elements_state(pipe, 2, &velem[0]);
memset(&velem[0], 0, sizeof(velem[0]) * 2);
- for (i = 0; i < 2; i++) {
- velem[i].src_offset = i * 4 * sizeof(float);
- if (i == 0) {
- velem[i].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
- } else {
- velem[i].src_format = PIPE_FORMAT_R32G32B32A32_UINT;
- }
- }
+ velem[0].src_offset = 0;
+ velem[0].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
+ velem[1].src_offset = 4 * sizeof(float);
+ velem[1].src_format = PIPE_FORMAT_R32G32B32A32_UINT;
ctx->velem_uint_state = pipe->create_vertex_elements_state(pipe, 2, &velem[0]);
}