mesa: move gl_context::varying_vp_inputs into ctx->VertexProgram._VaryingInputs
This is where it belongs. Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798>
This commit is contained in:
parent
99e25d183d
commit
ba29044fba
|
@ -881,7 +881,7 @@ init_attrib_groups(struct gl_context *ctx)
|
|||
ctx->NewDriverState = ~0;
|
||||
ctx->ErrorValue = GL_NO_ERROR;
|
||||
ctx->ShareGroupReset = false;
|
||||
ctx->varying_vp_inputs = VERT_BIT_ALL;
|
||||
ctx->VertexProgram._VaryingInputs = VERT_BIT_ALL;
|
||||
ctx->IntelBlackholeRender = env_var_as_boolean("INTEL_BLACKHOLE_DEFAULT", false);
|
||||
|
||||
return GL_TRUE;
|
||||
|
|
|
@ -180,8 +180,8 @@ static GLbitfield filter_fp_input_mask( GLbitfield fp_inputs,
|
|||
GLbitfield possible_inputs = 0;
|
||||
|
||||
/* _NEW_VARYING_VP_INPUTS */
|
||||
GLbitfield varying_inputs = ctx->varying_vp_inputs;
|
||||
/* We only update ctx->varying_vp_inputs when in VP_MODE_FF _VPMode */
|
||||
GLbitfield varying_inputs = ctx->VertexProgram._VaryingInputs;
|
||||
/* We only update ctx->VertexProgram._VaryingInputs when in VP_MODE_FF _VPMode */
|
||||
assert(VP_MODE_FF == ctx->VertexProgram._VPMode);
|
||||
|
||||
/* These get generated in the setup routine regardless of the
|
||||
|
|
|
@ -163,7 +163,7 @@ static void make_state_key( struct gl_context *ctx, struct state_key *key )
|
|||
key->need_eye_coords = ctx->_NeedEyeCoords;
|
||||
|
||||
key->fragprog_inputs_read = fp->info.inputs_read;
|
||||
key->varying_vp_inputs = ctx->varying_vp_inputs;
|
||||
key->varying_vp_inputs = ctx->VertexProgram._VaryingInputs;
|
||||
|
||||
if (ctx->RenderMode == GL_FEEDBACK) {
|
||||
/* make sure the vertprog emits color and tex0 */
|
||||
|
@ -1659,7 +1659,7 @@ _mesa_get_fixed_func_vertex_program(struct gl_context *ctx)
|
|||
struct gl_program *prog;
|
||||
struct state_key key;
|
||||
|
||||
/* We only update ctx->varying_vp_inputs when in VP_MODE_FF _VPMode */
|
||||
/* We only update ctx->VertexProgram._VaryingInputs when in VP_MODE_FF _VPMode */
|
||||
assert(VP_MODE_FF == ctx->VertexProgram._VPMode);
|
||||
|
||||
/* Grab all the relevant state and put it in a single structure:
|
||||
|
|
|
@ -2394,6 +2394,8 @@ struct gl_vertex_program_state
|
|||
* vertex program which are heavyweight already.
|
||||
*/
|
||||
gl_vertex_processing_mode _VPMode;
|
||||
|
||||
GLbitfield _VaryingInputs; /**< mask of VERT_BIT_* flags */
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -4651,7 +4653,7 @@ struct gl_matrix_stack
|
|||
/* gap */
|
||||
#define _NEW_FRAG_CLAMP (1u << 29)
|
||||
/* gap, re-use for core Mesa state only; use ctx->DriverFlags otherwise */
|
||||
#define _NEW_VARYING_VP_INPUTS (1u << 31) /**< gl_context::varying_vp_inputs */
|
||||
#define _NEW_VARYING_VP_INPUTS (1u << 31) /**< gl_context::VertexProgram._VaryingInputs */
|
||||
#define _NEW_ALL ~0
|
||||
/*@}*/
|
||||
|
||||
|
@ -5465,8 +5467,6 @@ struct gl_context
|
|||
/* Is gl_PrimitiveID unused by the current shaders? */
|
||||
bool _PrimitiveIDIsUnused;
|
||||
|
||||
GLbitfield varying_vp_inputs; /**< mask of VERT_BIT_* flags */
|
||||
|
||||
/** \name Derived state */
|
||||
GLbitfield _ImageTransferState;/**< bitwise-or of IMAGE_*_BIT flags */
|
||||
GLfloat _EyeZDir[3];
|
||||
|
|
|
@ -572,8 +572,8 @@ static void
|
|||
set_varying_vp_inputs(struct gl_context *ctx, GLbitfield varying_inputs)
|
||||
{
|
||||
if (ctx->VertexProgram._VPModeOptimizesConstantAttribs &&
|
||||
ctx->varying_vp_inputs != varying_inputs) {
|
||||
ctx->varying_vp_inputs = varying_inputs;
|
||||
ctx->VertexProgram._VaryingInputs != varying_inputs) {
|
||||
ctx->VertexProgram._VaryingInputs = varying_inputs;
|
||||
ctx->NewState |= _NEW_VARYING_VP_INPUTS;
|
||||
}
|
||||
}
|
||||
|
@ -611,7 +611,7 @@ set_vertex_processing_mode(struct gl_context *ctx, gl_vertex_processing_mode m)
|
|||
/* Finally memorize the value */
|
||||
ctx->VertexProgram._VPMode = m;
|
||||
|
||||
/* The gl_context::varying_vp_inputs value is only used when in
|
||||
/* The gl_context::VertexProgram._VaryingInputs value is only used when in
|
||||
* VP_MODE_FF mode and the fixed-func pipeline is emulated by shaders.
|
||||
*/
|
||||
ctx->VertexProgram._VPModeOptimizesConstantAttribs =
|
||||
|
|
Loading…
Reference in New Issue