#include "radeon_program.h"
#include "radeon_program_alu.h"
-static void update_params(GLcontext *ctx, struct gl_fragment_program *fp)
-{
- /* Ask Mesa nicely to fill in ParameterValues for us */
- if (fp->Base.Parameters)
- _mesa_load_state_parameters(ctx, fp->Base.Parameters);
-}
-
static void nqssadce_init(struct nqssadce_state* s)
{
s->Outputs[FRAG_RESULT_COLOR].Sourced = WRITEMASK_XYZW;
r300_fp->translated = GL_TRUE;
- r300UpdateStateParameters(ctx, _NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS);
-
if (r300_fp->error || (RADEON_DEBUG & DEBUG_PIXEL))
r300->vtbl.FragmentProgramDump(&r300_fp->code);
}
-
- update_params(ctx, fp);
}
* Update R300's own internal state parameters.
* For now just STATE_R300_WINDOW_DIMENSION
*/
-void r300UpdateStateParameters(GLcontext * ctx, GLuint new_state)
+static void r300UpdateStateParameters(GLcontext * ctx, GLuint new_state)
{
struct r300_fragment_program *fp;
struct gl_program_parameter_list *paramList;
if (!paramList)
return;
+ _mesa_load_state_parameters(ctx, paramList);
+
for (i = 0; i < paramList->NumParameters; i++) {
if (paramList->Parameters[i].Type == PROGRAM_STATE_VAR) {
r300FetchStateParameter(ctx,
R300_STATECHANGE(r300, cb);
}
- r300UpdateStateParameters(ctx, new_state);
-
r300->radeon.NewGLState |= new_state;
}
void r300UpdateViewportOffset (GLcontext * ctx);
void r300UpdateDrawBuffer (GLcontext * ctx);
-void r300UpdateStateParameters (GLcontext * ctx, GLuint new_state);
void r300UpdateShaders (r300ContextPtr rmesa);
void r300UpdateShaderStates (r300ContextPtr rmesa);
void r300InitState (r300ContextPtr r300);