diff options
Diffstat (limited to 'src/mesa/state_tracker/st_program.c')
-rw-r--r-- | src/mesa/state_tracker/st_program.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 3570557fee6..b603759f8f8 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -351,7 +351,7 @@ st_translate_vertex_program(struct st_context *st, NULL, /* input semantic name */ NULL, /* input semantic index */ NULL, /* interp mode */ - NULL, /* is centroid */ + NULL, /* interp location */ /* outputs */ num_outputs, stvp->result_to_output, @@ -481,6 +481,7 @@ st_translate_fragment_program(struct st_context *st, GLuint outputMapping[FRAG_RESULT_MAX]; GLuint inputMapping[VARYING_SLOT_MAX]; GLuint interpMode[PIPE_MAX_SHADER_INPUTS]; /* XXX size? */ + GLuint interpLocation[PIPE_MAX_SHADER_INPUTS]; GLuint attr; GLbitfield64 inputsRead; struct ureg_program *ureg; @@ -489,7 +490,6 @@ st_translate_fragment_program(struct st_context *st, ubyte input_semantic_name[PIPE_MAX_SHADER_INPUTS]; ubyte input_semantic_index[PIPE_MAX_SHADER_INPUTS]; - GLboolean is_centroid[PIPE_MAX_SHADER_INPUTS]; uint fs_num_inputs = 0; ubyte fs_output_semantic_name[PIPE_MAX_SHADER_OUTPUTS]; @@ -541,7 +541,12 @@ st_translate_fragment_program(struct st_context *st, const GLuint slot = fs_num_inputs++; inputMapping[attr] = slot; - is_centroid[slot] = (stfp->Base.IsCentroid & BITFIELD64_BIT(attr)) != 0; + if (stfp->Base.IsCentroid & BITFIELD64_BIT(attr)) + interpLocation[slot] = TGSI_INTERPOLATE_LOC_CENTROID; + else if (stfp->Base.IsSample & BITFIELD64_BIT(attr)) + interpLocation[slot] = TGSI_INTERPOLATE_LOC_SAMPLE; + else + interpLocation[slot] = TGSI_INTERPOLATE_LOC_CENTER; switch (attr) { case VARYING_SLOT_POS: @@ -768,7 +773,7 @@ st_translate_fragment_program(struct st_context *st, input_semantic_name, input_semantic_index, interpMode, - is_centroid, + interpLocation, /* outputs */ fs_num_outputs, outputMapping, |