gallium: Plumb through a way to disable GLSL const lowering
For radeonsi, we will prefer the NIR pass as it'll generate better code (some index calculation and a single load vs. a load, then index calculation, then another load) and oftentimes NIR optimization can kick in and make all the access indices constant. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
@@ -633,6 +633,8 @@ _mesa_init_constants(struct gl_constants *consts, gl_api api)
|
||||
consts->GLSLVersion = api == API_OPENGL_CORE ? 130 : 120;
|
||||
consts->GLSLVersionCompat = consts->GLSLVersion;
|
||||
|
||||
consts->GLSLLowerConstArrays = true;
|
||||
|
||||
/* Assume that if GLSL 1.30+ (or GLSL ES 3.00+) is supported that
|
||||
* gl_VertexID is implemented using a native hardware register with OpenGL
|
||||
* semantics.
|
||||
|
Reference in New Issue
Block a user