summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-10-08 15:47:09 -0700
committerJason Ekstrand <[email protected]>2015-10-19 08:47:03 -0700
commit688d2e45855299dcf474791f29d65040ce5cb2dc (patch)
tree346d7598ed7077a9057222a6d4ddc84ca65b5676 /src/mesa
parent4889c73dd1ed0af7920b950f6810361a6eeabcc2 (diff)
nir/info: Add a few bits of info for fragment shaders
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/program/prog_to_nir.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c
index da61a2b9bd3..539e3c05312 100644
--- a/src/mesa/program/prog_to_nir.c
+++ b/src/mesa/program/prog_to_nir.c
@@ -1129,6 +1129,12 @@ 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);