struct pipe_viewport_state *viewport;
struct pipe_scissor_state *scissor;
struct pipe_framebuffer_state *framebuffer;
+ struct pipe_buffer *constbuf[PIPE_SHADER_TYPES];
+ struct vertex_info vertex_info;
struct {
struct pipe_buffer *buffer;
unsigned delta;
} vb[16];
- struct vertex_info vertex_info;
- struct {
+/* struct {
struct nouveau_resource *exec_heap;
struct nouveau_resource *data_heap;
struct nv10_vertex_program *active;
struct nv10_vertex_program *current;
- struct pipe_buffer *constant_buf;
} vertprog;
-
+*/
struct {
struct nv10_fragment_program *active;
nv10_set_clip_state(struct pipe_context *pipe,
const struct pipe_clip_state *clip)
{
+ struct nv10_context *nv10 = nv10_context(pipe);
+
+ draw_set_clip_state(nv10->draw, clip);
}
static void
struct nv10_context *nv10 = nv10_context(pipe);
if (shader == PIPE_SHADER_VERTEX) {
- nv10->vertprog.constant_buf = buf->buffer;
+ nv10->constbuf[PIPE_SHADER_VERTEX] = buf->buffer;
nv10->dirty |= NV10_NEW_VERTPROG;
} else
if (shader == PIPE_SHADER_FRAGMENT) {
- nv10->fragprog.constant_buf = buf->buffer;
+ nv10->constbuf[PIPE_SHADER_FRAGMENT] = buf->buffer;
nv10->dirty |= NV10_NEW_FRAGPROG;
}
}
nv10->viewport = (struct pipe_viewport_state*)vpt;
+ draw_set_viewport_state(nv10->draw, &nv10->viewport);
+
nv10->dirty |= NV10_NEW_VIEWPORT;
}
memcpy(nv10->vtxbuf, vb, sizeof(*vb) * count);
nv10->dirty |= NV10_NEW_VTXARRAYS;
+
+ draw_set_vertex_buffers(nv10->draw, count, vb);
}
static void
memcpy(nv10->vtxelt, ve, sizeof(*ve) * count);
nv10->dirty |= NV10_NEW_VTXARRAYS;
+
+ draw_set_vertex_elements(nv10->draw, count, ve);
}
void
assert(0);
}
- BEGIN_RING(celsius, NV10TCL_RT_PITCH, 1);
- OUT_RING ( (rt->pitch * rt->cpp) | ( (zeta->pitch * zeta->cpp) << 16) );
+ if (zeta) {
+ BEGIN_RING(celsius, NV10TCL_RT_PITCH, 1);
+ OUT_RING ( (rt->pitch * rt->cpp) | ( (zeta->pitch * zeta->cpp) << 16) );
+ } else {
+ BEGIN_RING(celsius, NV10TCL_RT_PITCH, 1);
+ OUT_RING ( (rt->pitch * rt->cpp) );
+ }
+
nv10->rt[0] = rt->buffer;
if (zeta_format)
draw_set_mapped_element_buffer(draw, 0, NULL);
}
+ draw_set_mapped_constant_buffer(draw, nv10->constbuf[PIPE_SHADER_VERTEX]);
+
/* draw! */
draw_arrays(nv10->draw, prim, start, count);