summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/vega/vg_manager.c
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-06-23 16:14:49 +0800
committerChia-I Wu <olv@lunarg.com>2010-06-29 17:16:19 +0800
commit982aba97c581bab0ff55dc9cae4164ab30dfbeae (patch)
tree8ce0237fb9336859616ab43a05c82135ae22048c /src/gallium/state_trackers/vega/vg_manager.c
parentda7bd6a90e1fee5c16327338fd251c0f6be34e36 (diff)
st_api: Remove st_context::is_visual_supported.
The callback is used by st/vega to check if a visual specifies the depth/stencil format. It forces st/vega to be loaded by st/egl to perform the check. As noted in EGL spec, the depth/stencil format of a visual should not affect OpenVG. It should be better to ignore the field and always allocate the depth/stencil texture.
Diffstat (limited to 'src/gallium/state_trackers/vega/vg_manager.c')
-rw-r--r--src/gallium/state_trackers/vega/vg_manager.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/gallium/state_trackers/vega/vg_manager.c b/src/gallium/state_trackers/vega/vg_manager.c
index 3b04816df0..bd6b59ba66 100644
--- a/src/gallium/state_trackers/vega/vg_manager.c
+++ b/src/gallium/state_trackers/vega/vg_manager.c
@@ -448,8 +448,7 @@ vg_context_bind_framebuffers(struct st_context_iface *stctxi,
/* free the existing fb */
if (!stdrawi ||
stfb->strb_att != strb_att ||
- stfb->strb->format != stdrawi->visual->color_format ||
- stfb->dsrb->format != stdrawi->visual->depth_stencil_format) {
+ stfb->strb->format != stdrawi->visual->color_format) {
destroy_renderbuffer(stfb->strb);
destroy_renderbuffer(stfb->dsrb);
free(stfb);
@@ -476,7 +475,7 @@ vg_context_bind_framebuffers(struct st_context_iface *stctxi,
return FALSE;
}
- stfb->dsrb = create_renderbuffer(stdrawi->visual->depth_stencil_format);
+ stfb->dsrb = create_renderbuffer(ctx->ds_format);
if (!stfb->dsrb) {
free(stfb->strb);
free(stfb);
@@ -517,14 +516,6 @@ vg_api_get_current(struct st_api *stapi)
return (ctx) ? &ctx->iface : NULL;
}
-static boolean
-vg_api_is_visual_supported(struct st_api *stapi,
- const struct st_visual *visual)
-{
- /* the impl requires a depth/stencil buffer */
- return util_format_is_depth_and_stencil(visual->depth_stencil_format);
-}
-
static st_proc_t
vg_api_get_proc_address(struct st_api *stapi, const char *procname)
{
@@ -539,7 +530,6 @@ vg_api_destroy(struct st_api *stapi)
static const struct st_api vg_api = {
vg_api_destroy,
vg_api_get_proc_address,
- vg_api_is_visual_supported,
vg_api_create_context,
vg_api_make_current,
vg_api_get_current,