summaryrefslogtreecommitdiff
path: root/src/mesa/main
AgeCommit message (Collapse)Author
2010-09-08glsl: add several EmitNo* options, and MaxUnrollIterationsLuca Barbieri
This increases the chance that GLSL programs will actually work. Note that continues and returns are not yet lowered, so linking will just fail if not supported. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-09-08glsl: make compiler options per-targetLuca Barbieri
This allows us to specify different options, especially useful for chips without unified shaders. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-09-08mesa: add PIPE_SHADER_* like constants and conversions to/from enums (v2)Luca Barbieri
Changes in v2: - No longer adds tessellation enums
2010-09-08mesa: Refactor parameter processing in set_combiner_(operand|source)Ian Romanick
The enum values were chosen to have sequential values for a reason. Use that to compact and simplify the code.
2010-09-08mesa: Fix handling of texenv operands for EXT vs ARB versionIan Romanick
GL_EXT_texture_env_combine has slightly more restrictive limits on the valid sources for some operands. This wasn't caught before because almost every driver in Mesa that supports the EXT version also supports the ARB version. Inspired by a patch posted the the mesa-dev mailing list by Andrew Randrianasulu.
2010-09-07mesa: Enable GL_MAX_VERTEX_ATTRIBS in ES2.Kenneth Graunke
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2010-09-07mesa: Set the base format of GL_ALPHA FBOs and teach swrast about it.Eric Anholt
Fixes assertion failures in fbo-alpha with a debug build of Mesa. Bug #29781.
2010-09-06mesa: Define C99's __func__ macro on MSVC.José Fonseca
2010-09-05mesa: don't expose unsupported GL_ARB_geometry_shader4 for nowLuca Barbieri
The new GLSL compiler doesn't support it. Advertising it prevents Unigine Heaven from working, since it attempts to use it.
2010-09-03mesa: fix up a commentBrian Paul
2010-09-02mesa: Fix printf-like warnings.Vinson Lee
2010-09-02mesa: fix some printf warnings with castsBrian Paul
2010-09-01mesa: Fix many printf-like warnings.Eric Anholt
Most of these are just typecasting to long to match the arg type. I don't really care too much about getting a GLsizei or whatever appropriate type in. However, there were a number of real bugs, like missing arguments or passing floats to integer format specifiers. My favorite: printflike("%s, argument") is missing an argument.
2010-09-01mesa: Add __printf__ attribute to printf-like functions to get warnings.Eric Anholt
2010-09-01mesa: fix out of bounds memory read in mipmap gen codeBrian Paul
Out of bounds reads could happen for reducing WxH to WxH/2 or WxH to W/2xH. Fixes fd.o bug 29918.
2010-09-01mesa: initialize dummy framebuffer and renderbuffer mutexesVladimir Vukicevic
See fd.o bug 29909. Signed-off-by: Brian Paul <brianp@vmware.com>
2010-08-30Fix inverted version checks in check_extra.Kenneth Graunke
Previously, if an attribute was enabled by either a specific GL version or an extension, the check would require -both- to be enabled. This bug was not discovered earlier because version checks are currently only ever used on their own. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2010-08-27mesa: move null ptr check (fdo bug 29843)Brian Paul
2010-08-27mesa: Use the format info to identify packed depth/stencil formats.Nick Bowler
Due to a misunderstanding of the Z24_X8 and X8_Z24 formats, the earlier patch created depth/stencil wrappers for them. This broke swrast. Use the format info instead, which only identifies Z24_S8 and S8_Z24 as packed depth/stencil. It also has the advantage of being nicer code. Signed-off-by: Nick Bowler <nbowler@draconx.ca> Signed-off-by: Brian Paul <brianp@vmware.com>
2010-08-27mesa: use atexit() handler to release GLSL compiler memoryBrian Paul
This releases a bunch of memory that was showing up as leaks with valgrind. If atexit() isn't widely supported we may need to add some #ifdef tests around the call.
2010-08-27mesa: free the fallback texture object in free_shared_state()Brian Paul
2010-08-27mesa: fix double-underscore namingBrian Paul
2010-08-26Fix typo in function name "shading_laguage_version".Kenneth Graunke
2010-08-26i965: Start building 965 FS backend.Eric Anholt
2010-08-26mesa: fix mixed-up function call nameBrian Paul
2010-08-26mesa: Identify packed depth/stencil buffers using the Format field.Nick Bowler
Intel sometimes uses packed depth/stencil buffers even when only a depth buffer or only a stencil buffer was requested. Common code currently uses the _BaseFormat field to determine whether a depth/stencil wrapper is necessary. But unless the user explicitly requested a packed depth/stencil buffer, the _BaseFormat field does not encode this information, and the required wrappers are not created. The problem was introduced by commit 45e76d2665b38b ("mesa: remove a bunch of gl_renderbuffer fields"), which killed off the _ActualFormat field upon which the decision to create a wrapper used to be made. This patch changes the logic to use the Format field instead, which is more like the old code. Fixes fdo bug 27590. Signed-off-by: Nick Bowler <nbowler@draconx.ca> Signed-off-by: Brian Paul <brianp@vmware.com>
2010-08-25mesa: Don't warn when the desired result of s3tc lib available occurs.Eric Anholt
2010-08-25Revert "mesa: Don't add 1 to GL_ACTIVE_UNIFORM_MAX_LENGTH."Eric Anholt
This reverts commit 001a7bfdfc8b3c8930d5ced21982dbdfb8cd35b3. I hadn't found the section of the spec clarifying that the old behavior was right. Reverting fixes the new version of the testcase, and the Humus demos that could no longer find their uniforms. Bug #29782 Bug #29783
2010-08-25glsl/mesa: fixes for MSVCAras Pranckevicius
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-08-24glsl: Set up uniform initializers by walking the shaders after linking.Eric Anholt
Previously, uniform initializers were handled by ir_to_mesa as it made its Parameters list. However, uniform values are global to all shaders, and the value set in one Parameters list wasn't propagated to the other gl_program->Parameters lists. By going back through the general Mesa uniform handling, we make sure that all gl_programs get updated values, and also successfully separate uniform initializer handling from ir_to_mesa gl_program generation. Fixes: glsl-uniform-initializer-5.
2010-08-24mesa: added isblank() for MSVCBrian Paul
2010-08-24mesa: Remove extraneous semicolon.Chia-I Wu
2010-08-24mesa: Add core.h.Chia-I Wu
core.h is the public header of core mesa. GLX, WGL, and GLSL are supposed to include this header file. It should be noted that headers included by core.h must not perform feature tests (#if FEATURE_xxx). Otherwise, we cannot, for example, mix a FEATURE_ES2 libmesagallium.a with a FEATURE_GL libglsl.a.
2010-08-23glsl2: Include imports.h to get snprintf wrapper for MSVCIan Romanick
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-08-23mesa: Fix msvc build of glsl.Aras Pranckevicius
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-08-23mesa: Don't add 1 to GL_ACTIVE_UNIFORM_MAX_LENGTH.Eric Anholt
Fixes: glsl-getactiveuniform-length.
2010-08-23mesa: Assorted fixes for es_generator.py on win32.Chia-I Wu
Fix mixed use of GL_APIENTRY and GLAPIENTRY. Parameter list of a function prototype should never be empty.
2010-08-22mesa: use driver hook for creating new renderbuffersBrian Paul
2010-08-20mesa: Fix GetUniformLocation while compiling display lists.Nick Bowler
This function was apparently missing from the display list dispatch table, causing the generic no-op function to be called instead. To make matters worse, the no-op function is indistinguishable from a successful call to GetUniformLocation. GL specifies that GetUniformLocation is executed immediately when compiling display lists. Fixes fdo bug 29622. Signed-off-by: Nick Bowler <nbowler@draconx.ca>
2010-08-20mesa: Decorate functions with GL_APIENTRY in es_generator.py.Chia-I Wu
Note that GLES headers use GL_APIENTRY, not GLAPIENTRY.
2010-08-20mesa: Include compiler.h for ASSERT.Chia-I Wu
mfeatures.h defines ASSERT_NO_FEATURE to ASSERT, which is defined in compiler.h. Header files using the macro should include compiler.h.
2010-08-19mesa: Silence uninitialized variable warnings in dummy_enum_func.Vinson Lee
2010-08-18mesa: Remove unnecessary heaaders from shaderapi.c.Vinson Lee
2010-08-18mesa: fpclassify is available on OpenSolaris.Vinson Lee
There is no explicit predefined macro to distinguish between OpenSolaris and Solaris. This patch assumes that the difference is in the compilers. OpenSolaris uses GCC and not the Sun Studio compiler. Assume that the availability of fpclassify is due to GCC. This patch was not tested on Solaris. It would break the build on Solaris with GCC if GCC on Solaris does not have fpclassify.
2010-08-18mesa: Free linked shaders when deleting the shader program.Eric Anholt
2010-08-16Merge branch 'glsl2'Ian Romanick
Conflicts: src/mesa/program/prog_optimize.c
2010-08-15mesa: Check that _XOPEN_SOURCE is defined before using it.Vinson Lee
2010-08-14mesa: Recent versions of MSVC define the single precision functions already.José Fonseca
2010-08-14mesa: atan2f and powf need two args.José Fonseca
2010-08-13Merge branch 'master' into glsl2Ian Romanick