diff options
author | Christian König <[email protected]> | 2011-05-07 14:11:40 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2011-05-07 14:11:40 +0200 |
commit | 213b9004a6ee033a16af3dcd187aa68b56c39858 (patch) | |
tree | f577f4dc276f70dad63f102f69f87f4d566186ef /src/mesa/drivers/common | |
parent | 6ad846ee78d9d8ba93dcecdefbf89f2b981333ef (diff) | |
parent | 03615c02d81437cf546609fc6a39c6c73be39360 (diff) |
Merge remote-tracking branch 'origin/master' into pipe-video
Conflicts:
src/gallium/drivers/r600/r600_state.c
Diffstat (limited to 'src/mesa/drivers/common')
-rw-r--r-- | src/mesa/drivers/common/driverfuncs.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/common/meta.c | 28 |
2 files changed, 29 insertions, 2 deletions
diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c index 854dea94504..0dbc7c3e853 100644 --- a/src/mesa/drivers/common/driverfuncs.c +++ b/src/mesa/drivers/common/driverfuncs.c @@ -41,6 +41,7 @@ #include "main/bufferobj.h" #include "main/fbobject.h" #include "main/texrender.h" +#include "main/samplerobj.h" #include "main/syncobj.h" #include "main/texturebarrier.h" #include "main/transformfeedback.h" @@ -200,6 +201,8 @@ _mesa_init_driver_functions(struct dd_function_table *driver) _mesa_init_transform_feedback_functions(driver); + _mesa_init_sampler_object_functions(driver); + /* T&L stuff */ driver->NeedValidate = GL_FALSE; driver->ValidateTnlModule = NULL; diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 6c35fa10d8a..08b6024639f 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -40,6 +40,7 @@ #include "main/bufferobj.h" #include "main/buffers.h" #include "main/colortab.h" +#include "main/condrender.h" #include "main/depth.h" #include "main/enable.h" #include "main/fbobject.h" @@ -94,6 +95,7 @@ #define META_VIEWPORT 0x4000 #define META_CLAMP_FRAGMENT_COLOR 0x8000 #define META_CLAMP_VERTEX_COLOR 0x10000 +#define META_CONDITIONAL_RENDER 0x20000 /*@}*/ @@ -188,6 +190,10 @@ struct save_state /** META_CLAMP_VERTEX_COLOR */ GLenum ClampVertexColor; + /** META_CONDITIONAL_RENDER */ + struct gl_query_object *CondRenderQuery; + GLenum CondRenderMode; + /** Miscellaneous (always disabled) */ GLboolean Lighting; }; @@ -597,6 +603,14 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state) _mesa_ClampColorARB(GL_CLAMP_VERTEX_COLOR, GL_FALSE); } + if (state & META_CONDITIONAL_RENDER) { + save->CondRenderQuery = ctx->Query.CondRenderQuery; + save->CondRenderMode = ctx->Query.CondRenderMode; + + if (ctx->Query.CondRenderQuery) + _mesa_EndConditionalRender(); + } + /* misc */ { save->Lighting = ctx->Light.Enabled; @@ -869,6 +883,12 @@ _mesa_meta_end(struct gl_context *ctx) _mesa_ClampColorARB(GL_CLAMP_VERTEX_COLOR, save->ClampVertexColor); } + if (state & META_CONDITIONAL_RENDER) { + if (save->CondRenderQuery) + _mesa_BeginConditionalRender(save->CondRenderQuery->Id, + save->CondRenderMode); + } + /* misc */ if (save->Lighting) { _mesa_set_enable(ctx, GL_LIGHTING, GL_TRUE); @@ -1442,7 +1462,10 @@ _mesa_meta_Clear(struct gl_context *ctx, GLbitfield buffers) }; struct vertex verts[4]; /* save all state but scissor, pixel pack/unpack */ - GLbitfield metaSave = META_ALL - META_SCISSOR - META_PIXEL_STORE; + GLbitfield metaSave = (META_ALL - + META_SCISSOR - + META_PIXEL_STORE - + META_CONDITIONAL_RENDER); const GLuint stencilMax = (1 << ctx->DrawBuffer->Visual.stencilBits) - 1; if (buffers & BUFFER_BITS_COLOR) { @@ -1848,7 +1871,8 @@ _mesa_meta_DrawPixels(struct gl_context *ctx, * just going for the matching set of channels, in floating * point. */ - if (ctx->Color.ClampFragmentColor != GL_TRUE) + if (ctx->Color.ClampFragmentColor != GL_TRUE && + ctx->Extensions.ARB_texture_float) texIntFormat = GL_RGBA32F; } else if (_mesa_is_stencil_format(format)) { |