diff options
author | Eric Anholt <[email protected]> | 2013-01-22 17:27:14 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-01-25 09:40:33 -0800 |
commit | 5ae3c207918e10282f53402ae276b31b2235c2dc (patch) | |
tree | 1266fc72ec1d98464d1f7d047ab6595c607b8c2b /src/mesa/drivers/dri | |
parent | 2a7a5062c9821bb986ed50e866c27ec26c4a41af (diff) |
i965: Stop worrying about alignment of vertex data.
For our current types, the required alignment is actually just 1 byte.
When we get doubles, we have to worry (those have to be aligned to the
natural size), but we don't have doubles yet and they'll just be a
special case.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_draw_upload.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index 06a58860f21..31282ddddcb 100644 --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c +++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c @@ -462,7 +462,6 @@ static void brw_prepare_vertices(struct brw_context *brw) for (i = j = 0; i < brw->vb.nr_enabled; i++) { struct brw_vertex_element *input = brw->vb.enabled[i]; const struct gl_client_array *glarray = input->glarray; - int type_size = get_size(glarray->Type); if (_mesa_is_bufferobj(glarray->BufferObj)) { struct intel_buffer_object *intel_buffer = @@ -490,7 +489,7 @@ static void brw_prepare_vertices(struct brw_context *brw) /* Named buffer object: Just reference its contents directly. */ buffer->bo = intel_bufferobj_source(intel, - intel_buffer, type_size, + intel_buffer, 1, &buffer->offset); drm_intel_bo_reference(buffer->bo); buffer->offset += (uintptr_t)glarray->Ptr; @@ -527,11 +526,6 @@ static void brw_prepare_vertices(struct brw_context *brw) { interleaved = 0; } - else if ((uintptr_t)(glarray->Ptr - ptr) & (type_size -1)) - { - /* enforce natural alignment (for doubles) */ - interleaved = 0; - } upload[nr_uploads++] = input; } |