aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-01-15 21:37:10 +0100
committermarha <marha@users.sourceforge.net>2014-01-15 21:37:10 +0100
commitb7f01cb1f6cfd1ec301f650a073436c91ec614aa (patch)
tree1dbf32344313ad7e5884e6686251cad398a231fa /mesalib/src/mesa/swrast
parent7b4b94b4449aec056c4c92f5cacc2f89a292a80e (diff)
parent1b0fcca503ae9cf2d462b60770f96c794dfbb27a (diff)
downloadvcxsrv-b7f01cb1f6cfd1ec301f650a073436c91ec614aa.tar.gz
vcxsrv-b7f01cb1f6cfd1ec301f650a073436c91ec614aa.tar.bz2
vcxsrv-b7f01cb1f6cfd1ec301f650a073436c91ec614aa.zip
Merge remote-tracking branch 'origin/released'
* origin/released: mesa xkeyboard-config xserver git update 15 jan 2014 randrproto libfontenc mesa xserver git update 10 Jan 2014 randsrproto fontconfig libX11 git update 6 Jan 2014 Conflicts: mesalib/src/glsl/builtin_functions.cpp mesalib/src/glsl/ir_builder.h xorg-server/Xext/xres.c xorg-server/dix/dispatch.c xorg-server/dix/dixfonts.c xorg-server/hw/xwin/wingc.c xorg-server/hw/xwin/winwindowswm.c xorg-server/include/gc.h xorg-server/os/access.c
Diffstat (limited to 'mesalib/src/mesa/swrast')
-rw-r--r--mesalib/src/mesa/swrast/s_context.c6
-rw-r--r--mesalib/src/mesa/swrast/s_texcombine.c14
-rw-r--r--mesalib/src/mesa/swrast/s_texfetch.c18
3 files changed, 34 insertions, 4 deletions
diff --git a/mesalib/src/mesa/swrast/s_context.c b/mesalib/src/mesa/swrast/s_context.c
index 8934088df..fdf9b370a 100644
--- a/mesalib/src/mesa/swrast/s_context.c
+++ b/mesalib/src/mesa/swrast/s_context.c
@@ -794,9 +794,9 @@ _swrast_CreateContext( struct gl_context *ctx )
swrast->PointSpan.facing = 0;
swrast->PointSpan.array = swrast->SpanArrays;
- init_program_native_limits(&ctx->Const.VertexProgram);
- init_program_native_limits(&ctx->Const.GeometryProgram);
- init_program_native_limits(&ctx->Const.FragmentProgram);
+ init_program_native_limits(&ctx->Const.Program[MESA_SHADER_VERTEX]);
+ init_program_native_limits(&ctx->Const.Program[MESA_SHADER_GEOMETRY]);
+ init_program_native_limits(&ctx->Const.Program[MESA_SHADER_FRAGMENT]);
ctx->swrast_context = swrast;
diff --git a/mesalib/src/mesa/swrast/s_texcombine.c b/mesalib/src/mesa/swrast/s_texcombine.c
index 7e07f4f8a..32d7c0944 100644
--- a/mesalib/src/mesa/swrast/s_texcombine.c
+++ b/mesalib/src/mesa/swrast/s_texcombine.c
@@ -602,6 +602,14 @@ _swrast_texture_span( struct gl_context *ctx, SWspan *span )
if (!swrast->TexelBuffer) {
#ifdef _OPENMP
const GLint maxThreads = omp_get_max_threads();
+
+ /* TexelBuffer memory allocation needs to be done in a critical section
+ * as this code runs in a parallel loop.
+ * When entering the section, first check if TexelBuffer has been
+ * initialized already by another thread while this thread was waiting.
+ */
+ #pragma omp critical
+ if (!swrast->TexelBuffer) {
#else
const GLint maxThreads = 1;
#endif
@@ -611,8 +619,12 @@ _swrast_texture_span( struct gl_context *ctx, SWspan *span )
* thread.
*/
swrast->TexelBuffer =
- malloc(ctx->Const.FragmentProgram.MaxTextureImageUnits * maxThreads *
+ malloc(ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits * maxThreads *
SWRAST_MAX_WIDTH * 4 * sizeof(GLfloat));
+#ifdef _OPENMP
+ } /* critical section */
+#endif
+
if (!swrast->TexelBuffer) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "texture_combine");
return;
diff --git a/mesalib/src/mesa/swrast/s_texfetch.c b/mesalib/src/mesa/swrast/s_texfetch.c
index 0196aede1..b886e6586 100644
--- a/mesalib/src/mesa/swrast/s_texfetch.c
+++ b/mesalib/src/mesa/swrast/s_texfetch.c
@@ -1286,6 +1286,24 @@ texfetch_funcs[] =
NULL,
NULL
},
+ {
+ MESA_FORMAT_ABGR2101010,
+ NULL,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_SIGNED_RG88,
+ NULL,
+ NULL,
+ NULL
+ },
+ {
+ MESA_FORMAT_SIGNED_RG1616,
+ NULL,
+ NULL,
+ NULL
+ },
};