aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/program/prog_to_nir.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-05-09 14:06:43 +1000
committerKenneth Graunke <[email protected]>2019-02-19 15:56:26 -0800
commit3d7611e9a6c63a5ec03d3f9a7f90fbf286ec72a3 (patch)
tree27fce6d1a596df62f71f386b1a8f6894f0d47cf2 /src/mesa/program/prog_to_nir.c
parent3b4929ec6e6456fb093483e2dc9ce008622373d6 (diff)
st/nir: use NIR for asm programs
This uses prog_to_nir to translate ARB assembly programs to NIR. Co-authored by Tim Arceri, Dave Airlie, and Ken Graunke: - [Tim Arceri]: original patch - [Dave Airlie]: fix crashes with parameter names - [Ken Graunke]: - Rebase on SCALAR_ISA cap, lower wpos_ytransform too. - Rebase on streamout fixes. - Lower system values for fragcoord support. - Don't try to use prog_to_nir for ATI_fragment_shader programs. - Create TGSI for fixed-function or ARB vertex shaders even if the driver prefers NIR, so we can create draw module shaders for feedback/select emulation, which rely on TGSI. Tested on: - iris (Intel Skylake/Kabylake): Piglit & GL CTS - Ken Graunke - radeonsi (AMD Vega 64): Piglit - Ken Graunke - vc4/v3d - Piglit - Eric Anholt - freedreno - dEQP - Kristian Høgsberg Fixes lit_degenerate_case on vc4 and v3d, and vp-address-01, vp-arl-constant-array-huge-offset-neg, and vp-arl-neg-array on v3d. No Piglit regressions on radeonsi; no dEQP regressions on freedreno. Acked-by: Eric Anholt <[email protected]> Tested-by: Eric Anholt <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/program/prog_to_nir.c')
-rw-r--r--src/mesa/program/prog_to_nir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c
index 9d4f6d63dcc..312b299361e 100644
--- a/src/mesa/program/prog_to_nir.c
+++ b/src/mesa/program/prog_to_nir.c
@@ -1024,7 +1024,7 @@ prog_to_nir(const struct gl_program *prog,
c->parameters = rzalloc(s, nir_variable);
c->parameters->type =
glsl_array_type(glsl_vec4_type(), prog->Parameters->NumParameters, 0);
- c->parameters->name = "parameters";
+ c->parameters->name = strdup(prog->Parameters->Parameters[0].Name);
c->parameters->data.read_only = true;
c->parameters->data.mode = nir_var_uniform;
exec_list_push_tail(&s->uniforms, &c->parameters->node);