Commit Graph

19901 Commits

Author SHA1 Message Date
José Fonseca f2de2d5f37 util: Increase OutputDebugStringA to 4k.
According to http://unixwiz.net/techtips/outputdebugstring.html that's
how big the buffer is.

The 512bytes limitation is in kernel mode.
2009-07-01 19:10:50 +01:00
José Fonseca e2a8ef4430 mesa: Unbind depth/stencil surface from pipe_framebuffer when none is attached. 2009-07-01 19:10:49 +01:00
Keith Whitwell 6c913411d3 st/wgl: dummy implementation of wgl swapinterval extension
Required as some applications
retrieve and call these functions regardless of the fact that we
don't advertise the extension and further more the results of
wglGetProcAddress are NULL.
2009-07-01 17:37:15 +01:00
Zack Rusin 1c04731b87 gallium: fix the front face semantics
mesa allocates both frontface and pointcoord registers within the fog
coordinate register, by using swizzling. to make it cleaner and easier
for drivers we want each of them in its own register. so when doing
compilation from the mesa IR to tgsi allocate new registers for both
and add new semantics to the respective declarations.
2009-07-01 10:45:55 -04:00
José Fonseca e8c4663c11 wgl: Optimize wglGetProcAddress.
Do linear search only if prefix matches.
2009-07-01 10:03:59 +01:00
Eric Anholt c72261f2a8 i915: Fix assertion failure on remapping a non-BO-backed VBO.
Failure to set the obj->Pointer back to null tripped up the assertion.
Bug #22428.
(cherry picked from commit 57a06d3a48)
2009-06-30 13:29:37 -07:00
Keith Whitwell e5cb11adda mesa/vbo: fix compile and replay of nodes ending in a FALLBACK
Where vbo save nodes are terminated with a call to DO_FALLBACK(), as in
the case of a recursive CallList which is itself within a Begin/End pair,
there two problems:
1) The display list node's primitive information was incorrect, stating
the cut-off prim had zero vertices
2) On replay, we would get confused by a primitive that started in a
node, but was terminated by individual opcodes.

This change fixes the first problem by correctly terminating the last
primitive on fallback, and the second by forcing the display list to
use the Loopback path, converting all nodes into immediate-mode rendering.

The loopback fix is a performance hit, but avoiding this would require
a fairly large rework of this code.
2009-06-30 19:59:38 +01:00
Keith Whitwell 6dfb89e4a0 mesa: remove whitespace 2009-06-30 16:14:05 +01:00
Keith Whitwell cea259f039 mesa: remove dead constant pointsize code from ffvertex_prog.c 2009-06-30 16:13:58 +01:00
Keith Whitwell 79047cc1dd mesa: remove dead vertex fog code from ffvertex_prog.c 2009-06-30 16:13:53 +01:00
Keith Whitwell f6c8ca06f6 mesa: fix material inputs in ffvertex_prog.c
Varying material inputs were not being picked up from the same slots
where the VBO code is currently placing them (GENERIC0 and above).
Most often they were just being ignored.
2009-06-30 16:13:22 +01:00
Arthur HUILLET 4c31632817 mesa: fix transform_points_3d_no_rot using undefined values in %xmm0
Signed-off-by: Arthur HUILLET <arthur.huillet@free.fr>
2009-06-30 08:43:23 -06:00
Kristof Ralovich fa5b0364f9 glx: plug a leak
Swrast was missing a free for the culmination of driConcatConfigs.

Use free(), not _mesa_free() since we shouldn't be calling any Mesa
functions from the GLX code.  driConcatConfigs() should probably use
regular malloc/free to be consistant but the Mesa functions just wrap
the libc functions anyway.
2009-06-30 08:43:22 -06:00
Brian Paul 52f895df51 glx: fix null pointer dereference segfault (bug 22546) 2009-06-30 08:43:22 -06:00
José Fonseca 6e09c1fd08 mesa: Set FLUSH_EXPLICIT_BIT flags when calling FlushMappedBufferRange.
As prescribed by ARB_map_buffer_range.
2009-06-30 15:33:53 +01:00
José Fonseca 18a6f0f1a7 util: Set PIPE_BUFFER_USAGE_FLUSH_EXPLICIT when calling buffer_flush_mapped_range. 2009-06-30 15:33:53 +01:00
José Fonseca 4ffe2844a4 gallium: New PIPE_BUFFER_USAGE_FLUSH_EXPLICIT flag for buffer_flush_mapped_range.
When a buffer was mapped for write and no explicit flush range was provided
the existing semantics were that the whole buffer would be flushed, mostly
for backwards compatability with non map-buffer-range aware code.

However if the buffer was mapped/unmapped with nothing really written --
something that often happens with the vbo -- we were unnecessarily assuming
that the whole buffer was written.

The new PIPE_BUFFER_USAGE_FLUSH_EXPLICIT flag (based from ARB_map_buffer_range
's GL_MAP_FLUSH_EXPLICIT_BIT flag) allows to clearly distinguish the
legacy usage from the nothing written usage.
2009-06-30 15:33:53 +01:00
Brian Paul 4e43126a59 intel: added null ptr check
This fixes a segfault seen with piglit's fdo20701 test.
2009-06-29 15:26:28 -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 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 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