summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* glsl: Throw an error when faced with a duplicated switch() case label.Eric Anholt2012-02-032-0/+27
| | | | | | | | | The error message I chose matches gcc's error. Fixes piglit switch-case-duplicated.vert. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Ian Romanick <[email protected]>
* glsl: Add other missing error location information for switch statements.Eric Anholt2012-02-031-0/+4
| | | | | | NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Ian Romanick <[email protected]>
* glsl: Add missing location info to case labels.Eric Anholt2012-02-031-0/+2
| | | | | | | | Otherwise, the upcoming error messages said the location was 0:0(0). NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Ian Romanick <[email protected]>
* glsl: Throw the required error when a case label is a non-constant.Eric Anholt2012-02-031-2/+14
| | | | | | | | | | | | It's not quite spelled out in the spec text, but the grammar indicates that only constant values are allowed as switch() case labels (and only constant values make sense, anyway). Fixes piglit glsl-1.30/compiler/switch-statement/switch-case-uniform-int.vert. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Ian Romanick <[email protected]>
* glsl: Save and restore the whole switch state for nesting.Eric Anholt2012-02-033-260/+255
| | | | | | | | | This stuffs them all in a struct for sanity. Fixes piglit glsl-1.30/execution/switch/fs-uniform-nested. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Ian Romanick <[email protected]>
* dri: Add Unigine Tropics as an app that requires the GLSL warn workaround.Eric Anholt2012-02-031-0/+3
| | | | | | | I wasn't seeing it be needed because of the previous bug. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eugeni Dodonov <[email protected]>
* dri: Fix typo in xml file that made all applications use the workaround.Eric Anholt2012-02-031-1/+1
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eugeni Dodonov <[email protected]>
* mesa: Fix the error message function names for glFlushMappedBufferRange().Eric Anholt2012-02-031-7/+7
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: Fix bad-enum/no-buffer error handling for buffer object functions.Eric Anholt2012-02-031-87/+39
| | | | | | | | | | | | | | | For all the extension entrypoints using the get_buffer() helper, they wanted the same error handling. In some cases, the error was doing the same error return whether target was a bad enum, or a user buffer wasn't bound. (Actually, GL_ARB_map_buffer_range doesn't specify the error for a zero buffer being bound for MapBufferRange, though it does for FlushMappedBufferRange. This appears to be an oversight). Fixes piglit GL_ARB_copy_buffer/negative-bound-zero. Reviewed-by: Brian Paul <[email protected]>
* glsl: move array_sizing_visitor class outside of link_intrastage_shaders()Brian Paul2012-02-021-16/+22
| | | | | | To silence warnings with gcc 4.4.x on Linux and llvm-g++ 4.2 on Mac. Reviewed-by: Kenneth Graunke <[email protected]>
* gallium/postprocess: move declarations before codeBrian Paul2012-02-021-2/+1
| | | | To fix MSVC build.
* gallium/postprocess: Just to be safe, reference all buffers from outsideLauri Kasanen2012-02-021-0/+10
| | | | | | | | | Even though it should be safe to use them for one frame, better be sure. Suggested by Michael Dänzer. NOTE: This is a candidate for the 8.0 stable branch. Signed-off-by: Lauri Kasanen <[email protected]>
* gallium/postprocess: Fix depth logicLauri Kasanen2012-02-024-11/+4
| | | | | | | | | This prevents a possible lapse of the depth buffer - the situation where the app and pp have different depth buffers. NOTE: This is a candidate for the 8.0 stable branch. Signed-off-by: Lauri Kasanen <[email protected]>
* glsl: Avoid ralloc_stealing a long-lived object to a short-lived parentCarl Worth2012-02-021-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 6ecee54a9aecc120cb68b02f7e14dcac86b9eca2 a call to talloc_reference was replaced with a call to talloc_steal. This was in preparation for moving to ralloc which doesn't support reference counting. The justification for talloc_steal within token_list_append in that commit is that the tokens are being copied already. But the copies are shallow, so this does not work. Fortunately, the lifetime of these tokens is easy to understand. A token list for "replacements" is created and stored in a hash table when a function-like macro is defined. This list will live until the macro is #undefed (if ever). Meanwhile, a shallow copy of the list is created when the macro is used and the list expanded. This copy is short-lived, so is unsuitable as a new parent. So we can just let the original, longer-lived owner continue to own the underlying objects and things will work. This fixes bug #45082: "ralloc.c:78: get_header: Assertion `info->canary == 0x5A1106' failed." when using a macro in GLSL https://bugs.freedesktop.org/show_bug.cgi?id=45082 Reviewed-by: Kenneth Graunke <[email protected]> NOTE: This is a candidate for stable release branches.
* glsl: Add glcpp tests for a macro used twiceCarl Worth2012-02-022-0/+33
| | | | | | | | | | | | | This test cases exposes a bug as described in this bug report: "ralloc.c:78: get_header: Assertion `info->canary == 0x5A1106' failed." when using a macro in GLSL https://bugs.freedesktop.org/show_bug.cgi?id=45082 Clearly, some memory is getting (incorrectly) freed on the first macro invocation, leading to problems with the second macro invocation. Reviewed-by: Kenneth Graunke <[email protected]>
* glcpp: Fix so that trailing punctuation does not prevent macro expansionCarl Worth2012-02-021-1/+9
| | | | | | | | | | | | | | | | | | | | The trick here is that flex always chooses the rule that matches the most text. So with a input text of "two:" which we want to be lexed as an IDENTIFIER token "two" followed by an OTHER token ":" the previous OTHER rule would match longer as a single token of "two:" which we don't want. We prevent this by forcing the OTHER pattern to never match any characters that appear in other constructs, (no letters, numbers, #, _, whitespace, nor any punctuation that appear in CPP operators). Fixes bug #44764: GLSL preprocessor doesn't replace defines ending with ":" https://bugs.freedesktop.org/show_bug.cgi?id=44764 Reviewed-by: Kenneth Graunke <[email protected]> NOTE: This is a candidate for stable release branches.
* glcpp: Add new test showing bug where a trailing ':' prevents macro expansionCarl Worth2012-02-022-0/+15
| | | | | | | | | | | This demonstrates a bug that was recently triggered in piglit. Here is the original bug report (containing a test case almost identical to this one): https://bugs.freedesktop.org/show_bug.cgi?id=44764 Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Fix copy-and-paste error in _mesa_pack_rgba_span_floatIan Romanick2012-02-021-3/+2
| | | | | | | | | | | GL_RG_INTEGER only has two components, not three. I'll be surprised if anyone ever tries to glReadPixels(..., GL_SHORT, GL_RG_INTEGER, ...). This was found by inspection. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Fix copy-and-paste bug in do_row_3DIan Romanick2012-02-021-3/+3
| | | | | | | | | | | | | Several of the half-float cases used 4 as the texel size when it should have been some smaller value. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43324 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43325
* mesa: Convert colors if span ChanType and renderbuffer data type don't matchIan Romanick2012-02-021-4/+15
| | | | | | | | | | | | This is a partial revert of f9874fe. It turns out that the types don't always match. Specifically, this can happen when doing glCopyPixels from a float FBO to a RGBA8 FBO. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45429 Reviewed-by: Brian Paul <[email protected]>
* mesa: Set the gl_array_object::ARBsemantics flag at the right timeIan Romanick2012-02-022-1/+10
| | | | | | | | | | | | | With 0963990 the flag was only set when Bind created the object. In all cases where ::ARBsemantics could be true, this path never happened. Instead, add a _Used flag to track whether a VAO has ever been bound. On the first Bind, set the _Used flag, and set the ARBsemantics flag to the correct value. NOTE: This is a candidate for release branches. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45423
* mesa: Add unpack_uint_z_row support for floating-point depth buffersIan Romanick2012-02-021-0/+32
| | | | | | | | | | | | | | | This is a hack, and it will result in incorrect rendering. However, it does eliminate spurious warnings in several piglit CopyPixels tests that involve floating-point depth buffers. The real solution is to add a zf field to SWspan to store float Z values. When a float depth buffer is involved, swrast should also populate the zf field. I'll consider this post-8.0 work. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Revert "Fix underlinking in libOSMesa since commit adefee5 "Always build ↵Brian Paul2012-02-021-2/+0
| | | | | | | shared glapi"" This reverts commit 4e5a8937d1a1bfb2a3bd067ed01e036728675fc2. ... to fix build with --enable-osmesa
* draw: Avoid NULL pointer dereference when binding NULL fragment shaders.José Fonseca2012-02-023-3/+3
| | | | | | | | Now that the draw module avoids flushing, it may flush precisely when binding a NULL shader, so care must be taken when restoring the original fragment shader. Reviewed-by: Brian Paul <[email protected]>
* mapi/glapi: Never use a generic no-op entry-point on Windows.José Fonseca2012-02-021-2/+6
| | | | | | | | | | When GLAPIENTRY is __stdcall (ie Windows), the stack is popped by the callee making the number/type of arguments significant, therefore using a generic no-op causes stack corruption for many entry-points. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Brian Paul <[email protected]>
* gallivm: Fix LLVM-2.7 build.ojab2012-02-021-4/+6
| | | | | Signed-off-by: José Fonseca <[email protected]> Tested-by: Vinson Lee <[email protected]>
* gallivm: Remove MSVC RT hack.José Fonseca2012-02-021-14/+0
| | | | | The hack never worked reliably, and docs/llvmpipe.html is quite clear on the requirement of matching CRT when building LLVM and Mesa already.
* mesa: fix maximum allowed proxy texture size conditionAnuj Phogat2012-02-011-11/+11
| | | | | | | | | | | | | | | | | | | | width, height parameter in glTexImage2D() includes: texture image width + 2 * border (if any). So when doing the texture size check in _mesa_test_proxy_teximage() width and height should not exceed maximum supported size for target texture type. i.e. 1 << (ctx->Const.MaxTextureLevels - 1) Texture border is anyway stripped out before it is given to intel or gallium drivers. This patch fixes Intel oglconform test case: max_values Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44970 Note: This is a candidate for mesa 8.0 branch. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* svga: fix a crash happening before setting fragment shaders.Zack Rusin2012-02-011-1/+2
| | | | | | | | | | | In certain situations API's will call pipe->clear which doesn't require fragment shader, but then we'd try to verify the pipeline and assume fragment shader was always set. This was leading to crash when API would just call simple clear's before anything else. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* st-api: fix typos, whitespace, line wrappingBrian Paul2012-02-011-6/+6
|
* vbo: fix node_attrsz[] usage in vbo_bind_vertex_list()Brian Paul2012-02-011-2/+2
| | | | | | | | | | | | | The node_attrsz[] array is initially copied from the node->attrsz[] array but some values get rewritten. Thereafter, we need to use the node_attrsz[] values. Fixes a bug when replaying a display list that uses generic vertex array[16] (at least). NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Ian Romanick <[email protected]>
* nv50: add assertions missed in earlier nv50 commitBrian Paul2012-02-012-0/+2
|
* build: Note that we don't support srcdir != builddirColin Walters2012-02-011-0/+4
| | | | Signed-off-by: Dave Airlie <[email protected]>
* nv50: use larger arrays to silence warnings and fix buffer overflowsBrian Paul2012-02-012-2/+2
| | | | | | | | | | | | | The warnings were: nv50_pc_regalloc.c: In function ‘pass_generate_phi_movs’: nv50_pc_regalloc.c:423:41: warning: array subscript is above array bounds codegen/nv50_ir_peephole.cpp: In member function ‘bool nv50_ir::MemoryOpt::replaceStFromSt(nv50_ir::Instruction*, nv50_ir::MemoryOpt::Record*)’: codegen/nv50_ir_peephole.cpp:1475:18: warning: array subscript is above array bounds codegen/nv50_ir_peephole.cpp:1475:18: warning: array subscript is above array bounds codegen/nv50_ir_peephole.cpp:1475:18: warning: array subscript is above array bounds codegen/nv50_ir_peephole.cpp:1475:18: warning: array subscript is above array bounds And add some assertions to catch this sooner in debug builds.
* mesa: reference shared state in glPushAttrib(GL_TEXTURE_BIT)Brian Paul2012-02-011-0/+13
| | | | | | | | | | | | This fixes a dangling texture object pointer bug hit via wglShareLists(). When we push the GL_TEXTURE_BIT state we may push references to the default texture objects which are owned by the gl_shared_state object. We don't want to accidentally delete that shared state while the attribute stack references shared objects. So keep a reference to it. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* mesa: use new _mesa_reference_shared_state() functionBrian Paul2012-02-013-38/+49
| | | | | | | | | This cleans up the reference counting of shared context state. The next patch will use this to fix an actual bug. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* mesa: remove stray comment in PopAttrib() codeBrian Paul2012-02-011-1/+0
|
* Revert "automake: src/mesa/drivers/osmesa"Matt Turner2012-01-317-103/+78
| | | | This reverts commit 275ac7e5c1fd6c1847a428192fe259e50690fced.
* Revert "automake: src/glsl and src/glsl/glcpp"Matt Turner2012-01-318-140/+174
| | | | This reverts commit 9947656168d09f9019600fccc42ca8e0de49b83a.
* Revert "src/glsl/glcpp: wire up glcpp-test to make check"Matt Turner2012-01-312-7/+1
| | | | This reverts commit 2bb9f9e1fda61fceb9284cbb4619d7e60e39f190.
* Revert "Make sure libGL.so links with libglsl"Matt Turner2012-01-312-3/+1
| | | | This reverts commit f53e7e981ef35ab64a084c8da6c67bd2d230fe33.
* Revert "glsl: Fix optimization tests after converting src/glsl to automake."Matt Turner2012-01-311-1/+0
| | | | This reverts commit ffe376d5a74dee837dc1a421de29ae551087630f.
* r600g: shorten expressions accessing family and chip_classMarek Olšák2012-01-313-19/+19
|
* r300g: don't use pipe_context::winsysMarek Olšák2012-01-311-6/+3
|
* r600g: remove unused variable num_dest_buffersMarek Olšák2012-01-313-5/+0
|
* r600g: use the new code for streamout flush as wellMarek Olšák2012-01-311-11/+6
|
* r600g: rename r600_reg::flush_flags -> sbu_flagsMarek Olšák2012-01-313-4/+4
| | | | There is no other use for that.
* r600g: fix computation of how many dwords is needed for a flush at the end of CSMarek Olšák2012-01-312-11/+4
|
* r600g: remove unused r600_reg::flush_maskMarek Olšák2012-01-313-1179/+1176
|
* r600g: remove more dead codeMarek Olšák2012-01-312-9/+0
|