Commit Graph

24518 Commits

Author SHA1 Message Date
José Fonseca bb8f3090ba scons: Disable optimizations only for gcc-4.2
gcc-4.2's optimizer has a strange bug where it looses code from inner
loops in certain situations. For example, if the appearently innocent
looking code below is compiled with gcc-4.2 -S -O1, the inner loop's
code is missing from the outputed assembly.

   struct Size {
      unsigned width;
   };

   struct Command {
      unsigned length;
      struct Size sizes[32];
   };

   extern void emit_command(void *command, unsigned length);

   void
   create_surface( struct Size size, unsigned faces, unsigned levels)
   {
      struct Command cmd;
      unsigned face;
      unsigned level;

      cmd.length = faces*levels*sizeof(cmd.sizes[0]);

      for(face = 0; face < faces; ++face) {
	 for(level = 0; level < levels; ++level) {
	    cmd.sizes[face*levels + level] = size;
	    // This should generate a shrl statement, but the whole for body
	    // disappears in gcc-4.2 -O1/-O2/-O3!
	    size.width >>= 1;
	 }
      }

      emit(&cmd, sizeof cmd.length + cmd.length);
   }

Note that this is not specific to MinGW's gcc-4.2 crosscompiler (the
version typically found in debian/ubuntu's mingw32 packages). gcc-4.2 on
Linux also displays the same error. gcc-4.3 and above gets this
correctly though.

Updated MinGW debian packages with gcc-4.3 are available from
http://people.freedesktop.org/~jrfonseca/debian/pool/main/m/
2009-06-28 11:12:22 +01:00
José Fonseca 72ad039d19 scons: Use -Bsymbolic linker option.
This prevents the error

  relocation R_X86_64_PC32 against symbol `_gl_DispatchTSD' can not be used when making a shared object; recompile with -fPIC

when building on x86_64 architecture.
2009-06-28 10:54:23 +01:00
Brian Paul 418987ff05 docs: detect when too many varying vars are used 2009-06-26 16:54:44 -06:00
Brian Paul 21320b24c5 glsl: check number of varying variables against the limit
Link fails if too many varying vars.

(cherry picked from master, commit cc58fbcf2c)
2009-06-26 16:53:46 -06:00
Brian Paul 4181a107cb docs: fix typos, remove old text from relnotes file 2009-06-26 16:47:57 -06:00
Brian Paul 2a41df86a3 docs: bring over news updates from 7.4 branch 2009-06-26 16:46:21 -06:00
Brian Paul 318122b60a docs: bring in 7.4.3 and 7.4.4 release notes, news 2009-06-26 16:45:54 -06:00
Brian Paul dd585db687 docs: increase max varying vars to 16 2009-06-26 16:41:54 -06:00
Brian Paul f08bebfe24 mesa: raise MAX_VARYING (number of shader varying vars) to 16
16 is the limit for now because of various 32-bit bitfields.

(cherry picked from master, commit 4e762395ef)
2009-06-26 16:41:04 -06:00
Ian Romanick 2d86503471 intel / DRI2: Additional flush of fake front-buffer to real front-buffer
To maintain correctness, the server will copy the real front-buffer to
a newly allocated fake front-buffer in DRI2GetBuffersWithFormat.
However, if the DRI2GetBuffersWithFormat is triggered by glViewport,
this will copy stale data into the new buffer.  Fix this by flushing
the current fake front-buffer to the real front-buffer in
intel_viewport.

Fixes bug #22288.
2009-06-26 13:32:26 -07:00
Brian Paul 077a06c140 mesa: bump version to 7.5-rc4 2009-06-26 13:16:34 -06:00
Brian Paul 62ad606065 docs: document for/continue bug fix 2009-06-26 13:16:34 -06:00
Brian Paul 928e1ce47f cell: PIPE_CAP_TGSI_CONT_SUPPORTED query 2009-06-26 13:16:34 -06:00
Brian Paul af7fb892d8 softpipe: PIPE_CAP_TGSI_CONT_SUPPORTED query 2009-06-26 13:16:34 -06:00
Brian Paul f5dc352e5f gallium: added PIPE_CAP_TGSI_CONT_SUPPORTED 2009-06-26 13:16:34 -06:00
Brian Paul e80ecdf659 glsl: move/simplify error checking for 'return' statements 2009-06-26 13:16:34 -06:00
Brian Paul 8e6dd8bf79 glsl: overhaul 'return' statement handling
A new node type (SLANG_OPER_RETURN_INLINED) is used to denote 'return'
statements inside inlined functions which need special handling.

All glean glsl1 tests pass for EmitContReturn=FALSE and TRUE.
2009-06-26 13:16:34 -06:00
Brian Paul aa48becb82 glsl: predicate assignments according to __returnFlag
Fixes glean "function with early return (3)" case (when EmitContReturn=FALSE).
2009-06-26 13:16:34 -06:00
Brian Paul 16787c513b glsl: added slang_variable::is_global field 2009-06-26 13:16:34 -06:00
Brian Paul ac05996b81 glsl: silence a problem warning 2009-06-26 13:16:34 -06:00
Brian Paul 0efd25b502 glsl: code refactoring for return statements 2009-06-26 13:16:34 -06:00
Brian Paul 2ae297c318 glsl: fix assorted regressions related to early-return-removal 2009-06-26 13:16:34 -06:00
Brian Paul ddf64be258 glsl: comments, field reordering 2009-06-26 13:16:34 -06:00
Brian Paul f652f15e6d glsl: rework loop nesting code 2009-06-26 13:16:34 -06:00
Brian Paul dd453fa37c glsl: remove test for loop unrolling when we hit conditional cont/break
This is no longer needed since we added the new
_slang_loop_contains_continue_or_break() function/test.
2009-06-26 13:16:34 -06:00
Brian Paul 2f1c5c58b3 glsl: checkpoint: predicate __retVal = expr with __returnFlag
The glean "function with early return (1)" test passes now.
2009-06-26 13:16:34 -06:00
Brian Paul 65eaafee25 glsl: use new helper functions in _slang_gen_logical_and/or() 2009-06-26 13:16:33 -06:00
Brian Paul e139434d44 glsl: add comments 2009-06-26 13:16:33 -06:00
Brian Paul b04605d544 glsl: checkpoint: replace 'return' with __returnFlag=true;
Needed for "remove early returns" transformation.
2009-06-26 13:16:33 -06:00
Brian Paul 515513b409 glsl: fix up scoping for parent/children in slang_operation_copy()
This will need more testing, but no regressions seen so far.
2009-06-26 13:16:33 -06:00
Brian Paul 09313043e7 glsl: fix uninitialized var in _slang_gen_for_without_continue() 2009-06-26 13:16:33 -06:00
Brian Paul 5951ab311d glsl: added slang_operation_free_children() 2009-06-26 13:16:33 -06:00
Brian Paul e5b53c071b glsl: added slang_oper_num_children() helper 2009-06-26 13:16:33 -06:00
Brian Paul 3c6480ea42 glsl: check-point: declare _returnFlag 2009-06-26 13:16:33 -06:00
Brian Paul fc0896b50b glsl: added slang_operation_insert_child() 2009-06-26 13:16:33 -06:00
Brian Paul f4b1a69b7d glsl: use slang_generate_declaration() to consolidate some code 2009-06-26 13:16:33 -06:00
Brian Paul 454a717d94 glsl: remove obsolete comment 2009-06-26 13:16:33 -06:00
Brian Paul 02edc8da36 st/mesa: query PIPE_CAP_TGSI_CONT_SUPPORTED 2009-06-26 13:16:33 -06:00
Brian Paul 08025cd4a5 glsl: implement _slang_gen_while_without_continue() 2009-06-26 13:16:33 -06:00
Brian Paul 2102e301a7 glsl: fix a bug involving 'continue' in 'for' loops
Need to execute the for loop's increment code before we continue.
Add a slang_assemble_ctx::CurLoopOper field to keep track of the containing
loop and avoid the "cont if true" path in this situation.

Plus, assorted clean-ups.
2009-06-26 13:16:33 -06:00
Brian Paul 541594b044 glsl: added slang_oper_child_const() 2009-06-26 13:16:32 -06:00
Brian Paul 38ddbc5588 glsl: use _slang_loop_contains_continue_or_break() to check for unrolling
The previous test failed for nested loops.
2009-06-26 13:16:32 -06:00
Brian Paul 4dafac2b2f glsl: use new _slang_loop_contains_continue() helper function 2009-06-26 13:16:32 -06:00
Brian Paul aba93643be glsl: implement continue->break translation for do-while loops 2009-06-26 13:16:32 -06:00
Brian Paul 7e0eaca201 glsl: added slang_operation_literal_int/bool() helper functions 2009-06-26 13:16:32 -06:00
Brian Paul c1f74a6734 glsl: don't allocate 0-length children array in slang_operation_copy() 2009-06-26 13:16:32 -06:00
Brian Paul f38872473c glsl: remove debug code, misc clean-up 2009-06-26 13:16:32 -06:00
Brian Paul f66733bbee glsl: implement continue->break transformation for for-loops 2009-06-26 13:16:32 -06:00
Brian Paul c4fd947bee glsl: added slang_operation_add_children() and slang_oper_child() helpers 2009-06-26 13:16:32 -06:00
Brian Paul c20bb48d3a glsl: added slang_assemble_ctx::EmitContReturn field, init 2009-06-26 13:16:32 -06:00