mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-15 22:30:20 +01:00
glsl: check for xfb setting xfb info
this otherwise hits the default buffer=0 path, which is invalid
for drivers which don't support xfb
fixes #9763
cc: mesa-stable
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25082>
(cherry picked from commit 06af083b93)
This commit is contained in:
parent
071f7ed018
commit
eb97b35e46
3 changed files with 5 additions and 3 deletions
|
|
@ -2353,7 +2353,7 @@
|
|||
"description": "glsl: check for xfb setting xfb info",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
#include "compiler/glsl_types.h"
|
||||
#include "util/u_string.h"
|
||||
#include "util/format/u_format.h"
|
||||
#include "main/consts_exts.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning( disable : 4065 ) // switch statement contains 'default' but no 'case' labels
|
||||
|
|
@ -2211,7 +2212,7 @@ storage_qualifier:
|
|||
$$.stream = state->out_qualifier->stream;
|
||||
}
|
||||
|
||||
if (state->has_enhanced_layouts()) {
|
||||
if (state->has_enhanced_layouts() && state->exts->ARB_transform_feedback3) {
|
||||
$$.flags.q.xfb_buffer = 1;
|
||||
$$.flags.q.explicit_xfb_buffer = 0;
|
||||
$$.xfb_buffer = state->out_qualifier->xfb_buffer;
|
||||
|
|
|
|||
|
|
@ -1112,7 +1112,8 @@ _mesa_ast_process_interface_block(YYLTYPE *locp,
|
|||
block->default_layout.stream = state->out_qualifier->stream;
|
||||
}
|
||||
|
||||
if (state->has_enhanced_layouts() && block->default_layout.flags.q.out) {
|
||||
if (state->has_enhanced_layouts() && block->default_layout.flags.q.out &&
|
||||
state->exts->ARB_transform_feedback3) {
|
||||
/* Assign global layout's xfb_buffer value. */
|
||||
block->default_layout.flags.q.xfb_buffer = 1;
|
||||
block->default_layout.flags.q.explicit_xfb_buffer = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue