diff options
author | Jason Ekstrand <[email protected]> | 2016-05-09 17:48:24 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-05-14 13:34:05 -0700 |
commit | 712a980adde0b14eee8b4accd02af9b9740091a2 (patch) | |
tree | 7bb3fbc03b59eb51c491013c8bcf29bd2b7e0f8b /src/mesa/drivers/dri/i965/brw_compiler.h | |
parent | a2f50d87b6e9d07c6974ef309cc99acf56b2dc09 (diff) |
i965/fs: Rework the persample shading key/prog_data bits
This commit reworks and simplifies the way we handle persample shading in
the shader key and prog_data. The previous approach had three different
key bits that had slightly different and hard-to-decern meanings while the
new bits are far more clear. This commit changes it to two easily
understood bits that communicate everything we need:
1) key->persample_interp: means that the user has requested persample
interpolation through the API. This is equivalent to having
SAMPLE_SHADING enabled and having MIN_SAMPLE_SHADING_VALUE set high
enough that you actually get multiple per-sample invocations.
2) key->multisample_fbo: means that the shader will be running on an
actual multi-sampled framebuffer.
This commit also adds a new "persample_dispatch" bit to prog_data which
indicates that the shader should be run in persample mode. This way the
state setup code doesn't have to look at the fragment program or GL state
and can just pull that data out of the prog_data.
In theory, this shuffle could mean more recompiles. However, in practice,
we were shoving enough state into the key before that we were probably
hitting a recompile on every per-sample shader anyway.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_compiler.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_compiler.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_compiler.h b/src/mesa/drivers/dri/i965/brw_compiler.h index 3d1dc88eebc..3fcd7e87c4e 100644 --- a/src/mesa/drivers/dri/i965/brw_compiler.h +++ b/src/mesa/drivers/dri/i965/brw_compiler.h @@ -242,12 +242,11 @@ struct brw_wm_prog_key { uint8_t iz_lookup; bool stats_wm:1; bool flat_shade:1; - bool persample_shading:1; unsigned nr_color_regions:5; bool replicate_alpha:1; bool render_to_fbo:1; bool clamp_fragment_color:1; - bool compute_pos_offset:1; + bool persample_interp:1; bool multisample_fbo:1; unsigned line_aa:2; bool high_quality_derivatives:1; @@ -386,6 +385,7 @@ struct brw_wm_prog_data { bool early_fragment_tests; bool no_8; bool dual_src_blend; + bool persample_dispatch; bool uses_pos_offset; bool uses_omask; bool uses_kill; |