summaryrefslogtreecommitdiffstats
path: root/src/mesa/program
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/program')
-rw-r--r--src/mesa/program/arbprogparse.c2
-rw-r--r--src/mesa/program/ir_to_mesa.cpp3
-rw-r--r--src/mesa/program/prog_to_nir.c6
-rw-r--r--src/mesa/program/program.c2
4 files changed, 3 insertions, 10 deletions
diff --git a/src/mesa/program/arbprogparse.c b/src/mesa/program/arbprogparse.c
index 80a05285838..82bdd133024 100644
--- a/src/mesa/program/arbprogparse.c
+++ b/src/mesa/program/arbprogparse.c
@@ -119,7 +119,7 @@ _mesa_parse_arb_fragment_program(struct gl_context* ctx, GLenum target,
program->OriginUpperLeft = state.option.OriginUpperLeft;
program->PixelCenterInteger = state.option.PixelCenterInteger;
- program->UsesKill = state.fragment.UsesKill;
+ program->Base.info.fs.uses_discard = state.fragment.UsesKill;
free(program->Base.Instructions);
program->Base.Instructions = prog.Instructions;
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 00ee3e34bfc..03af1165827 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -2926,8 +2926,7 @@ get_mesa_program(struct gl_context *ctx,
/* Set the gl_FragDepth layout. */
if (target == GL_FRAGMENT_PROGRAM_ARB) {
- struct gl_fragment_program *fp = (struct gl_fragment_program *)prog;
- fp->FragDepthLayout = shader_program->FragDepthLayout;
+ prog->info.fs.depth_layout = shader_program->FragDepthLayout;
}
_mesa_reference_program(ctx, &shader->Program, prog);
diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c
index 1192207c5d1..fb34b3c1e2a 100644
--- a/src/mesa/program/prog_to_nir.c
+++ b/src/mesa/program/prog_to_nir.c
@@ -1061,12 +1061,6 @@ prog_to_nir(const struct gl_program *prog,
s->info->uses_clip_distance_out = false;
s->info->separate_shader = false;
- if (stage == MESA_SHADER_FRAGMENT) {
- struct gl_fragment_program *fp = (struct gl_fragment_program *)prog;
-
- s->info->fs.uses_discard = fp->UsesKill;
- }
-
fail:
if (c->error) {
ralloc_free(s);
diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c
index 61cc6fe9e96..1d9eaa0c69a 100644
--- a/src/mesa/program/program.c
+++ b/src/mesa/program/program.c
@@ -521,7 +521,7 @@ _mesa_get_min_invocations_per_fragment(struct gl_context *ctx,
* "Use of the "sample" qualifier on a fragment shader input
* forces per-sample shading"
*/
- if (prog->IsSample && !ignore_sample_qualifier)
+ if (prog->Base.info.fs.uses_sample_qualifier && !ignore_sample_qualifier)
return MAX2(_mesa_geometric_samples(ctx->DrawBuffer), 1);
if (prog->Base.SystemValuesRead & (SYSTEM_BIT_SAMPLE_ID |