Mesa (master): svga, glhd: Remove incorrect assert and add note
Jakob Bornecrantz
wallbraker at kemper.freedesktop.org
Mon Dec 27 00:56:24 UTC 2010
Module: Mesa
Branch: master
Commit: 23aa3c552cc54a3242142b82916090f8b7b32e44
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=23aa3c552cc54a3242142b82916090f8b7b32e44
Author: Jakob Bornecrantz <jakob at vmware.com>
Date: Wed Dec 15 12:17:26 2010 +0100
svga, glhd: Remove incorrect assert and add note
Stride can be lower then the size of the attribute.
But should probably be aligned to component size atleast for floats.
---
src/gallium/drivers/galahad/glhd_context.c | 2 ++
src/gallium/drivers/svga/svga_draw.c | 1 -
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/gallium/drivers/galahad/glhd_context.c b/src/gallium/drivers/galahad/glhd_context.c
index a572ad2..8cbf0b1 100644
--- a/src/gallium/drivers/galahad/glhd_context.c
+++ b/src/gallium/drivers/galahad/glhd_context.c
@@ -381,6 +381,8 @@ galahad_create_vertex_elements_state(struct pipe_context *_pipe,
struct galahad_context *glhd_pipe = galahad_context(_pipe);
struct pipe_context *pipe = glhd_pipe->pipe;
+ /* XXX check if stride lines up with element size, at least for floats */
+
return pipe->create_vertex_elements_state(pipe,
num_elements,
vertex_elements);
diff --git a/src/gallium/drivers/svga/svga_draw.c b/src/gallium/drivers/svga/svga_draw.c
index 81dd477..97cbac4 100644
--- a/src/gallium/drivers/svga/svga_draw.c
+++ b/src/gallium/drivers/svga/svga_draw.c
@@ -315,7 +315,6 @@ enum pipe_error svga_hwtnl_prim( struct svga_hwtnl *hwtnl,
break;
}
- assert(!stride || width <= stride);
if (max_index != ~0) {
assert(offset + (index_bias + max_index) * stride + width <= size);
}
More information about the mesa-commit
mailing list