mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-23 12:40:29 +01:00
More state functions
This commit is contained in:
parent
e722e3480f
commit
ae9c633a21
3 changed files with 56 additions and 10 deletions
|
|
@ -463,16 +463,49 @@ void (*ReadBuffer)( GLcontext *ctx, GLenum buffer );
|
|||
void (*RenderMode)(GLcontext *ctx, GLenum mode );
|
||||
/** Define the scissor box */
|
||||
void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
|
||||
|
||||
/** Select flat or smooth shading */
|
||||
void (*ShadeModel)(GLcontext *ctx, GLenum mode);
|
||||
void nv10ShadeModel(GLcontext *ctx, GLenum mode)
|
||||
{
|
||||
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
|
||||
|
||||
BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_SHADE_MODEL, 1);
|
||||
OUT_RING(mode);
|
||||
}
|
||||
|
||||
/** OpenGL 2.0 two-sided StencilFunc */
|
||||
void (*StencilFuncSeparate)(GLcontext *ctx, GLenum face, GLenum func,
|
||||
GLint ref, GLuint mask);
|
||||
static void nv10StencilFuncSeparate(GLcontext *ctx, GLenum face, GLenum func,
|
||||
GLint ref, GLuint mask)
|
||||
{
|
||||
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
|
||||
|
||||
BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_STENCIL_FUNC_FUNC, 3);
|
||||
OUT_RING(func);
|
||||
OUT_RING(ref);
|
||||
OUT_RING(mask);
|
||||
}
|
||||
|
||||
/** OpenGL 2.0 two-sided StencilMask */
|
||||
void (*StencilMaskSeparate)(GLcontext *ctx, GLenum face, GLuint mask);
|
||||
static void nv10StencilMaskSeparate(GLcontext *ctx, GLenum face, GLuint mask)
|
||||
{
|
||||
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
|
||||
|
||||
BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_STENCIL_MASK, 1);
|
||||
OUT_RING(mask);
|
||||
}
|
||||
|
||||
/** OpenGL 2.0 two-sided StencilOp */
|
||||
void (*StencilOpSeparate)(GLcontext *ctx, GLenum face, GLenum fail,
|
||||
GLenum zfail, GLenum zpass);
|
||||
static void nv10StencilOpSeparate(GLcontext *ctx, GLenum face, GLenum fail,
|
||||
GLenum zfail, GLenum zpass)
|
||||
{
|
||||
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
|
||||
|
||||
BEGIN_RING_SIZE(NvSub3D, NV10_TCL_PRIMITIVE_3D_STENCIL_OP_FAIL, 1);
|
||||
OUT_RING(fail);
|
||||
OUT_RING(zfail);
|
||||
OUT_RING(zpass);
|
||||
}
|
||||
|
||||
/** Control the generation of texture coordinates */
|
||||
void (*TexGen)(GLcontext *ctx, GLenum coord, GLenum pname,
|
||||
const GLfloat *params);
|
||||
|
|
|
|||
|
|
@ -468,8 +468,15 @@ void (*ReadBuffer)( GLcontext *ctx, GLenum buffer );
|
|||
void (*RenderMode)(GLcontext *ctx, GLenum mode );
|
||||
/** Define the scissor box */
|
||||
void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
|
||||
|
||||
/** Select flat or smooth shading */
|
||||
void (*ShadeModel)(GLcontext *ctx, GLenum mode);
|
||||
void nv20ShadeModel(GLcontext *ctx, GLenum mode)
|
||||
{
|
||||
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
|
||||
|
||||
BEGIN_RING_SIZE(NvSub3D, NV20_TCL_PRIMITIVE_3D_SHADE_MODEL, 1);
|
||||
OUT_RING(mode);
|
||||
}
|
||||
|
||||
/** OpenGL 2.0 two-sided StencilFunc */
|
||||
static void nv20StencilFuncSeparate(GLcontext *ctx, GLenum face, GLenum func,
|
||||
|
|
@ -560,8 +567,8 @@ void nv20InitStateFuncs(struct dd_function_table *func)
|
|||
func->ReadBuffer = nv20ReadBuffer;
|
||||
func->RenderMode = nv20RenderMode;
|
||||
func->Scissor = nv20Scissor;
|
||||
func->ShadeModel = nv20ShaderModel;
|
||||
#endif
|
||||
func->ShadeModel = nv20ShadeModel;
|
||||
func->StencilFuncSeparate = nv20StencilFuncSeparate;
|
||||
func->StencilMaskSeparate = nv20StencilMaskSeparate;
|
||||
func->StencilOpSeparate = nv20StencilOpSeparate;
|
||||
|
|
|
|||
|
|
@ -466,7 +466,13 @@ void (*RenderMode)(GLcontext *ctx, GLenum mode );
|
|||
/** Define the scissor box */
|
||||
void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
|
||||
/** Select flat or smooth shading */
|
||||
void (*ShadeModel)(GLcontext *ctx, GLenum mode);
|
||||
void nv30ShadeModel(GLcontext *ctx, GLenum mode)
|
||||
{
|
||||
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
|
||||
|
||||
BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_SHADE_MODEL, 1);
|
||||
OUT_RING(mode);
|
||||
}
|
||||
|
||||
/** OpenGL 2.0 two-sided StencilFunc */
|
||||
static void nv30StencilFuncSeparate(GLcontext *ctx, GLenum face, GLenum func,
|
||||
|
|
@ -579,8 +585,8 @@ void nv30InitStateFuncs(struct dd_function_table *func)
|
|||
func->ReadBuffer = nv30ReadBuffer;
|
||||
func->RenderMode = nv30RenderMode;
|
||||
func->Scissor = nv30Scissor;
|
||||
func->ShadeModel = nv30ShaderModel;
|
||||
#endif
|
||||
func->ShadeModel = nv30ShadeModel;
|
||||
func->StencilFuncSeparate = nv30StencilFuncSeparate;
|
||||
func->StencilMaskSeparate = nv30StencilMaskSeparate;
|
||||
func->StencilOpSeparate = nv30StencilOpSeparate;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue