#include "evergreen_fragprog.h"
#include "evergreen_tex.h"
-void evergreenUpdateStateParameters(GLcontext * ctx, GLuint new_state); //same
+void evergreenUpdateStateParameters(struct gl_context * ctx, GLuint new_state); //same
-void evergreenUpdateShaders(GLcontext * ctx)
+void evergreenUpdateShaders(struct gl_context * ctx)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
context->radeon.NewGLState = 0;
}
-void evergreeUpdateShaders(GLcontext * ctx)
+void evergreeUpdateShaders(struct gl_context * ctx)
{
context_t *context = R700_CONTEXT(ctx);
/*
* To correctly position primitives:
*/
-void evergreenUpdateViewportOffset(GLcontext * ctx) //------------------
+void evergreenUpdateViewportOffset(struct gl_context * ctx) //------------------
{
context_t *context = R700_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
radeonUpdateScissor(ctx);
}
-void evergreenUpdateStateParameters(GLcontext * ctx, GLuint new_state) //same
+void evergreenUpdateStateParameters(struct gl_context * ctx, GLuint new_state) //same
{
struct evergreen_fragment_program *fp =
(struct evergreen_fragment_program *)ctx->FragmentProgram._Current;
/**
* Called by Mesa after an internal state update.
*/
-static void evergreenInvalidateState(GLcontext * ctx, GLuint new_state) //same
+static void evergreenInvalidateState(struct gl_context * ctx, GLuint new_state) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
context->radeon.NewGLState |= new_state;
}
-static void evergreenSetAlphaState(GLcontext * ctx) //same
+static void evergreenSetAlphaState(struct gl_context * ctx) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
}
}
-static void evergreenAlphaFunc(GLcontext * ctx, GLenum func, GLfloat ref) //same
+static void evergreenAlphaFunc(struct gl_context * ctx, GLenum func, GLfloat ref) //same
{
(void)func;
(void)ref;
evergreenSetAlphaState(ctx);
}
-static void evergreenBlendColor(GLcontext * ctx, const GLfloat cf[4]) //same
+static void evergreenBlendColor(struct gl_context * ctx, const GLfloat cf[4]) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
}
}
-static void evergreenSetBlendState(GLcontext * ctx) //diff : CB_COLOR_CONTROL, CB_BLEND0_CONTROL bits
+static void evergreenSetBlendState(struct gl_context * ctx) //diff : CB_COLOR_CONTROL, CB_BLEND0_CONTROL bits
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
evergreen->CB_BLEND0_CONTROL.u32All = blend_reg;
}
-static void evergreenBlendEquationSeparate(GLcontext * ctx,
+static void evergreenBlendEquationSeparate(struct gl_context * ctx,
GLenum modeRGB, GLenum modeA) //same
{
evergreenSetBlendState(ctx);
}
-static void evergreenBlendFuncSeparate(GLcontext * ctx,
+static void evergreenBlendFuncSeparate(struct gl_context * ctx,
GLenum sfactorRGB, GLenum dfactorRGB,
GLenum sfactorA, GLenum dfactorA) //same
{
}
}
-static void evergreenSetLogicOpState(GLcontext *ctx) //diff : CB_COLOR_CONTROL.ROP3 is actually same bits.
+static void evergreenSetLogicOpState(struct gl_context *ctx) //diff : CB_COLOR_CONTROL.ROP3 is actually same bits.
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
EG_CB_COLOR_CONTROL__ROP3_mask);
}
-static void evergreenClipPlane( GLcontext *ctx, GLenum plane, const GLfloat *eq ) //same , but PA_CL_UCP_0_ offset diff
+static void evergreenClipPlane( struct gl_context *ctx, GLenum plane, const GLfloat *eq ) //same , but PA_CL_UCP_0_ offset diff
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
evergreen->ucp[p].PA_CL_UCP_0_W.u32All = ip[3];
}
-static void evergreenSetClipPlaneState(GLcontext * ctx, GLenum cap, GLboolean state) //diff in func calls
+static void evergreenSetClipPlaneState(struct gl_context * ctx, GLenum cap, GLboolean state) //diff in func calls
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
}
}
-static void evergreenSetDBRenderState(GLcontext * ctx)
+static void evergreenSetDBRenderState(struct gl_context * ctx)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
}
}
-void evergreenUpdateShaderStates(GLcontext * ctx)
+void evergreenUpdateShaderStates(struct gl_context * ctx)
{
evergreenSetDBRenderState(ctx);
evergreenUpdateTextureState(ctx);
}
-static void evergreenSetDepthState(GLcontext * ctx) //same
+static void evergreenSetDepthState(struct gl_context * ctx) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
}
}
-static void evergreenSetStencilState(GLcontext * ctx, GLboolean state) //same
+static void evergreenSetStencilState(struct gl_context * ctx, GLboolean state) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
}
}
-static void evergreenUpdateCulling(GLcontext * ctx) //same
+static void evergreenUpdateCulling(struct gl_context * ctx) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
evergreen->PA_SU_SC_MODE_CNTL.u32All ^= FACE_bit;
}
-static void evergreenSetPolygonOffsetState(GLcontext * ctx, GLboolean state) //same
+static void evergreenSetPolygonOffsetState(struct gl_context * ctx, GLboolean state) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
}
}
-static void evergreenUpdateLineStipple(GLcontext * ctx) //diff
+static void evergreenUpdateLineStipple(struct gl_context * ctx) //diff
{
/* TODO */
}
evergreen->viewport[id].enabled = GL_TRUE;
}
-static void evergreenUpdateWindow(GLcontext * ctx, int id) //diff in calling evergreenSetScissor
+static void evergreenUpdateWindow(struct gl_context * ctx, int id) //diff in calling evergreenSetScissor
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
evergreenSetScissor(context);
}
-static void evergreenEnable(GLcontext * ctx, GLenum cap, GLboolean state) //diff in func calls
+static void evergreenEnable(struct gl_context * ctx, GLenum cap, GLboolean state) //diff in func calls
{
context_t *context = EVERGREEN_CONTEXT(ctx);
}
-static void evergreenColorMask(GLcontext * ctx,
+static void evergreenColorMask(struct gl_context * ctx,
GLboolean r, GLboolean g, GLboolean b, GLboolean a) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
}
}
-static void evergreenDepthFunc(GLcontext * ctx, GLenum func) //same
+static void evergreenDepthFunc(struct gl_context * ctx, GLenum func) //same
{
evergreenSetDepthState(ctx);
}
-static void evergreenDepthMask(GLcontext * ctx, GLboolean mask) //same
+static void evergreenDepthMask(struct gl_context * ctx, GLboolean mask) //same
{
evergreenSetDepthState(ctx);
}
-static void evergreenCullFace(GLcontext * ctx, GLenum mode) //same
+static void evergreenCullFace(struct gl_context * ctx, GLenum mode) //same
{
evergreenUpdateCulling(ctx);
}
-static void evergreenFogfv(GLcontext * ctx, GLenum pname, const GLfloat * param) //same
+static void evergreenFogfv(struct gl_context * ctx, GLenum pname, const GLfloat * param) //same
{
}
-static void evergreenUpdatePolygonMode(GLcontext * ctx) //same
+static void evergreenUpdatePolygonMode(struct gl_context * ctx) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
}
}
-static void evergreenFrontFace(GLcontext * ctx, GLenum mode) //same
+static void evergreenFrontFace(struct gl_context * ctx, GLenum mode) //same
{
evergreenUpdateCulling(ctx);
evergreenUpdatePolygonMode(ctx);
}
-static void evergreenShadeModel(GLcontext * ctx, GLenum mode) //same
+static void evergreenShadeModel(struct gl_context * ctx, GLenum mode) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
}
}
-static void evergreenLogicOpcode(GLcontext *ctx, GLenum logicop) //diff
+static void evergreenLogicOpcode(struct gl_context *ctx, GLenum logicop) //diff
{
if (RGBA_LOGICOP_ENABLED(ctx))
evergreenSetLogicOpState(ctx);
}
-static void evergreenPointSize(GLcontext * ctx, GLfloat size) //same
+static void evergreenPointSize(struct gl_context * ctx, GLfloat size) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
}
-static void evergreenPointParameter(GLcontext * ctx, GLenum pname, const GLfloat * param) //same
+static void evergreenPointParameter(struct gl_context * ctx, GLenum pname, const GLfloat * param) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
return 0;
}
-static void evergreenStencilFuncSeparate(GLcontext * ctx, GLenum face,
+static void evergreenStencilFuncSeparate(struct gl_context * ctx, GLenum face,
GLenum func, GLint ref, GLuint mask) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
STENCILFUNC_BF_shift, STENCILFUNC_BF_mask);
}
-static void evergreenStencilMaskSeparate(GLcontext * ctx, GLenum face, GLuint mask) //same
+static void evergreenStencilMaskSeparate(struct gl_context * ctx, GLenum face, GLuint mask) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
return 0;
}
-static void evergreenStencilOpSeparate(GLcontext * ctx, GLenum face,
+static void evergreenStencilOpSeparate(struct gl_context * ctx, GLenum face,
GLenum fail, GLenum zfail, GLenum zpass) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
STENCILZPASS_BF_shift, STENCILZPASS_BF_mask);
}
-static void evergreenViewport(GLcontext * ctx,
+static void evergreenViewport(struct gl_context * ctx,
GLint x,
GLint y,
GLsizei width,
radeon_viewport(ctx, x, y, width, height);
}
-static void evergreenDepthRange(GLcontext * ctx, GLclampd nearval, GLclampd farval) //diff in evergreenUpdateWindow
+static void evergreenDepthRange(struct gl_context * ctx, GLclampd nearval, GLclampd farval) //diff in evergreenUpdateWindow
{
evergreenUpdateWindow(ctx, 0);
}
-static void evergreenLineWidth(GLcontext * ctx, GLfloat widthf) //same
+static void evergreenLineWidth(struct gl_context * ctx, GLfloat widthf) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
PA_SU_LINE_CNTL__WIDTH_shift, PA_SU_LINE_CNTL__WIDTH_mask);
}
-static void evergreenLineStipple(GLcontext *ctx, GLint factor, GLushort pattern) //same
+static void evergreenLineStipple(struct gl_context *ctx, GLint factor, GLushort pattern) //same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
SETfield(evergreen->PA_SC_LINE_STIPPLE.u32All, 1, AUTO_RESET_CNTL_shift, AUTO_RESET_CNTL_mask);
}
-static void evergreenPolygonOffset(GLcontext * ctx, GLfloat factor, GLfloat units) //diff :
+static void evergreenPolygonOffset(struct gl_context * ctx, GLfloat factor, GLfloat units) //diff :
//all register here offset diff, bits same
{
context_t *context = EVERGREEN_CONTEXT(ctx);
evergreen->PA_SU_POLY_OFFSET_BACK_OFFSET.f32All = constant;
}
-static void evergreenPolygonMode(GLcontext * ctx, GLenum face, GLenum mode) //same
+static void evergreenPolygonMode(struct gl_context * ctx, GLenum face, GLenum mode) //same
{
(void)face;
(void)mode;
evergreenUpdatePolygonMode(ctx);
}
-static void evergreenRenderMode(GLcontext * ctx, GLenum mode) //same
+static void evergreenRenderMode(struct gl_context * ctx, GLenum mode) //same
{
}
//TODO : move to kernel.
-static void evergreenInitSQConfig(GLcontext * ctx)
+static void evergreenInitSQConfig(struct gl_context * ctx)
{
context_t *context = EVERGREEN_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);
NUM_CLIP_SEQ_mask);
}
-void evergreenInitState(GLcontext * ctx) //diff
+void evergreenInitState(struct gl_context * ctx) //diff
{
context_t *context = R700_CONTEXT(ctx);
EVERGREEN_CHIP_CONTEXT *evergreen = GET_EVERGREEN_CHIP(context);