summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i965/brw_pipe_vertex.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2009-10-24 17:07:01 +0100
committerKeith Whitwell <[email protected]>2009-10-24 17:07:28 +0100
commit4f7931bb3554cb1839adc2044e3abe6d4af8b0b5 (patch)
tree46999bd594cd839f1ad58dc799bd721c4b45d35e /src/gallium/drivers/i965/brw_pipe_vertex.c
parent074606a806df755ecbb84e0a1182c66fd0b2a8dd (diff)
i965g: more work on compiling
Diffstat (limited to 'src/gallium/drivers/i965/brw_pipe_vertex.c')
-rw-r--r--src/gallium/drivers/i965/brw_pipe_vertex.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/gallium/drivers/i965/brw_pipe_vertex.c b/src/gallium/drivers/i965/brw_pipe_vertex.c
new file mode 100644
index 00000000000..b0928adbe49
--- /dev/null
+++ b/src/gallium/drivers/i965/brw_pipe_vertex.c
@@ -0,0 +1,26 @@
+
+static void brw_merge_inputs( struct brw_context *brw,
+ const struct gl_client_array *arrays[])
+{
+ struct brw_vertex_info old = brw->vb.info;
+ GLuint i;
+
+ for (i = 0; i < VERT_ATTRIB_MAX; i++)
+ brw->sws->bo_unreference(brw->vb.inputs[i].bo);
+
+ memset(&brw->vb.inputs, 0, sizeof(brw->vb.inputs));
+ memset(&brw->vb.info, 0, sizeof(brw->vb.info));
+
+ for (i = 0; i < VERT_ATTRIB_MAX; i++) {
+ brw->vb.inputs[i].glarray = arrays[i];
+ brw->vb.inputs[i].attrib = (gl_vert_attrib) i;
+
+ if (arrays[i]->StrideB != 0)
+ brw->vb.info.sizes[i/16] |= (brw->vb.inputs[i].glarray->Size - 1) <<
+ ((i%16) * 2);
+ }
+
+ /* Raise statechanges if input sizes have changed. */
+ if (memcmp(brw->vb.info.sizes, old.sizes, sizeof(old.sizes)) != 0)
+ brw->state.dirty.brw |= BRW_NEW_INPUT_DIMENSIONS;
+}