mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
freedreno/a3xx: handle VS only outputting BCOLOR
Possibly we should map the front color to black (zeroes). But not sure there is a way to do that without generating a shader variant. Signed-off-by: Rob Clark <robclark@freedesktop.org>
This commit is contained in:
parent
af4d088395
commit
a262c601d3
1 changed files with 10 additions and 2 deletions
|
|
@ -140,13 +140,21 @@ find_output(const struct ir3_shader_variant *so, ir3_semantic semantic)
|
|||
* in the vertex shader.. but the fragment shader doesn't know this
|
||||
* so it will always have both IN.COLOR[n] and IN.BCOLOR[n]. So
|
||||
* at link time if there is no matching OUT.BCOLOR[n], we must map
|
||||
* OUT.COLOR[n] to IN.BCOLOR[n].
|
||||
* OUT.COLOR[n] to IN.BCOLOR[n]. And visa versa if there is only
|
||||
* a OUT.BCOLOR[n] but no matching OUT.COLOR[n]
|
||||
*/
|
||||
if (sem2name(semantic) == TGSI_SEMANTIC_BCOLOR) {
|
||||
unsigned idx = sem2idx(semantic);
|
||||
return find_output(so, ir3_semantic_name(TGSI_SEMANTIC_COLOR, idx));
|
||||
semantic = ir3_semantic_name(TGSI_SEMANTIC_COLOR, idx);
|
||||
} else if (sem2name(semantic) == TGSI_SEMANTIC_COLOR) {
|
||||
unsigned idx = sem2idx(semantic);
|
||||
semantic = ir3_semantic_name(TGSI_SEMANTIC_BCOLOR, idx);
|
||||
}
|
||||
|
||||
for (j = 0; j < so->outputs_count; j++)
|
||||
if (so->outputs[j].semantic == semantic)
|
||||
return j;
|
||||
|
||||
debug_assert(0);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue