summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/nouveau/nv30_state.c
diff options
context:
space:
mode:
authorJeremy Kolb <jkolb@freedesktop.org>2006-11-11 16:48:14 +0000
committerJeremy Kolb <jkolb@freedesktop.org>2006-11-11 16:48:14 +0000
commit4f61fd18b2ba2dae38c68f4facb80ac2016d50ac (patch)
treec77cd5b48b02f3280de51072ee6be0aef11744f9 /src/mesa/drivers/dri/nouveau/nv30_state.c
parent994ea9556f7fb55546c6426639ebb4cc3970a5d5 (diff)
Fill in nv30PointSize and nv30Viewport.
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nv30_state.c')
-rw-r--r--src/mesa/drivers/dri/nouveau/nv30_state.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c
index b1914b462f..c3670580a2 100644
--- a/src/mesa/drivers/dri/nouveau/nv30_state.c
+++ b/src/mesa/drivers/dri/nouveau/nv30_state.c
@@ -433,7 +433,13 @@ void nv30PointParameterfv(GLcontext *ctx, GLenum pname, const GLfloat *params)
}
/** Specify the diameter of rasterized points */
-void (*PointSize)(GLcontext *ctx, GLfloat size);
+void nv30PointSize(GLcontext *ctx, GLfloat size)
+{
+ nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
+ BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_POINT_SIZE, 1);
+ OUT_RINFf(size);
+}
+
/** Select a polygon rasterization mode */
void (*PolygonMode)(GLcontext *ctx, GLenum face, GLenum mode);
/** Set the scale and units used to calculate depth values */
@@ -467,6 +473,14 @@ void (*TexParameter)(GLcontext *ctx, GLenum target,
struct gl_texture_object *texObj,
GLenum pname, const GLfloat *params);
void (*TextureMatrix)(GLcontext *ctx, GLuint unit, const GLmatrix *mat);
+
/** Set the viewport */
-void (*Viewport)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
+void nv30Viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
+{
+ /* TODO: Where do the VIEWPORT_XFRM_* regs come in? */
+ nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
+ BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_VIEWPORT_DIMS_0, 2);
+ OUT_RING((w << 16) | x);
+ OUT_RING((h << 16) | y);
+}