mirror of https://gitlab.freedesktop.org/mesa/mesa
mesa/st/program: don't init xfb info if there are no outputs
this is almost certainly a failure case, but drivers still shouldn't
get xfb info if there are no outputs
affects:
spec@glsl-1.50@execution@interface-blocks-api-access-members
cc: mesa-stable
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22448>
(cherry picked from commit a86c710ce5
)
This commit is contained in:
parent
46ff518ebf
commit
3b6c72fa75
|
@ -832,7 +832,7 @@
|
|||
"description": "mesa/st/program: don't init xfb info if there are no outputs",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
@ -476,6 +476,11 @@ st_translate_stream_output_info(struct gl_program *prog)
|
|||
struct pipe_stream_output_info *so_info =
|
||||
&prog->state.stream_output;
|
||||
|
||||
if (!num_outputs) {
|
||||
so_info->num_outputs = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < info->NumOutputs; i++) {
|
||||
so_info->output[i].register_index =
|
||||
output_mapping[info->Outputs[i].OutputRegister];
|
||||
|
|
Loading…
Reference in New Issue