summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXuelian Bai <xuelian.bai@samsung.com>2019-08-16 01:31:48 +0800
committerSooChan Lim <sc1.lim@samsung.com>2019-08-30 07:22:30 +0000
commitcc2dc99365906ea52b645be3bb10f50708d67e84 (patch)
tree0163608d885a914609da2e29e2e6ece093cca61c
parenteae18eca369151b84bf4e2bd2061869f09a88bb1 (diff)
downloadmesa-tizen_5.5_tv.tar.gz
mesa-tizen_5.5_tv.tar.bz2
mesa-tizen_5.5_tv.zip
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.c23
-rw-r--r--src/mesa/state_tracker/st_cb_blit.c4
-rwxr-xr-xsrc/mesa/state_tracker/st_manager.c7
-rw-r--r--src/mesa/state_tracker/st_manager.h5
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,