summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-06-10 02:14:15 +0200
committerMarek Olšák <[email protected]>2017-06-22 01:51:02 +0200
commit86840d3f08ec1f3cf6f02979ef1875087aef2724 (patch)
tree6497b30b1096348b11eebd8f660900ef9fb79056 /src/mesa/state_tracker
parent581d77315bdb2338e97133a05fa8c354352f5fd8 (diff)
mesa: don't flag _NEW_MULTISAMPLE for st/mesa
There are several new driver flags here so that it maps nicely to gallium. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_context.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 2bd91530312..23e3768373f 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -213,23 +213,12 @@ st_invalidate_state(struct gl_context * ctx)
}
}
- if (new_state & _NEW_MULTISAMPLE) {
- st->dirty |= ST_NEW_BLEND |
- ST_NEW_SAMPLE_MASK |
- ST_NEW_SAMPLE_SHADING |
- ST_NEW_RASTERIZER |
- ST_NEW_FS_STATE;
- } else {
- /* These set a subset of flags set by _NEW_MULTISAMPLE, so we only
- * have to check them when _NEW_MULTISAMPLE isn't set.
- */
- if (new_state & (_NEW_LIGHT |
- _NEW_LINE |
- _NEW_POINT |
- _NEW_POLYGON |
- _NEW_TRANSFORM))
- st->dirty |= ST_NEW_RASTERIZER;
- }
+ if (new_state & (_NEW_LIGHT |
+ _NEW_LINE |
+ _NEW_POINT |
+ _NEW_POLYGON |
+ _NEW_TRANSFORM))
+ st->dirty |= ST_NEW_RASTERIZER;
if (new_state & (_NEW_PROJECTION |
_NEW_TRANSFORM) &&
@@ -522,6 +511,19 @@ static void st_init_driver_flags(struct st_context *st)
f->NewDepth = ST_NEW_DSA;
f->NewLogicOp = ST_NEW_BLEND;
f->NewStencil = ST_NEW_DSA;
+ f->NewMultisampleEnable = ST_NEW_BLEND | ST_NEW_RASTERIZER |
+ ST_NEW_SAMPLE_MASK | ST_NEW_SAMPLE_SHADING;
+ f->NewSampleAlphaToXEnable = ST_NEW_BLEND;
+ f->NewSampleMask = ST_NEW_SAMPLE_MASK;
+ f->NewSampleShading = ST_NEW_SAMPLE_SHADING;
+
+ /* This depends on what the gallium driver wants. */
+ if (st->force_persample_in_shader) {
+ f->NewMultisampleEnable |= ST_NEW_FS_STATE;
+ f->NewSampleShading |= ST_NEW_FS_STATE;
+ } else {
+ f->NewSampleShading |= ST_NEW_RASTERIZER;
+ }
}
struct st_context *st_create_context(gl_api api, struct pipe_context *pipe,