diff options
author | Zack Rusin <zack@tungstengraphics.com> | 2007-12-20 12:54:23 -0500 |
---|---|---|
committer | Zack Rusin <zack@tungstengraphics.com> | 2007-12-20 12:54:23 -0500 |
commit | 4fa7afabc966a3d37324f2f9b03e1cc466db7773 (patch) | |
tree | 37d18ebcc06f994f320e62ca54c55f1ebc6f43e3 /src/mesa/pipe/i965simple/brw_curbe.c | |
parent | a85535b7cb0886f23e5686e37d1fa54394cdece4 (diff) |
i965: very crude and hacky way of handling immediates
Diffstat (limited to 'src/mesa/pipe/i965simple/brw_curbe.c')
-rw-r--r-- | src/mesa/pipe/i965simple/brw_curbe.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/src/mesa/pipe/i965simple/brw_curbe.c b/src/mesa/pipe/i965simple/brw_curbe.c index 785affa2d8..603116c863 100644 --- a/src/mesa/pipe/i965simple/brw_curbe.c +++ b/src/mesa/pipe/i965simple/brw_curbe.c @@ -252,13 +252,23 @@ static void upload_constant_buffer(struct brw_context *brw) /*unsigned nr = vp->max_const;*/ const struct pipe_constant_buffer *cbuffer = brw->attribs.Constants[0]; struct pipe_winsys *ws = brw->pipe.winsys; - /* map the vertex constant buffer and copy to curbe: */ - ws->buffer_map(ws, cbuffer->buffer, 0); - ws->buffer_get_subdata(ws, cbuffer->buffer, - 0, - cbuffer->size, - &buf[offset]); - ws->buffer_unmap(ws, cbuffer->buffer); + if (cbuffer->size) { + /* map the vertex constant buffer and copy to curbe: */ + ws->buffer_map(ws, cbuffer->buffer, 0); + ws->buffer_get_subdata(ws, cbuffer->buffer, + 0, + cbuffer->size, + &buf[offset]); + ws->buffer_unmap(ws, cbuffer->buffer); + offset += cbuffer->size; + } + /*immediates*/ +#if 0 + if (brw->vs.prog_data->num_imm) { + memcpy(&buf[offset], brw->vs.prog_data->imm_buf, + brw->vs.prog_data->num_imm * 4 * sizeof(float)); + } +#endif } if (1) { |