aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-05-18 14:38:14 +0200
committermarha <marha@users.sourceforge.net>2014-05-18 14:38:14 +0200
commit55cf29d7f748b814a2b8eb016fbf15635d56aa53 (patch)
tree04d45a3c638e7397354fcd1df02d969c8ece058f /mesalib/src/mesa/main
parentae06feae7876db47ff0e1fde40cf4a324a412037 (diff)
downloadvcxsrv-55cf29d7f748b814a2b8eb016fbf15635d56aa53.tar.gz
vcxsrv-55cf29d7f748b814a2b8eb016fbf15635d56aa53.tar.bz2
vcxsrv-55cf29d7f748b814a2b8eb016fbf15635d56aa53.zip
plink fontconfig mesa xserver xkeyboard-config git update 18 May 2014
xserver commit 01e18af17f8dc91451fbd0902049045afd1cea7e xkeyboard-config commit 2bf80b0d9b36fd56acf1f196fb781f045351efaf fontconfig commit 58acd993cb13b58c61633174071ef42da3dcac85 mesa commit 5646319f25c7880b3706bb7590e24c84fd8de0fc plink revision 10192
Diffstat (limited to 'mesalib/src/mesa/main')
-rw-r--r--mesalib/src/mesa/main/arbprogram.c27
-rw-r--r--mesalib/src/mesa/main/context.c4
2 files changed, 28 insertions, 3 deletions
diff --git a/mesalib/src/mesa/main/arbprogram.c b/mesalib/src/mesa/main/arbprogram.c
index 247b49253..fe8cd6bbc 100644
--- a/mesalib/src/mesa/main/arbprogram.c
+++ b/mesalib/src/mesa/main/arbprogram.c
@@ -38,6 +38,7 @@
#include "main/arbprogram.h"
#include "program/arbprogparse.h"
#include "program/program.h"
+#include "program/prog_print.h"
/**
@@ -308,6 +309,7 @@ _mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
const GLvoid *string)
{
struct gl_program *base;
+ bool failed;
GET_CURRENT_CONTEXT(ctx);
FLUSH_VERTICES(ctx, _NEW_PROGRAM);
@@ -341,13 +343,36 @@ _mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
return;
}
- if (ctx->Program.ErrorPos == -1) {
+ failed = ctx->Program.ErrorPos != -1;
+
+ if (!failed) {
/* finally, give the program to the driver for translation/checking */
if (!ctx->Driver.ProgramStringNotify(ctx, target, base)) {
+ failed = true;
_mesa_error(ctx, GL_INVALID_OPERATION,
"glProgramStringARB(rejected by driver");
}
}
+
+ if (ctx->_Shader->Flags & GLSL_DUMP) {
+ const char *shader_type =
+ target == GL_FRAGMENT_PROGRAM_ARB ? "fragment" : "vertex";
+
+ fprintf(stderr, "ARB_%s_program source for program %d:\n",
+ shader_type, base->Id);
+ fprintf(stderr, "%s\n", (const char *) string);
+
+ if (failed) {
+ fprintf(stderr, "ARB_%s_program %d failed to compile.\n",
+ shader_type, base->Id);
+ } else {
+ fprintf(stderr, "Mesa IR for ARB_%s_program %d:\n",
+ shader_type, base->Id);
+ _mesa_print_program(base);
+ fprintf(stderr, "\n");
+ }
+ fflush(stderr);
+ }
}
diff --git a/mesalib/src/mesa/main/context.c b/mesalib/src/mesa/main/context.c
index 860ae8605..8eb426d59 100644
--- a/mesalib/src/mesa/main/context.c
+++ b/mesalib/src/mesa/main/context.c
@@ -1141,7 +1141,7 @@ _mesa_initialize_context(struct gl_context *ctx,
fail:
_mesa_reference_shared_state(ctx, &ctx->Shared, NULL);
free(ctx->BeginEnd);
- free(ctx->Exec);
+ free(ctx->OutsideBeginEnd);
free(ctx->Save);
return GL_FALSE;
}
@@ -1242,7 +1242,7 @@ _mesa_free_context_data( struct gl_context *ctx )
/* free dispatch tables */
free(ctx->BeginEnd);
- free(ctx->Exec);
+ free(ctx->OutsideBeginEnd);
free(ctx->Save);
/* Shared context state (display lists, textures, etc) */