summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/v3d/v3d_program.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-04-08 16:32:01 -0700
committerEric Anholt <[email protected]>2019-04-10 11:44:20 -0700
commit771adffec1b6e504367b83c121efd0fb657bb262 (patch)
tree0e95d2b60b3492afcaf32aa332667749a194db27 /src/gallium/drivers/v3d/v3d_program.c
parent3053d5a4f2fd6f81a6fb8d398afeaca91c7692e8 (diff)
st: Lower uniforms in st in the !PIPE_CAP_PACKED_UNIFORMS case as well.
PIPE_CAP_PACKED_UNIFORMS conflates several things: Lowering uniforms i/o at the st level instead of the backend, packing uniforms with no padding at all, and lowering to UBOs. Requiring backends to lower uniforms i/o for !PIPE_CAP_PACKED_UNIFORMS leads to the driver needing to either link against the type size function in mesa/st, or duplicating it in the backend. Given that all backends want this lower-io as far as I can tell, just move it to mesa/st to resolve the link issue and avoid the driver author needing to understand st's uniforms layout. Incidentally, fixes uniform layout failures in nouveau in: dEQP-GLES2.functional.shaders.struct.uniform.sampler_nested_fragment dEQP-GLES2.functional.shaders.struct.uniform.sampler_nested_vertex dEQP-GLES2.functional.shaders.struct.uniform.sampler_array_fragment dEQP-GLES2.functional.shaders.struct.uniform.sampler_array_vertex and I think in Lima as well. v2: fix indents Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/gallium/drivers/v3d/v3d_program.c')
-rw-r--r--src/gallium/drivers/v3d/v3d_program.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/gallium/drivers/v3d/v3d_program.c b/src/gallium/drivers/v3d/v3d_program.c
index b8da87c7797..e3515335502 100644
--- a/src/gallium/drivers/v3d/v3d_program.c
+++ b/src/gallium/drivers/v3d/v3d_program.c
@@ -36,7 +36,6 @@
#include "compiler/v3d_compiler.h"
#include "v3d_context.h"
#include "broadcom/cle/v3d_packet_v33_pack.h"
-#include "mesa/state_tracker/st_glsl_types.h"
static struct v3d_compiled_shader *
v3d_get_compiled_shader(struct v3d_context *v3d, struct v3d_key *key);
@@ -175,12 +174,6 @@ type_size(const struct glsl_type *type)
return glsl_count_attribute_slots(type, false);
}
-static int
-uniforms_type_size(const struct glsl_type *type)
-{
- return st_glsl_storage_type_size(type, false);
-}
-
/**
* Precompiles a shader variant at shader state creation time if
* V3D_DEBUG=precompile is set. Used for shader-db
@@ -262,10 +255,6 @@ v3d_shader_state_create(struct pipe_context *pctx,
* creation.
*/
s = cso->ir.nir;
-
- NIR_PASS_V(s, nir_lower_io, nir_var_uniform,
- uniforms_type_size,
- (nir_lower_io_options)0);
} else {
assert(cso->type == PIPE_SHADER_IR_TGSI);