diff options
author | Jason Ekstrand <[email protected]> | 2015-10-08 15:47:09 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-10-19 08:47:03 -0700 |
commit | 688d2e45855299dcf474791f29d65040ce5cb2dc (patch) | |
tree | 346d7598ed7077a9057222a6d4ddc84ca65b5676 /src/glsl/nir/glsl_to_nir.cpp | |
parent | 4889c73dd1ed0af7920b950f6810361a6eeabcc2 (diff) |
nir/info: Add a few bits of info for fragment shaders
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/glsl/nir/glsl_to_nir.cpp')
-rw-r--r-- | src/glsl/nir/glsl_to_nir.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp index d230ad4416d..76e1382c362 100644 --- a/src/glsl/nir/glsl_to_nir.cpp +++ b/src/glsl/nir/glsl_to_nir.cpp @@ -173,6 +173,16 @@ glsl_to_nir(const struct gl_shader_program *shader_prog, shader->info.gs.invocations = sh->Geom.Invocations; break; + case MESA_SHADER_FRAGMENT: { + struct gl_fragment_program *fp = + (struct gl_fragment_program *)sh->Program; + + shader->info.fs.uses_discard = fp->UsesKill; + shader->info.fs.early_fragment_tests = sh->EarlyFragmentTests; + shader->info.fs.depth_layout = fp->FragDepthLayout; + break; + } + case MESA_SHADER_COMPUTE: { struct gl_compute_program *cp = (struct gl_compute_program *)sh->Program; shader->info.cs.local_size[0] = cp->LocalSize[0]; |