summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_draw_upload.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2010-10-17 19:03:42 -0700
committerKeith Whitwell <keithw@vmware.com>2010-10-17 19:09:42 -0700
commit0072acd447dc6be652e63752e50215c3105322c8 (patch)
tree847d1763b54772d336a04e606f8248291c3092b7 /src/mesa/drivers/dri/i965/brw_draw_upload.c
parent543fb77ddece7e1806e8eaa0d65bb2a945ef9a75 (diff)
parentca2b2ac131933b4171b519813df1aaa3a81621cd (diff)
Merge remote branch 'origin/master' into lp-setup-llvm
Conflicts: src/gallium/drivers/llvmpipe/lp_setup_coef.c src/gallium/drivers/llvmpipe/lp_setup_coef.h src/gallium/drivers/llvmpipe/lp_setup_coef_intrin.c src/gallium/drivers/llvmpipe/lp_setup_point.c src/gallium/drivers/llvmpipe/lp_setup_tri.c src/gallium/drivers/llvmpipe/lp_state_derived.c src/gallium/drivers/llvmpipe/lp_state_fs.h
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_draw_upload.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw_upload.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index 249e874ab1..c4654360d4 100644
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
@@ -313,7 +313,7 @@ copy_array_to_vbo_array( struct brw_context *brw,
static void brw_prepare_vertices(struct brw_context *brw)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
struct intel_context *intel = intel_context(ctx);
GLbitfield vs_inputs = brw->vs.prog_data->inputs_read;
GLuint i;
@@ -383,7 +383,7 @@ static void brw_prepare_vertices(struct brw_context *brw)
*/
assert(input->offset < input->bo->size);
} else {
- input->count = input->glarray->StrideB ? max_index + 1 - min_index : 1;
+ input->count = input->glarray->StrideB ? max_index + 1 : 1;
if (input->bo != NULL) {
/* Already-uploaded vertex data is present from a previous
* prepare_vertices, but we had to re-validate state due to
@@ -414,15 +414,6 @@ static void brw_prepare_vertices(struct brw_context *brw)
}
upload[nr_uploads++] = input;
-
- /* We rebase drawing to start at element zero only when
- * varyings are not in vbos, which means we can end up
- * uploading non-varying arrays (stride != 0) when min_index
- * is zero. This doesn't matter as the amount to upload is
- * the same for these arrays whether the draw call is rebased
- * or not - we just have to upload the one element.
- */
- assert(min_index == 0 || input->glarray->StrideB == 0);
}
}
@@ -460,7 +451,7 @@ static void brw_prepare_vertices(struct brw_context *brw)
static void brw_emit_vertices(struct brw_context *brw)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
struct intel_context *intel = intel_context(ctx);
GLuint i;
@@ -592,7 +583,7 @@ const struct brw_tracked_state brw_vertices = {
static void brw_prepare_indices(struct brw_context *brw)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct gl_context *ctx = &brw->intel.ctx;
struct intel_context *intel = &brw->intel;
const struct _mesa_index_buffer *index_buffer = brw->ib.ib;
GLuint ib_size;