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>
This commit is contained in:
committed by
Marge Bot
parent
a0ff56e334
commit
06af083b93
@@ -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;
|
||||
|
||||
@@ -1200,7 +1200,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;
|
||||
|
||||
Reference in New Issue
Block a user