freedreno/ir3: handle FRAG IN's without interpolation specified
Fallback to picking based on semantic name. Signed-off-by: Rob Clark <robclark@freedesktop.org>
This commit is contained in:
parent
f513f006ce
commit
6cd9c94ce4
|
@ -3107,15 +3107,23 @@ decl_in(struct ir3_compile_context *ctx, struct tgsi_full_declaration *decl)
|
||||||
} else {
|
} else {
|
||||||
bool use_ldlv = false;
|
bool use_ldlv = false;
|
||||||
|
|
||||||
/* I don't believe it is valid to not have Interp
|
/* if no interpolation given, pick based on
|
||||||
* on a normal frag shader input, and various parts
|
* semantic:
|
||||||
* that that handle flat/smooth shading make this
|
|
||||||
* assumption as well.
|
|
||||||
*/
|
*/
|
||||||
compile_assert(ctx, decl->Declaration.Interpolate);
|
if (!decl->Declaration.Interpolate) {
|
||||||
|
switch (decl->Semantic.Name) {
|
||||||
|
case TGSI_SEMANTIC_COLOR:
|
||||||
|
so->inputs[n].interpolate =
|
||||||
|
TGSI_INTERPOLATE_COLOR;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
so->inputs[n].interpolate =
|
||||||
|
TGSI_INTERPOLATE_LINEAR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (ctx->flat_bypass) {
|
if (ctx->flat_bypass) {
|
||||||
switch (decl->Interp.Interpolate) {
|
switch (so->inputs[n].interpolate) {
|
||||||
case TGSI_INTERPOLATE_COLOR:
|
case TGSI_INTERPOLATE_COLOR:
|
||||||
if (!ctx->so->key.rasterflat)
|
if (!ctx->so->key.rasterflat)
|
||||||
break;
|
break;
|
||||||
|
@ -3162,7 +3170,7 @@ decl_sv(struct ir3_compile_context *ctx, struct tgsi_full_declaration *decl)
|
||||||
so->inputs[n].compmask = 1;
|
so->inputs[n].compmask = 1;
|
||||||
so->inputs[n].regid = r;
|
so->inputs[n].regid = r;
|
||||||
so->inputs[n].inloc = ctx->next_inloc;
|
so->inputs[n].inloc = ctx->next_inloc;
|
||||||
so->inputs[n].interpolate = false;
|
so->inputs[n].interpolate = TGSI_INTERPOLATE_CONSTANT;
|
||||||
|
|
||||||
struct ir3_instruction *instr = NULL;
|
struct ir3_instruction *instr = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue