COPY_4V(value, ctx->FragmentProgram.Parameters[idx]);
return;
case STATE_LOCAL:
- if (!ctx->FragmentProgram.Current->Base.LocalParams) {
- ctx->FragmentProgram.Current->Base.LocalParams =
- calloc(MAX_PROGRAM_LOCAL_PARAMS, sizeof(float[4]));
- if (!ctx->FragmentProgram.Current->Base.LocalParams)
+ if (!ctx->FragmentProgram.Current->arb.LocalParams) {
+ ctx->FragmentProgram.Current->arb.LocalParams =
+ rzalloc_array_size(ctx->FragmentProgram.Current,
+ sizeof(float[4]),
+ MAX_PROGRAM_LOCAL_PARAMS);
+ if (!ctx->FragmentProgram.Current->arb.LocalParams)
return;
}
- COPY_4V(value, ctx->FragmentProgram.Current->Base.LocalParams[idx]);
+ COPY_4V(value,
+ ctx->FragmentProgram.Current->arb.LocalParams[idx]);
return;
default:
_mesa_problem(ctx, "Bad state switch in _mesa_fetch_state()");
COPY_4V(value, ctx->VertexProgram.Parameters[idx]);
return;
case STATE_LOCAL:
- if (!ctx->VertexProgram.Current->Base.LocalParams) {
- ctx->VertexProgram.Current->Base.LocalParams =
- calloc(MAX_PROGRAM_LOCAL_PARAMS, sizeof(float[4]));
- if (!ctx->VertexProgram.Current->Base.LocalParams)
+ if (!ctx->VertexProgram.Current->arb.LocalParams) {
+ ctx->VertexProgram.Current->arb.LocalParams =
+ rzalloc_array_size(ctx->VertexProgram.Current,
+ sizeof(float[4]),
+ MAX_PROGRAM_LOCAL_PARAMS);
+ if (!ctx->VertexProgram.Current->arb.LocalParams)
return;
}
- COPY_4V(value, ctx->VertexProgram.Current->Base.LocalParams[idx]);
+ COPY_4V(value,
+ ctx->VertexProgram.Current->arb.LocalParams[idx]);
return;
default:
_mesa_problem(ctx, "Bad state switch in _mesa_fetch_state()");
}
return;
+ case STATE_TCS_PATCH_VERTICES_IN:
+ val[0].i = ctx->TessCtrlProgram.patch_vertices;
+ return;
+
case STATE_TES_PATCH_VERTICES_IN:
if (ctx->TessCtrlProgram._Current)
- val[0].i = ctx->TessCtrlProgram._Current->VerticesOut;
+ val[0].i = ctx->TessCtrlProgram._Current->info.tcs.vertices_out;
else
val[0].i = ctx->TessCtrlProgram.patch_vertices;
return;
+ case STATE_ADVANCED_BLENDING_MODE:
+ val[0].i = ctx->Color.BlendEnabled ? ctx->Color._AdvancedBlendMode : 0;
+ return;
+
/* XXX: make sure new tokens added here are also handled in the
* _mesa_program_state_flags() switch, below.
*/
case STATE_FB_WPOS_Y_TRANSFORM:
return _NEW_BUFFERS;
+ case STATE_ADVANCED_BLENDING_MODE:
+ return _NEW_COLOR;
+
default:
/* unknown state indexes are silently ignored and
* no flag set, since it is handled by the driver.
case STATE_FB_WPOS_Y_TRANSFORM:
append(dst, "FbWposYTransform");
break;
+ case STATE_ADVANCED_BLENDING_MODE:
+ append(dst, "AdvancedBlendingMode");
+ break;
default:
/* probably STATE_INTERNAL_DRIVER+i (driver private state) */
append(dst, "driverState");