diff options
author | Maarten Lankhorst <[email protected]> | 2013-09-09 13:02:08 +0200 |
---|---|---|
committer | Maarten Lankhorst <[email protected]> | 2013-09-11 09:03:44 +0200 |
commit | b217d48364f368f541e53006af5dd56f664be24d (patch) | |
tree | 19cc7c1691d62564311470e8ef1c4f04a2c370cc /src/gallium/state_trackers/egl | |
parent | 169f9c030c16d1247a3a762972d8687d89a16750 (diff) |
st/dri: do not create a new context for msaa copy
Commit b77316ad7594f
st/dri: always copy new DRI front and back buffers to corresponding MSAA buffers
introduced creating a pipe_context for every call to validate, which is not required
because the callers have a context anyway.
Only exception is egl_g3d_create_pbuffer_from_client_buffer, can someone test if it
still works with NULL passed as context for validate? From examining the code I
believe it does, but I didn't thoroughly test it.
Signed-off-by: Maarten Lankhorst <[email protected]>
Cc: 9.2 <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/egl')
-rw-r--r-- | src/gallium/state_trackers/egl/common/egl_g3d_api.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/egl/common/egl_g3d_st.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_api.c b/src/gallium/state_trackers/egl/common/egl_g3d_api.c index 3ee0d677017..46a3245246f 100644 --- a/src/gallium/state_trackers/egl/common/egl_g3d_api.c +++ b/src/gallium/state_trackers/egl/common/egl_g3d_api.c @@ -443,7 +443,7 @@ egl_g3d_create_pbuffer_from_client_buffer(_EGLDriver *drv, _EGLDisplay *dpy, gsurf->client_buffer = buffer; /* validate now so that it fails if the client buffer is invalid */ - if (!gsurf->stfbi->validate(gsurf->stfbi, + if (!gsurf->stfbi->validate(NULL, gsurf->stfbi, &gsurf->stvis.render_buffer, 1, &ptex)) { egl_g3d_destroy_st_framebuffer(gsurf->stfbi); FREE(gsurf); diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_st.c b/src/gallium/state_trackers/egl/common/egl_g3d_st.c index f2ee11c8e01..cf1846c74b7 100644 --- a/src/gallium/state_trackers/egl/common/egl_g3d_st.c +++ b/src/gallium/state_trackers/egl/common/egl_g3d_st.c @@ -149,7 +149,8 @@ pbuffer_allocate_pbuffer_texture(struct egl_g3d_surface *gsurf) } static boolean -egl_g3d_st_framebuffer_validate_pbuffer(struct st_framebuffer_iface *stfbi, +egl_g3d_st_framebuffer_validate_pbuffer(struct st_context_iface *stctx, + struct st_framebuffer_iface *stfbi, const enum st_attachment_type *statts, unsigned count, struct pipe_resource **out) @@ -202,7 +203,8 @@ egl_g3d_st_framebuffer_flush_front(struct st_context_iface *stctx, } static boolean -egl_g3d_st_framebuffer_validate(struct st_framebuffer_iface *stfbi, +egl_g3d_st_framebuffer_validate(struct st_context_iface *stctx, + struct st_framebuffer_iface *stfbi, const enum st_attachment_type *statts, unsigned count, struct pipe_resource **out) |