summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* glcpp: Fix attempts to expand recursive macros infinitely (bug #32835).Carl Worth2011-04-171-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 095-recursive-define test case was triggering infinite recursion with the following test case: #define A(a, b) B(a, b) #define C A(0, C) C Here's what was happening: 1. "C" was pushed onto the active list to expand the C node 2. While expanding the "0" argument, the active list would be emptied by the code at the end of _glcpp_parser_expand_token_list 3. When expanding the "C" argument, the active list was now empty, so lather, rinse, repeat. We fix this by adjusting the final popping at the end of _glcpp_parser_expand_token_list to never pop more nodes then this particular invocation had pushed itself. This is as simple as saving the original state of the active list, and then interrupting the popping when we reach this same state. With this fix, all of the glcpp-test tests now pass. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32835 Signed-off-by: Carl Worth <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-and-tested-by: Kenneth Graunke <[email protected]>
* r600g: use some loops.Dave Airlie2011-04-172-29/+24
| | | | | | | unrolling loops is for Gentoo users, and I really want to put something else inside these loops later. Signed-off-by: Dave Airlie <[email protected]>
* r600g: consolidate the same piece of cut-n-paste code into a function.Dave Airlie2011-04-173-42/+21
| | | | Signed-off-by: Dave Airlie <[email protected]>
* gallium: include u_format.h for util_format_is_supportedMarcin Slusarz2011-04-176-0/+6
| | | | | | | | | | | | Without it gcc complains: nv50_screen.c: In function ‘nv50_screen_is_format_supported’: nv50_screen.c:48: warning: implicit declaration of function ‘util_format_is_supported’ and handles it wrongly - util_format_is_supported returns boolean, which is typedef'ed to uchar, but function without prototype is assumed to return int. For me nv50_screen_is_format_supported was returning true for float formats without --enable-texture-float...
* nvc0: work around what looks like a code prefetch bugChristoph Bumiller2011-04-171-1/+4
| | | | | | | Sounds very unlikely, but I don't have a better explanation at the moment. The GPU throws page faults at the first page after the code buffer quite frequently on startup, and traces don't show us overflowing.
* nv50,nvc0: add new texture and render target formatsChristoph Bumiller2011-04-172-7/+177
|
* nv50,nvc0: fix normalized RG16 and RGBA32 texture format entriesChristoph Bumiller2011-04-172-6/+6
|
* nvc0: fix viewport rectangle calculationChristoph Bumiller2011-04-171-5/+7
|
* prog_optimize: Add simplify CMP optimization passTom Stellard2011-04-161-0/+78
| | | | | | | This pass coverts CMP T0, T1 T2 T0 -> MOV T0, T2 when the CMP instruction is the first instruction to write to register T0. This pass is useful for hardware that requires a lot of lowering passes that generate many CMP instructions.
* prog_optimize: get_src_arg_mask() respect writemask for more opcodesTom Stellard2011-04-161-0/+11
| | | | Reviewed-by: Eric Anholt <[email protected]>
* r300/compiler: Fix incorrect presubtract conversionTom Stellard2011-04-161-0/+24
| | | | | | | ADD instructions with constant swizzles can't be converted to presubtract operations. NOTE: This is a candidate for the 7.9 and 7.10 branches.
* mesa: provide more info for glCompressedTexImage() errorsCarl-Philip Haensch2011-04-161-8/+26
| | | | Signed-off-by: Brian Paul <[email protected]>
* mesa: move error check code in compressedteximage()Brian Paul2011-04-161-2/+2
| | | | This was mistakenly inside the #if FEATURE_ES block.
* docs: Reapply some of Marek's typo fixes.José Fonseca2011-04-161-2/+2
| | | | There were some typos too.
* gallium/docs: Improve min_index/max_index description.José Fonseca2011-04-161-8/+17
|
* docs: Undo Marek typo fixes to original text.José Fonseca2011-04-161-3/+3
| | | | Not really typos.
* translate: s/varient/variant/Brian Paul2011-04-151-44/+44
|
* vbo: init prim[] array with memset()Brian Paul2011-04-151-6/+2
| | | | This fixes a Coverity warning about uninitialized data.
* vega: move ureg_destroy(ureg) after last use of ureg varBrian Paul2011-04-151-1/+2
|
* st/mesa: simplify a bit of the previous patchBrian Paul2011-04-151-5/+8
| | | | Grrr, this was supposed to go in the previous commit.
* st/mesa: add handling for 'PIPE_FORMAT_B8G8R8X8_UNORM' in st_fast_readpixelsPierre-Eric Pelloux-Prayer2011-04-151-10/+20
| | | | | | With minor edits by Brian Paul. Signed-off-by: Brian Paul <[email protected]>
* Revert "r300/compiler: Don't try to convert RGB to Alpha in full instructions"Marek Olšák2011-04-151-2/+1
| | | | | | This reverts commit cd2857fae16e1352f39b37f611797e66619d3fe5. It breaks Unigine Heaven.
* docs: update relnotes-7.11Marek Olšák2011-04-151-3/+13
| | | | | I made a glxinfo diff between 7.10 and master and added missing items and also sorted the list.
* docs: update GL3 statusMarek Olšák2011-04-151-3/+3
|
* gallium: add and use generic function for querying patented format support (v2)Marek Olšák2011-04-1510-41/+78
| | | | v2: Unsigned floats are allowed regardless of the configure switch.
* configure.ac: add an enable switch for float textures (v2)Marek Olšák2011-04-151-0/+15
| | | | | | | | | | | So --enable-texture-float it is. Hardware drivers (including the Gallium ones) should use #ifdef TEXTURE_FLOAT_ENABLED to hide any code that may expose floating-point renderbuffers via any interface, public or private. v2: Print a warning when using --enable-texture-float.
* docs: add patents.txtMarek Olšák2011-04-151-0/+31
| | | | Thanks to José Fonseca for writing this.
* r300g: enable A/L/LA/I float render targetsMarek Olšák2011-04-151-14/+14
|
* st/mesa: convert Mesa float formats to GalliumMarek Olšák2011-04-152-0/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: Author: Marek Olšák <[email protected]> st/mesa: require RGBA16F and RGBA32F to be renderable st/mesa: fix L32F and L16F format translation st/mesa: also convert the R/RG float formats commit 49a9948b6a81b7d813304d081139d98e95ba5d1a Author: Luca Barbieri <[email protected]> Date: Fri Aug 20 10:36:17 2010 +0200 mesa/st: enable ARB_texture_float if supported formats allow it commit 7383632f7b6f9021b65f4973b7e7c99f0e8ce9b2 Author: Luca Barbieri <[email protected]> Date: Tue Aug 24 21:00:46 2010 +0200 mesa/st: support ARB_texture_float internal formats commit 7c362cc06982586c2d29fac55f6bcc4bcd1550b5 Author: Luca Barbieri <[email protected]> Date: Tue Aug 24 21:00:33 2010 +0200 mesa/st: convert L/A/I floating point formats
* gallium: add A/L/LA/I floating point formatsLuca Barbieri2011-04-152-0/+17
|
* mesa: finish up ARB_texture_floatMarek Olšák2011-04-155-5/+46
| | | | | | | | | | | | | | | Squashed commit of the following: Author: Marek Olšák <[email protected]> mesa: handle floating-point formats in _mesa_base_fbo_format mesa: add ARB/ATI_texture_float, remove MESAX_texture_float commit 123bb110852739dffadcc81ad80b005b1c4f586d Author: Luca Barbieri <[email protected]> Date: Wed Aug 25 01:35:42 2010 +0200 mesa: compute floatMode for FBOs and return it on RGBA_FLOAT_MODE
* mesa: add R/RG floating-point formatsMarek Olšák2011-04-156-4/+208
|
* mesa: fix L16F and L32F format propertiesMarek Olšák2011-04-151-2/+2
|
* Add expected file for 095-recursive-define test case.Carl Worth2011-04-141-0/+4
| | | | | | | | | | It's clear enough that the current segmentation fault isn't what we want. And it's also very easy to know what we do want here, (just check with any functional C preprocessor such as "gcc -E"). Add the desired output as an expected file so that the test suite gives useful output, (showing the omitted output and the segfault), rather than just reporting "No such file" for the expected file.
* glcpp: Simplify calling convention of parser's active_list functionsCarl Worth2011-04-141-38/+38
| | | | | | | | | | | | These were all written as generic list functions, (accepting and returning a list to act upon). But they were only ever used with parser->active as the list. By simply accepting the parser itself, these functions can update parser->active and now return nothing at all. This makes the code a bit more compact. And hopefully the code is no less readable since the functions are also now renamed to have "_parser_active" in the name for better correlation with nearby tests of the parser->active field.
* glcpp: Add --valgrind option to the glcpp-test utilityCarl Worth2011-04-141-16/+46
| | | | | | | | | | | The common case for this test suite is to quickly test that everything returns the correct results. In this case, the second run of the test suite under valgrind was just annoying, (and the user would often interrupt it). Now, do what is wanted in the common case by default (just run the test suite), and require a run with "glcpp-test --valgrind" in order to test with valgrind.
* Add an expected file for 084-unbalanced-parenthesesCarl Worth2011-04-141-0/+2
| | | | | | | | | | | | The expected file here captures the current behavior of glcpp (which is to generate an obscure "syntax error, unexpected $end" diagnostic for this case). It would certainly be better for glcpp to generate a nicer diagnostic, (such as "missing closing parenthesis in function-like macro definition" or so), but the current behavior is at least correct, and expected. So we can make the test suite more useful by marking the current behavior as expected.
* Add an expected file for 094-divide-by-zero-short-circuitCarl Worth2011-04-142-0/+26
| | | | | | | | | | | The expected file here captures the current behavior of glcpp (which is to generate a division-by-zero error) for this case. It's easy to argue that it should be short-circuiting the evaluation and not generating the diagnostic (which happens to be what gcc does). But it doesn't seem like we should force this behavior on our pre-processor, (and, as always, the GLSL specification of the pre-processor is too vague on this point).
* Add an expected file for 093-divide-by-zeroCarl Worth2011-04-141-0/+4
| | | | | | This test is behaving just fine already---it's generating an informative diagnostic, ("error: division by 0 in preprocessor directive"), so adding this in the expected file makes things pass.
* mesa/st: Avoid spurious transfers when creating fbo textures without image data.José Fonseca2011-04-141-1/+6
| | | | | | | | | We could actually try to do an early return both for gallium textures and malloc memory textures, but I'm not sure exactly which situations stImage->pt is NULL, and whether texImage->Data == NULL would be acceptible or not. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: add support for GL_RGBA + GL_UNSIGNED_INT_8_8_8_8 in st_fast_readpixelspepp2011-04-141-1/+20
| | | | Signed-off-by: Brian Paul <[email protected]>
* mesa: Expose ATI_draw_buffers.Eric Anholt2011-04-131-0/+1
| | | | | | | | | | | | This is the same as ARB_draw_buffers (which derived from it), except for s/ARB/ATI/. The glapi bits were already in place, and what was missing was just the ARB_fp part. The new Humble Bundle game "trine" tries to use this extension without checking that it's exposed, which this works around. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36182 Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add support for OPTION ATI_draw_buffers to ARB_fp.Eric Anholt2011-04-131-0/+10
| | | | | | Tested by piglit ati_draw_buffers-arbfp. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add support for the ARB_fragment_program part of ARB_draw_buffers.Eric Anholt2011-04-132-0/+30
| | | | | | | | Fixes fbo-drawbuffers-arbfp. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34321 Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965/fs: Constant-fold immediates in src0 of SEL instructions.Eric Anholt2011-04-134-0/+16
| | | | | | | | | | | This is like what we do for add/mul, but we have to invert the predicate to choose the other source instead. This removes 5 extra moves of constants in nexuiz shaders. No statistically significant performance difference on my Sandybridge laptop (n=5). Reviewed-by: Ian Romanick <[email protected]>
* i965/fs: Constant-fold immediates in src0 of CMP instructions.Eric Anholt2011-04-133-0/+45
| | | | | | | This is like what we do with add/mul, but we also have to flip the conditional test. Reviewed-by: Ian Romanick <[email protected]>
* glsl: Perform type checking on "^^" operands.Eric Anholt2011-04-131-3/+10
| | | | | | | | | | | We were letting any old operand through, which generally resulted in assertion failures later. Fixes array-logical-xor.vert. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: When we've emitted a semantic error for ==, return a bool constant.Eric Anholt2011-04-131-3/+7
| | | | | | | | | | | This prevents later errors (including an assertion failure) from cascading the failure. Fixes invalid-equality-04.vert. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=33303 Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* glsl: Semantically check the RHS of `||' even when short-circuiting.Eric Anholt2011-04-131-6/+5
| | | | | | | | | | | We just do the AST-to-HIR processing, and only push the instructions if needed in the constant false case. Fixes glslparsertest/glsl2/logic-02.frag Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Semantically check the RHS of `&&' even when short-circuiting.Eric Anholt2011-04-131-6/+6
| | | | | | | | | | | We just do the AST-to-HIR processing, and only push the instructions if needed in the constant true case. Fixes glslparsertest/glsl2/logic-01.frag Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Ian Romanick <[email protected]>