aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src')
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c2
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_math.h6
-rw-r--r--mesalib/src/glsl/ir.h4
-rw-r--r--mesalib/src/glsl/lower_instructions.cpp4
-rw-r--r--mesalib/src/mapi/glapi/gen/Makefile.am52
-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
9 files changed, 76 insertions, 46 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c b/mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c
index 82474cd7b..2ff1af70a 100644
--- a/mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c
+++ b/mesalib/src/gallium/auxiliary/util/u_gen_mipmap.c
@@ -1556,6 +1556,7 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
cso_save_geometry_shader(ctx->cso);
cso_save_viewport(ctx->cso);
cso_save_vertex_elements(ctx->cso);
+ cso_save_vertex_buffers(ctx->cso);
/* bind our state */
cso_set_blend(ctx->cso, &ctx->blend);
@@ -1679,4 +1680,5 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
cso_restore_viewport(ctx->cso);
cso_restore_vertex_elements(ctx->cso);
cso_restore_stream_outputs(ctx->cso);
+ cso_restore_vertex_buffers(ctx->cso);
}
diff --git a/mesalib/src/gallium/auxiliary/util/u_math.h b/mesalib/src/gallium/auxiliary/util/u_math.h
index 724b136b5..f35c35ffe 100644
--- a/mesalib/src/gallium/auxiliary/util/u_math.h
+++ b/mesalib/src/gallium/auxiliary/util/u_math.h
@@ -382,7 +382,7 @@ util_is_double_inf_or_nan(double x)
{
union di tmp;
tmp.d = x;
- return (tmp.ui & 0x7ff0000000000000) == 0x7ff0000000000000;
+ return (tmp.ui & 0x7ff0000000000000ULL) == 0x7ff0000000000000ULL;
}
@@ -391,7 +391,7 @@ util_is_double_nan(double x)
{
union di tmp;
tmp.d = x;
- return (tmp.ui & 0x7fffffffffffffff) > 0x7ff0000000000000;
+ return (tmp.ui & 0x7fffffffffffffffULL) > 0x7ff0000000000000ULL;
}
@@ -400,7 +400,7 @@ util_double_inf_sign(double x)
{
union di tmp;
tmp.d = x;
- if ((tmp.ui & 0x7fffffffffffffff) != 0x7ff0000000000000) {
+ if ((tmp.ui & 0x7fffffffffffffffULL) != 0x7ff0000000000000ULL) {
return 0;
}
diff --git a/mesalib/src/glsl/ir.h b/mesalib/src/glsl/ir.h
index 505d2e74b..b54e2f2e0 100644
--- a/mesalib/src/glsl/ir.h
+++ b/mesalib/src/glsl/ir.h
@@ -1245,7 +1245,6 @@ public:
{
this->ir_type = ir_type_loop_jump;
this->mode = mode;
- this->loop = loop;
}
virtual ir_loop_jump *clone(void *mem_ctx, struct hash_table *) const;
@@ -1269,9 +1268,6 @@ public:
/** Mode selector for the jump instruction. */
enum jump_mode mode;
-private:
- /** Loop containing this break instruction. */
- ir_loop *loop;
};
/**
diff --git a/mesalib/src/glsl/lower_instructions.cpp b/mesalib/src/glsl/lower_instructions.cpp
index d79eb0a7f..a8ef7654e 100644
--- a/mesalib/src/glsl/lower_instructions.cpp
+++ b/mesalib/src/glsl/lower_instructions.cpp
@@ -50,7 +50,7 @@
*
* DIV_TO_MUL_RCP and INT_DIV_TO_MUL_RCP:
* --------------------------------------
- * Breaks an ir_unop_div expression down to op0 * (rcp(op1)).
+ * Breaks an ir_binop_div expression down to op0 * (rcp(op1)).
*
* Many GPUs don't have a divide instruction (945 and 965 included),
* but they do have an RCP instruction to compute an approximate
@@ -74,7 +74,7 @@
*
* MOD_TO_FRACT:
* -------------
- * Breaks an ir_unop_mod expression down to (op1 * fract(op0 / op1))
+ * Breaks an ir_binop_mod expression down to (op1 * fract(op0 / op1))
*
* Many GPUs don't have a MOD instruction (945 and 965 included), and
* if we have to break it down like this anyway, it gives an
diff --git a/mesalib/src/mapi/glapi/gen/Makefile.am b/mesalib/src/mapi/glapi/gen/Makefile.am
index d0d0a7ba0..df3e82d89 100644
--- a/mesalib/src/mapi/glapi/gen/Makefile.am
+++ b/mesalib/src/mapi/glapi/gen/Makefile.am
@@ -159,82 +159,88 @@ $(MESA_GLAPI_DIR)/glapi_mapi_tmp.h: $(MESA_MAPI_DIR)/mapi_abi.py $(COMMON_ES)
--printer glapi --mode lib gl_and_es_API.xml > $@
$(MESA_GLAPI_DIR)/glprocs.h: gl_procs.py $(COMMON)
- $(PYTHON_GEN) $< > $@
+ $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml > $@
$(MESA_GLAPI_DIR)/glapitemp.h: gl_apitemp.py $(COMMON)
- $(PYTHON_GEN) $< > $@
+ $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml > $@
$(MESA_GLAPI_DIR)/glapitable.h: gl_table.py $(COMMON)
- $(PYTHON_GEN) $< > $@
+ $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml > $@
$(MESA_GLAPI_DIR)/glapi_gentable.c: gl_gentable.py $(COMMON)
- $(PYTHON_GEN) $< > $@
+ $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml > $@
######################################################################
$(MESA_GLAPI_DIR)/glapi_x86.S: gl_x86_asm.py $(COMMON)
- $(PYTHON_GEN) $< > $@
+ $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml > $@
$(MESA_GLAPI_DIR)/glapi_x86-64.S: gl_x86-64_asm.py $(COMMON)
- $(PYTHON_GEN) $< > $@
+ $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml > $@
$(MESA_GLAPI_DIR)/glapi_sparc.S: gl_SPARC_asm.py $(COMMON)
- $(PYTHON_GEN) $< > $@
+ $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml > $@
######################################################################
$(MESA_DIR)/main/enums.c: gl_enums.py $(COMMON_ES)
- $(PYTHON_GEN) $< -f gl_and_es_API.xml > $@
+ $(PYTHON_GEN) $< -f $(srcdir)/gl_and_es_API.xml > $@
$(MESA_DIR)/main/dispatch.h: gl_table.py $(COMMON)
- $(PYTHON_GEN) $< -m remap_table > $@
+ $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m remap_table > $@
$(MESA_DIR)/main/remap_helper.h: remap_helper.py $(COMMON)
- $(PYTHON_GEN) $< > $@
+ $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml > $@
######################################################################
$(MESA_GLX_DIR)/indirect.c: glX_proto_send.py $(COMMON_GLX)
- $(PYTHON_GEN) $< -m proto | $(INDENT) $(INDENT_FLAGS) > $@
+ $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m proto \
+ | $(INDENT) $(INDENT_FLAGS) > $@
$(MESA_GLX_DIR)/indirect.h: glX_proto_send.py $(COMMON_GLX)
- $(PYTHON_GEN) $< -m init_h > $@
+ $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m init_h > $@
$(MESA_GLX_DIR)/indirect_init.c: glX_proto_send.py $(COMMON_GLX)
- $(PYTHON_GEN) $< -m init_c > $@
+ $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m init_c > $@
$(MESA_GLX_DIR)/indirect_size.h $(XORG_GLX_DIR)/indirect_size.h: glX_proto_size.py $(COMMON_GLX)
- $(PYTHON_GEN) $< -m size_h --only-set -h _INDIRECT_SIZE_H_ \
+ $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m size_h --only-set \
+ -h _INDIRECT_SIZE_H_ \
| $(INDENT) $(INDENT_FLAGS) > $@
$(MESA_GLX_DIR)/indirect_size.c: glX_proto_size.py $(COMMON_GLX)
- $(PYTHON_GEN) $< -m size_c --only-set \
+ $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m size_c --only-set \
| $(INDENT) $(INDENT_FLAGS) > $@
######################################################################
$(XORG_GLX_DIR)/indirect_dispatch.c: glX_proto_recv.py $(COMMON_GLX)
- $(PYTHON_GEN) $< -m dispatch_c > $@
+ $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m dispatch_c > $@
$(XORG_GLX_DIR)/indirect_dispatch_swap.c: glX_proto_recv.py $(COMMON_GLX)
- $(PYTHON_GEN) $< -m dispatch_c -s > $@
+ $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m dispatch_c -s > $@
$(XORG_GLX_DIR)/indirect_dispatch.h: glX_proto_recv.py gl_and_glX_API.xml $(COMMON_GLX)
- $(PYTHON_GEN) $< -m dispatch_h -f gl_and_glX_API.xml -s > $@
+ $(PYTHON_GEN) $< -m dispatch_h -f $(srcdir)/gl_and_glX_API.xml -s > $@
$(XORG_GLX_DIR)/indirect_size_get.h: glX_proto_size.py $(COMMON_GLX)
- $(PYTHON_GEN) $< -m size_h --only-get -h '_INDIRECT_SIZE_GET_H_' \
+ $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m size_h \
+ --only-get -h '_INDIRECT_SIZE_GET_H_' \
| $(INDENT) $(INDENT_FLAGS) > $@
$(XORG_GLX_DIR)/indirect_size_get.c: glX_proto_size.py $(COMMON_GLX)
- $(PYTHON_GEN) $< -m size_c | $(INDENT) $(INDENT_FLAGS) > $@
+ $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m size_c \
+ | $(INDENT) $(INDENT_FLAGS) > $@
$(XORG_GLX_DIR)/indirect_reqsize.h: glX_proto_size.py $(COMMON_GLX)
- $(PYTHON_GEN) $< -m reqsize_h --only-get -h '_INDIRECT_SIZE_GET_H_' \
+ $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m reqsize_h \
+ --only-get -h '_INDIRECT_SIZE_GET_H_' \
| $(INDENT) $(INDENT_FLAGS) -l200 > $@
$(XORG_GLX_DIR)/indirect_reqsize.c: glX_proto_size.py $(COMMON_GLX)
- $(PYTHON_GEN) $< -m reqsize_c | $(INDENT) $(INDENT_FLAGS) > $@
+ $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m reqsize_c \
+ | $(INDENT) $(INDENT_FLAGS) > $@
$(XORG_GLX_DIR)/indirect_table.c: glX_server_table.py gl_and_glX_API.xml $(COMMON_GLX)
- $(PYTHON_GEN) $< -f gl_and_glX_API.xml > $@
+ $(PYTHON_GEN) $< -f $(srcdir)/gl_and_glX_API.xml > $@
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;