diff options
author | Xuelian Bai <xuelian.bai@samsung.com> | 2019-08-16 01:31:48 +0800 |
---|---|---|
committer | SooChan Lim <sc1.lim@samsung.com> | 2019-08-30 07:22:30 +0000 |
commit | cc2dc99365906ea52b645be3bb10f50708d67e84 (patch) | |
tree | 0163608d885a914609da2e29e2e6ece093cca61c | |
parent | eae18eca369151b84bf4e2bd2061869f09a88bb1 (diff) | |
download | mesa-cc2dc99365906ea52b645be3bb10f50708d67e84.tar.gz mesa-cc2dc99365906ea52b645be3bb10f50708d67e84.tar.bz2 mesa-cc2dc99365906ea52b645be3bb10f50708d67e84.zip |
Fix 1x1 issue of task-mgrtizen_5.5.m2_releasesubmit/tizen_5.5_wearable_hotfix/20201026.184307submit/tizen_5.5_mobile_hotfix/20201026.185107submit/tizen_5.5/20191031.000010submit/tizen/20190830.072315accepted/tizen/unified/20190902.055254accepted/tizen/5.5/unified/wearable/hotfix/20201027.095847accepted/tizen/5.5/unified/mobile/hotfix/20201027.073534accepted/tizen/5.5/unified/20191031.004442tizen_5.5_wearable_hotfixtizen_5.5_tvtizen_5.5_mobile_hotfixtizen_5.5accepted/tizen_5.5_unified_wearable_hotfixaccepted/tizen_5.5_unified_mobile_hotfixaccepted/tizen_5.5_unified
Makecurrent is called just before resize callback is called, so we
have to check if size is changed when drawcall.
Change-Id: I82c4f8fd1c805ad8cd9094dccb8e8430b8ef35cd
-rw-r--r-- | src/mesa/state_tracker/st_atom.c | 23 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_blit.c | 4 | ||||
-rwxr-xr-x | src/mesa/state_tracker/st_manager.c | 7 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_manager.h | 5 |
4 files changed, 37 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c index df1a94e831e..fa4b82c08dd 100644 --- a/src/mesa/state_tracker/st_atom.c +++ b/src/mesa/state_tracker/st_atom.c @@ -36,6 +36,7 @@ #include "st_atom.h" #include "st_program.h" #include "st_manager.h" +#include "st_cb_fbo.h" typedef void (*update_func_t)(struct st_context *st); @@ -191,13 +192,26 @@ void st_validate_state( struct st_context *st, enum st_pipeline pipeline ) st->gfx_shaders_may_be_dirty = false; } +#ifdef HAVE_TIZEN_PLATFORM + struct st_framebuffer *stdraw = st_ws_framebuffer(st->ctx->DrawBuffer); + boolean valid = TRUE; + + if (stdraw && stdraw->iface->validate_drawable) + valid = stdraw->iface->validate_drawable(stdraw->iface); + st_manager_validate_framebuffers(st, valid); +#else st_manager_validate_framebuffers(st); +#endif pipeline_mask = ST_PIPELINE_RENDER_STATE_MASK; break; case ST_PIPELINE_CLEAR: +#ifdef HAVE_TIZEN_PLATFORM + st_manager_validate_framebuffers(st, TRUE); +#else st_manager_validate_framebuffers(st); +#endif pipeline_mask = ST_PIPELINE_CLEAR_STATE_MASK; break; @@ -206,13 +220,20 @@ void st_validate_state( struct st_context *st, enum st_pipeline pipeline ) check_program_state(st); st->gfx_shaders_may_be_dirty = false; } - +#ifdef HAVE_TIZEN_PLATFORM + st_manager_validate_framebuffers(st, TRUE); +#else st_manager_validate_framebuffers(st); +#endif pipeline_mask = ST_PIPELINE_META_STATE_MASK; break; case ST_PIPELINE_UPDATE_FRAMEBUFFER: +#ifdef HAVE_TIZEN_PLATFORM + st_manager_validate_framebuffers(st, TRUE); +#else st_manager_validate_framebuffers(st); +#endif pipeline_mask = ST_PIPELINE_UPDATE_FB_STATE_MASK; break; diff --git a/src/mesa/state_tracker/st_cb_blit.c b/src/mesa/state_tracker/st_cb_blit.c index 564ad666655..11d36e6af8c 100644 --- a/src/mesa/state_tracker/st_cb_blit.c +++ b/src/mesa/state_tracker/st_cb_blit.c @@ -64,7 +64,11 @@ st_BlitFramebuffer(struct gl_context *ctx, } clip; struct pipe_blit_info blit; +#ifdef HAVE_TIZEN_PLATFORM + st_manager_validate_framebuffers(st, TRUE); +#else st_manager_validate_framebuffers(st); +#endif /* Make sure bitmap rendering has landed in the framebuffers */ st_flush_bitmap_cache(st); diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index 40deb8b71a3..cf72ef27701 100755 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -1176,15 +1176,20 @@ st_manager_flush_frontbuffer(struct st_context *st) /** * Re-validate the framebuffers. */ +#ifdef HAVE_TIZEN_PLATFORM +void +st_manager_validate_framebuffers(struct st_context *st, bool valid) +#else void st_manager_validate_framebuffers(struct st_context *st) +#endif { struct st_framebuffer *stdraw = st_ws_framebuffer(st->ctx->DrawBuffer); struct st_framebuffer *stread = st_ws_framebuffer(st->ctx->ReadBuffer); #ifdef HAVE_TIZEN_PLATFORM if (stdraw) - st_framebuffer_validate(stdraw, st, TRUE); + st_framebuffer_validate(stdraw, st, valid); if (stread && stread != stdraw) st_framebuffer_validate(stread, st, TRUE); #else diff --git a/src/mesa/state_tracker/st_manager.h b/src/mesa/state_tracker/st_manager.h index 581e858229b..aa8c1972524 100644 --- a/src/mesa/state_tracker/st_manager.h +++ b/src/mesa/state_tracker/st_manager.h @@ -41,8 +41,13 @@ struct pipe_surface; void st_manager_flush_frontbuffer(struct st_context *st); +#ifdef HAVE_TIZEN_PLATFORM +void +st_manager_validate_framebuffers(struct st_context *st, bool valid); +#else void st_manager_validate_framebuffers(struct st_context *st); +#endif boolean st_manager_add_color_renderbuffer(struct st_context *st, struct gl_framebuffer *fb, |