aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa')
-rw-r--r--mesalib/src/mesa/Makefile.am14
-rw-r--r--mesalib/src/mesa/drivers/common/meta.c18
-rw-r--r--mesalib/src/mesa/drivers/common/meta.h1
-rw-r--r--mesalib/src/mesa/main/api_validate.c21
4 files changed, 40 insertions, 14 deletions
diff --git a/mesalib/src/mesa/Makefile.am b/mesalib/src/mesa/Makefile.am
index e52678d58..bada7601a 100644
--- a/mesalib/src/mesa/Makefile.am
+++ b/mesalib/src/mesa/Makefile.am
@@ -78,25 +78,29 @@ main/api_exec_es2_remap_helper.h: $(GLAPI)/gl_and_es_API.xml $(glapi_gen_remap_d
main/api_exec_es2.o: main/api_exec_es2_dispatch.h main/api_exec_es2_remap_helper.h
main/api_exec_es1.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py main/APIspec.py
- $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.xml -V GLES1.1 > $@
+ $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py \
+ -S $(srcdir)/main/APIspec.xml -V GLES1.1 > $@
main/api_exec_es2.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py main/APIspec.py
- $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.xml -V GLES2.0 > $@
+ $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py \
+ -S $(srcdir)/main/APIspec.xml -V GLES2.0 > $@
program/program_parse.tab.c program/program_parse.tab.h: program/program_parse.y
+ mkdir -p program
$(YACC) -v -d --output=program/program_parse.tab.c $<
program/lex.yy.c: program/program_lexer.l
+ mkdir -p program
$(LEX) --never-interactive --outfile=$@ $<
all-local:
- $(MAKE) -f Makefile.old
+ $(MAKE) -f $(srcdir)/Makefile.old
install-exec-local:
- $(MAKE) -f Makefile.old install
+ $(MAKE) -f $(srcdir)/Makefile.old install
clean-local:
- $(MAKE) -f Makefile.old clean
+ $(MAKE) -f $(srcdir)/Makefile.old clean
pkgconfigdir = $(libdir)/pkgconfig
diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c
index be7141a58..cf2d05337 100644
--- a/mesalib/src/mesa/drivers/common/meta.c
+++ b/mesalib/src/mesa/drivers/common/meta.c
@@ -181,6 +181,9 @@ struct save_state
struct gl_feedback Feedback;
#endif
+ /** MESA_META_MULTISAMPLE */
+ GLboolean MultisampleEnabled;
+
/** Miscellaneous (always disabled) */
GLboolean Lighting;
GLboolean RasterDiscard;
@@ -733,6 +736,12 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
}
#endif
+ if (state & MESA_META_MULTISAMPLE) {
+ save->MultisampleEnabled = ctx->Multisample.Enabled;
+ if (ctx->Multisample.Enabled)
+ _mesa_set_enable(ctx, GL_MULTISAMPLE, GL_FALSE);
+ }
+
/* misc */
{
save->Lighting = ctx->Light.Enabled;
@@ -1018,6 +1027,11 @@ _mesa_meta_end(struct gl_context *ctx)
}
#endif
+ if (state & MESA_META_MULTISAMPLE) {
+ if (ctx->Multisample.Enabled != save->MultisampleEnabled)
+ _mesa_set_enable(ctx, GL_MULTISAMPLE, save->MultisampleEnabled);
+ }
+
/* misc */
if (save->Lighting) {
_mesa_set_enable(ctx, GL_LIGHTING, GL_TRUE);
@@ -1902,7 +1916,8 @@ _mesa_meta_glsl_Clear(struct gl_context *ctx, GLbitfield buffers)
MESA_META_VERTEX |
MESA_META_VIEWPORT |
MESA_META_CLIP |
- MESA_META_CLAMP_FRAGMENT_COLOR);
+ MESA_META_CLAMP_FRAGMENT_COLOR |
+ MESA_META_MULTISAMPLE);
if (!(buffers & BUFFER_BITS_COLOR)) {
/* We'll use colormask to disable color writes. Otherwise,
@@ -2347,7 +2362,6 @@ _mesa_meta_DrawPixels(struct gl_context *ctx,
MESA_META_CLIP |
MESA_META_VERTEX |
MESA_META_VIEWPORT |
- MESA_META_CLAMP_FRAGMENT_COLOR |
metaExtraSave));
newTex = alloc_texture(tex, width, height, texIntFormat);
diff --git a/mesalib/src/mesa/drivers/common/meta.h b/mesalib/src/mesa/drivers/common/meta.h
index 7a80b1dde..d8dfb56f9 100644
--- a/mesalib/src/mesa/drivers/common/meta.h
+++ b/mesalib/src/mesa/drivers/common/meta.h
@@ -55,6 +55,7 @@
#define MESA_META_CONDITIONAL_RENDER 0x20000
#define MESA_META_CLIP 0x40000
#define MESA_META_SELECT_FEEDBACK 0x80000
+#define MESA_META_MULTISAMPLE 0x100000
/**\}*/
extern void
diff --git a/mesalib/src/mesa/main/api_validate.c b/mesalib/src/mesa/main/api_validate.c
index 631bceecf..cf6aaf0c6 100644
--- a/mesalib/src/mesa/main/api_validate.c
+++ b/mesalib/src/mesa/main/api_validate.c
@@ -272,7 +272,8 @@ _mesa_validate_DrawElements(struct gl_context *ctx,
GLenum mode, GLsizei count, GLenum type,
const GLvoid *indices, GLint basevertex)
{
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL(ctx, GL_FALSE);
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+ FLUSH_CURRENT(ctx, 0);
if (count <= 0) {
if (count < 0)
@@ -330,7 +331,8 @@ _mesa_validate_MultiDrawElements(struct gl_context *ctx,
{
unsigned i;
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL(ctx, GL_FALSE);
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+ FLUSH_CURRENT(ctx, 0);
for (i = 0; i < primcount; i++) {
if (count[i] <= 0) {
@@ -398,7 +400,8 @@ _mesa_validate_DrawRangeElements(struct gl_context *ctx, GLenum mode,
GLsizei count, GLenum type,
const GLvoid *indices, GLint basevertex)
{
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL(ctx, GL_FALSE);
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+ FLUSH_CURRENT(ctx, 0);
if (count <= 0) {
if (count < 0)
@@ -456,7 +459,8 @@ GLboolean
_mesa_validate_DrawArrays(struct gl_context *ctx,
GLenum mode, GLint start, GLsizei count)
{
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL(ctx, GL_FALSE);
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+ FLUSH_CURRENT(ctx, 0);
if (count <= 0) {
if (count < 0)
@@ -484,7 +488,8 @@ GLboolean
_mesa_validate_DrawArraysInstanced(struct gl_context *ctx, GLenum mode, GLint first,
GLsizei count, GLsizei numInstances)
{
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL(ctx, GL_FALSE);
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+ FLUSH_CURRENT(ctx, 0);
if (count <= 0) {
if (count < 0)
@@ -528,7 +533,8 @@ _mesa_validate_DrawElementsInstanced(struct gl_context *ctx,
const GLvoid *indices, GLsizei numInstances,
GLint basevertex)
{
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL(ctx, GL_FALSE);
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+ FLUSH_CURRENT(ctx, 0);
if (count <= 0) {
if (count < 0)
@@ -589,7 +595,8 @@ _mesa_validate_DrawTransformFeedback(struct gl_context *ctx,
GLenum mode,
struct gl_transform_feedback_object *obj)
{
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL(ctx, GL_FALSE);
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+ FLUSH_CURRENT(ctx, 0);
if (!_mesa_valid_prim_mode(ctx, mode, "glDrawTransformFeedback")) {
return GL_FALSE;