aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/drivers/common
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-10-19 10:44:43 +0200
committermarha <marha@users.sourceforge.net>2011-10-19 10:44:43 +0200
commit9f986778bd4393c5a9108426969d45aa7f10f334 (patch)
tree27d7bd08dac54a54a923e76dccf2b8e388be2a03 /mesalib/src/mesa/drivers/common
parentafbd3947071a33f59dda122f1ac396442a02c128 (diff)
downloadvcxsrv-9f986778bd4393c5a9108426969d45aa7f10f334.tar.gz
vcxsrv-9f986778bd4393c5a9108426969d45aa7f10f334.tar.bz2
vcxsrv-9f986778bd4393c5a9108426969d45aa7f10f334.zip
libX11 libXext libXft mesa libxcb mkfontscale pixman xserver
xkeyboard-config git update 19 oct 2011
Diffstat (limited to 'mesalib/src/mesa/drivers/common')
-rw-r--r--mesalib/src/mesa/drivers/common/driverfuncs.c1
-rw-r--r--mesalib/src/mesa/drivers/common/meta.c33
-rw-r--r--mesalib/src/mesa/drivers/common/meta.h1
3 files changed, 32 insertions, 3 deletions
diff --git a/mesalib/src/mesa/drivers/common/driverfuncs.c b/mesalib/src/mesa/drivers/common/driverfuncs.c
index 33da9346c..263d4025f 100644
--- a/mesalib/src/mesa/drivers/common/driverfuncs.c
+++ b/mesalib/src/mesa/drivers/common/driverfuncs.c
@@ -208,6 +208,7 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
driver->ProgramStringNotify = _tnl_program_string;
driver->FlushVertices = NULL;
driver->SaveFlushVertices = NULL;
+ driver->PrepareExecBegin = NULL;
driver->NotifySaveBegin = NULL;
driver->LightingSpaceChange = NULL;
diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c
index 5b73dcdfb..c7bb93380 100644
--- a/mesalib/src/mesa/drivers/common/meta.c
+++ b/mesalib/src/mesa/drivers/common/meta.c
@@ -44,6 +44,7 @@
#include "main/depth.h"
#include "main/enable.h"
#include "main/fbobject.h"
+#include "main/feedback.h"
#include "main/formats.h"
#include "main/image.h"
#include "main/macros.h"
@@ -172,6 +173,11 @@ struct save_state
struct gl_query_object *CondRenderQuery;
GLenum CondRenderMode;
+ /** MESA_META_SELECT_FEEDBACK */
+ GLenum RenderMode;
+ struct gl_selection Select;
+ struct gl_feedback Feedback;
+
/** Miscellaneous (always disabled) */
GLboolean Lighting;
};
@@ -273,7 +279,7 @@ struct decompress_state
};
-#define MAX_META_OPS_DEPTH 2
+#define MAX_META_OPS_DEPTH 8
/**
* All per-context meta state.
*/
@@ -464,7 +470,7 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
_mesa_reference_shader_program(ctx, &save->FragmentShader,
ctx->Shader.CurrentFragmentProgram);
_mesa_reference_shader_program(ctx, &save->ActiveShader,
- ctx->Shader.CurrentFragmentProgram);
+ ctx->Shader.ActiveProgram);
_mesa_UseProgramObjectARB(0);
}
@@ -608,6 +614,17 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
_mesa_EndConditionalRender();
}
+ if (state & MESA_META_SELECT_FEEDBACK) {
+ save->RenderMode = ctx->RenderMode;
+ if (ctx->RenderMode == GL_SELECT) {
+ save->Select = ctx->Select; /* struct copy */
+ _mesa_RenderMode(GL_RENDER);
+ } else if (ctx->RenderMode == GL_FEEDBACK) {
+ save->Feedback = ctx->Feedback; /* struct copy */
+ _mesa_RenderMode(GL_RENDER);
+ }
+ }
+
/* misc */
{
save->Lighting = ctx->Light.Enabled;
@@ -893,6 +910,16 @@ _mesa_meta_end(struct gl_context *ctx)
save->CondRenderMode);
}
+ if (state & MESA_META_SELECT_FEEDBACK) {
+ if (save->RenderMode == GL_SELECT) {
+ _mesa_RenderMode(GL_SELECT);
+ ctx->Select = save->Select;
+ } else if (save->RenderMode == GL_FEEDBACK) {
+ _mesa_RenderMode(GL_FEEDBACK);
+ ctx->Feedback = save->Feedback;
+ }
+ }
+
/* misc */
if (save->Lighting) {
_mesa_set_enable(ctx, GL_LIGHTING, GL_TRUE);
@@ -2942,7 +2969,7 @@ get_temp_image_type(struct gl_context *ctx, GLenum baseFormat)
case GL_INTENSITY:
if (ctx->DrawBuffer->Visual.redBits <= 8)
return GL_UNSIGNED_BYTE;
- else if (ctx->DrawBuffer->Visual.redBits <= 8)
+ else if (ctx->DrawBuffer->Visual.redBits <= 16)
return GL_UNSIGNED_SHORT;
else
return GL_FLOAT;
diff --git a/mesalib/src/mesa/drivers/common/meta.h b/mesalib/src/mesa/drivers/common/meta.h
index 7ec568388..e0435a822 100644
--- a/mesalib/src/mesa/drivers/common/meta.h
+++ b/mesalib/src/mesa/drivers/common/meta.h
@@ -54,6 +54,7 @@
#define MESA_META_CLAMP_VERTEX_COLOR 0x10000
#define MESA_META_CONDITIONAL_RENDER 0x20000
#define MESA_META_CLIP 0x40000
+#define MESA_META_SELECT_FEEDBACK 0x80000
/**\}*/
extern void