diff options
author | Rob Clark <[email protected]> | 2016-08-31 17:44:01 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2016-09-26 15:29:17 -0400 |
commit | ecd6fce2611e88ff8468a354cff8eda39f260a31 (patch) | |
tree | f4c281475a9dfb836cf9c9ff1853de0edc850bc6 /src/mesa/state_tracker/st_context.c | |
parent | e0ec1c31345aa8f47b5dea16d26be4420bd908ad (diff) |
mesa/st: support lowering multi-planar YUV
Support multi-planar YUV for external EGLImage's (currently just in the
dma-buf import path) by lowering to multiple texture fetch's for each
plane and CSC in shader.
There was some discussion of alternative approaches for tracking the
additional UV or U/V planes:
https://lists.freedesktop.org/archives/mesa-dev/2016-September/127832.html
They all seemed worse than pipe_resource::next
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_context.c')
-rw-r--r-- | src/mesa/state_tracker/st_context.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 81b3387626c..b9dc0c67da3 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -255,11 +255,16 @@ void st_invalidate_state(struct gl_context * ctx, GLbitfield new_state) st->active_states = st_get_active_states(ctx); } - if (new_state & _NEW_TEXTURE) + if (new_state & _NEW_TEXTURE) { st->dirty |= st->active_states & (ST_NEW_SAMPLER_VIEWS | ST_NEW_SAMPLERS | ST_NEW_IMAGE_UNITS); + if (ctx->FragmentProgram._Current && + ctx->FragmentProgram._Current->Base.ExternalSamplersUsed) { + st->dirty |= ST_NEW_FS_STATE; + } + } if (new_state & _NEW_PROGRAM_CONSTANTS) st->dirty |= st->active_states & ST_NEW_CONSTANTS; |