From 8f6d9e12be0be086ca2aab0b56dff8d2181addd9 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 14 Aug 2008 15:38:09 -0600 Subject: gallium: use a default texture in update_textures(), update_samplers() when needed The default texture is used when the current fragment shader has texture sample instructions but the user has not provided/bound a texture. --- src/mesa/state_tracker/st_context.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa/state_tracker/st_context.c') diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 6e4a376..d014ace 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -199,6 +199,11 @@ static void st_destroy_context_priv( struct st_context *st ) } } + if (st->default_texture) { + st->ctx->Driver.DeleteTexture(st->ctx, st->default_texture); + st->default_texture = NULL; + } + free( st ); } -- cgit v1.1 From 7f2d349b2d27cb1f422677fdac1a9d92f61d8fce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fonseca?= Date: Tue, 19 Aug 2008 02:24:13 +0100 Subject: mesa: Call pipe->destroy on context destruction for all platforms. --- src/mesa/state_tracker/st_context.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/mesa/state_tracker/st_context.c') diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index d014ace..3b126e6 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -228,10 +228,7 @@ void st_destroy_context( struct st_context *st ) cso_destroy_context(cso); - /* Temporary workaround for mismatched pipe create and pipe destroy */ -#if !defined(PIPE_SUBSYSTEM_WINDOWS_USER) && !defined(PIPE_SUBSYSTEM_WINDOWS_CE) pipe->destroy( pipe ); -#endif free(ctx); } -- cgit v1.1 From e90c0c976d89d108a8220b538e02be173cf308fe Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 19 Aug 2008 14:24:27 -0600 Subject: gallium: do a proper implementation of GL_OES_read_format Examine the currently bound color buffer's format to see if there's a good format/type match. --- src/mesa/state_tracker/st_context.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa/state_tracker/st_context.c') diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 3b126e6..83b0be0 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -49,6 +49,7 @@ #include "st_cb_drawtex.h" #endif #include "st_cb_fbo.h" +#include "st_cb_get.h" #if FEATURE_feedback #include "st_cb_feedback.h" #endif @@ -293,6 +294,7 @@ void st_init_driver_functions(struct dd_function_table *functions) st_init_rasterpos_functions(functions); #endif st_init_fbo_functions(functions); + st_init_get_functions(functions); #if FEATURE_feedback st_init_feedback_functions(functions); #endif -- cgit v1.1 From f637a96e85a51a66f2c53b91118a6815bb61d6e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fonseca?= Date: Wed, 3 Sep 2008 11:48:05 +0900 Subject: gallium: Have pipe_buffer_* receive a pipe_screen instead of a pipe_context. We want to use the pipe_buffer_* inlines everywhere, but a pipe context is not always available nor is it needed. --- src/mesa/state_tracker/st_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/state_tracker/st_context.c') diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 83b0be0..08d4db7 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -196,7 +196,7 @@ static void st_destroy_context_priv( struct st_context *st ) for (i = 0; i < Elements(st->state.constants); i++) { if (st->state.constants[i].buffer) { - pipe_reference_buffer(st->pipe, &st->state.constants[i].buffer, NULL); + pipe_buffer_reference(st->pipe->screen, &st->state.constants[i].buffer, NULL); } } -- cgit v1.1