mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
llvmpipe: don't try to emit non-existent color outputs
This commit is contained in:
parent
81ccb3e2ce
commit
f0bd76f28d
1 changed files with 9 additions and 8 deletions
|
|
@ -406,14 +406,15 @@ generate_fs(struct llvmpipe_context *lp,
|
|||
if (shader->info.base.output_semantic_name[attrib] == TGSI_SEMANTIC_COLOR)
|
||||
{
|
||||
unsigned cbuf = shader->info.base.output_semantic_index[attrib];
|
||||
for(chan = 0; chan < NUM_CHANNELS; ++chan)
|
||||
{
|
||||
/* XXX: just initialize outputs to point at colors[] and
|
||||
* skip this.
|
||||
*/
|
||||
LLVMValueRef out = LLVMBuildLoad(builder, outputs[attrib][chan], "");
|
||||
lp_build_name(out, "color%u.%u.%c", i, attrib, "rgba"[chan]);
|
||||
LLVMBuildStore(builder, out, color[cbuf][chan]);
|
||||
for(chan = 0; chan < NUM_CHANNELS; ++chan) {
|
||||
if(outputs[attrib][chan]) {
|
||||
/* XXX: just initialize outputs to point at colors[] and
|
||||
* skip this.
|
||||
*/
|
||||
LLVMValueRef out = LLVMBuildLoad(builder, outputs[attrib][chan], "");
|
||||
lp_build_name(out, "color%u.%u.%c", i, attrib, "rgba"[chan]);
|
||||
LLVMBuildStore(builder, out, color[cbuf][chan]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue