Commit Graph

43155 Commits

Author SHA1 Message Date
Daniel Vetter 9070879a79 i915g: streamline derived state updates of the driver pipeline
Flushing the batch/hw backend doesn't invalidate the derived state.
So kill the unnecessary function calls and add an assert in
emit_hardware_state for paranoia.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-03-10 22:47:48 +01:00
Daniel Vetter b0dd74aaf7 i915g: don't validate a NULL vbo
With the new clear code this is possible (if the app call glClear
before drawing the first primitive).

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-03-10 22:47:47 +01:00
Brian Paul 7dcf019af2 gallium/util: new polygon stipple utility helper
The polygon stipple fallback does not have to be implemented in the
draw module (it doesn't need window coords, etc).  Drivers can use
this utility and avoid sw vertex fallbacks if pstipple is enabled.
Note: this is WIP and not used by any driver yet.
2011-03-10 09:44:32 -07:00
Brian Paul 0eab3a8a97 glsl: silence warning in printf() with a cast 2011-03-10 09:29:00 -07:00
Brian Paul 76a43c5fba glx: fix null pointer deref in __glXGenerateError()
The gc var would be NULL if called from line 238.  Instead, get
the opcode from __glXSetupForCommand(dpy) as done in other places.
And remove the unused gc parameter.

Fixes a bug reported by "John Doe" on 3/9/2011.

NOTE: This is a candidate for the 7.10 branch.
2011-03-10 08:50:52 -07:00
Thomas Hellstrom 6d4e337f38 gallium/svga: Only upload parts of vertexarrays that are actually used
Make sure we only upload parts of vertex arrays that are actually used
by a draw command.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-03-10 14:30:50 +01:00
Dave Airlie 9b7f377635 r600: don't close fd on failed load
This fd gets passed in from outside, closing it causes the X.org server
to crap out when the driver doesn't identify the chipset.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-03-10 12:01:43 +10:00
Eric Anholt f6ca4a304b intel: Don't complain when getparam fails due to a missing param.
This is an expected behavior when we're testing for the presence of
new kernel features.
2011-03-09 12:54:47 -08:00
Chris Wilson ea004a3aed i965: Pack the tracked state atoms into separate arrays for prepare/emit.
Improves performance of a hacked-up scissor-many (to reuse a small set
of scissors instead of blowing out the cache, and then to run 100x
more iterations so it actually took some time) by 3.6% +/- 1.2% (n=10)
2011-03-09 10:18:29 -08:00
Christoph Bumiller caaa7fdd6f nv50: add back initialization of redefine_user_buffer
Got lost in f80c03e187.
2011-03-09 17:26:33 +01:00
Christian König bb4f2a0f35 r600g: remove some now unneeded code from r600_bc_vtx_build 2011-03-09 14:49:03 +01:00
Christian König 2ed56d3170 r600g: R700+ can do more than 8 tex and vtx clause in one CF inst
Reviewed-by: Henri Verbeet <hverbeet@gmail.com>
2011-03-09 14:49:03 +01:00
Christian König 8dc1dfc9f0 r600g: split R600 and R700 CF generation for VTX and TEX
Reviewed-by: Henri Verbeet <hverbeet@gmail.com>
2011-03-09 14:49:03 +01:00
José Fonseca 8308272291 svga: Add a new winsys entry point to query the hw version. 2011-03-09 13:34:21 +00:00
José Fonseca d5249b7d89 util: Use PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE in pipe_buffer_write. 2011-03-09 11:17:45 +00:00
Keith Whitwell 05efcee46e util: add ensure_sanity checks, fix a bug
Add ensure_sanity checks.
Fix a bug which caused us to misplace entries adding to a full cache.
2011-03-09 11:17:14 +00:00
Keith Whitwell 20962bf547 util: improve cache collision behaviour
Add linear probing on collisions.

Expand entry array by a fixed scale (currently 2) to help avoid
collisions.

Use a LRU approach to ensure that the number of entries stored in the
cache doesn't exceed the requested size.
2011-03-09 11:16:53 +00:00
Alex Corscadden d00cbf46cd util: Add remove to util_cache
I need to be able to remove entries from util_cache caches.  This change
enables that functionality.
2011-03-09 11:16:49 +00:00
Alex Corscadden eb2e8167fa util: Allow util_draw_texquad to draw quads with non-integer coordinates. 2011-03-09 11:16:49 +00:00
José Fonseca 0ffd603e17 wgl: Force framebuffer validation on glViewport. 2011-03-09 09:58:35 +00:00
Thomas Hellstrom 52e598d200 gallium/svga: Don't replace user vertex buffer with uploaded copy
Do that later on when we set up the hwtnl state instead.
This addresses a problem when we drop the uploaded copy due to a vb
size change, it will remain referenced in svga->curr.vb[], and the
new contents of the vb will never be uploaded.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-03-09 08:49:33 +01:00
Vinson Lee c0d3fb4b6c scons: Fix immediate Python exceptions with SCons on SunOS.
The build still fails.
2011-03-08 17:59:57 -08:00
Vinson Lee 67f61199c2 st/python: Add timeout parameter to fence_finish.
This is a follow-up to commit b39bccbd4e.

Fixes Linux SCons build.
2011-03-08 16:18:16 -08:00
Marek Olšák ac8821ffe2 r300g: handle timeout parameter in fence_finish 2011-03-08 23:52:37 +01:00
Marek Olšák b39bccbd4e gallium: add timeout parameter to fence_finish
This is a follow-up to the ARB_sync patch for st/mesa and completes
the ARB_sync implementation.
2011-03-08 23:52:37 +01:00
Marek Olšák 5257a6dbc6 st/mesa: implement ARB_sync
The ServerWaitSync implementation matches Intel's driver.

The extension is advertised when pipe_screen::fence_finish is set.
2011-03-08 23:52:37 +01:00
Marek Olšák 5ef807c036 r300g: add LATC support 2011-03-08 23:52:37 +01:00
Marek Olšák b0ec461954 st/mesa: cleanup checking for signed compressed formats in generate_mipmaps 2011-03-08 23:52:37 +01:00
Marek Olšák 384845f335 st/mesa: add LATC and 3DC support
softpipe passes all tests.
2011-03-08 23:52:37 +01:00
Marek Olšák 23f92c20d7 gallium/util: add LATC support
Again, a lot of code is shared with RGTC.

The layout is UTIL_FORMAT_LAYOUT_RGTC, because LATC is just swizzled RGTC.
2011-03-08 23:52:37 +01:00
Marek Olšák 69f16accd0 mesa: add ATI_texture_compression_3dc
LUMINANCE_ALPHA_LATC2 = LUMINANCE_ALPHA_3DC, so this is easy.

Note that there is no specification for 3DC, just a few white papers
from ATI.
2011-03-08 23:52:37 +01:00
Marek Olšák 7d16e2c0cd mesa: add EXT_texture_compression_latc
The encoding/decoding algorithms are shared with RGTC.
Thanks to some magic with the base format, the RGTC texstore functions work
for LATC too.

swrast passes the related piglit tests besides two things:
- The alpha channel is wrong (it's always 1), however the incorrect alpha
  channel makes some other tests fail too, so I guess it's unrelated to LATC.
- Signed LATC fetches aren't correct yet (signed values are clamped to [0,1]),
  however RGTC has the same problem.

Further testing (with other of my patches) shows that hardware drivers
and softpipe work.

BTW, ETQW uses this extension.
2011-03-08 23:52:37 +01:00
Thomas Hellstrom 12fa91b675 st/mesa: Fix an incorrect user vertex buffer reference
st->user_vb[attr] was always pointing to the same user vb, regardless
of the value of attr. Together with reverting the temporary workaround
for bug 34378, and a fix in the svga driver, this fixes googleearth on svga.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2011-03-08 22:15:50 +01:00
Marek Olšák ef58598c1c vbo: mark vertex arrays as dirty when re-binding
This fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=34378
2011-03-08 22:14:47 +01:00
Marek Olšák ff8baec5bc r300/compiler: remove unused variables 2011-03-08 22:13:29 +01:00
Ian Romanick bdb6a6ef83 glsl: Use insert_before for lists instead of open coding it 2011-03-08 11:47:25 -08:00
Ian Romanick 60f898a90e linker: Add imported functions to the linked IR
Fixes piglit test glsl-function-chain16 and bugzilla #34203.

NOTE: This is a candidate for stable release branches.
2011-03-08 11:47:25 -08:00
Ian Romanick 8bbfbb14ee glsl: Add several function / call related validations
The signature list in a function must contain only ir_function_signature nodes.

The target of an ir_call must be an ir_function_signature.

These were added while trying to debug Mesa bugzilla #34203.
2011-03-08 11:47:25 -08:00
Ian Romanick 2df56b002d glsl: Function signatures cannot have NULL return type
The return type can be void, and this is the case where a `_ret_val'
variable should not be declared.
2011-03-08 11:47:25 -08:00
Christian König 719f07e45a r600g: set start instance correctly 2011-03-08 16:57:47 +01:00
Brian Paul 4a802738b0 swrast: flip the conditionals in shadow_compare4() for readability 2011-03-08 08:31:43 -07:00
Philip Taylor d9f584e663 swrast: add coord clamping, fix comparisons for shadow testing
This fixes https://bugs.freedesktop.org/show_bug.cgi?id=31159 for swrast
and piglit depth-tex-compare.

NOTE: This is a candidate for the 7.10 branch.

Signed-off-by: Brian Paul <brianp@vmware.com>
2011-03-08 08:31:43 -07:00
Brian Paul 9181a75c4d docs: added Depth format cube textures to GL3.txt list 2011-03-08 08:31:42 -07:00
Marek Olšák 5650a719f0 r300g: decide whether a flush should be asynchronous when calling it
Thread offloading is not sometimes desirable, e.g. when mapping a buffer.
2011-03-08 08:23:29 +01:00
Marek Olšák 6051f26b78 r300g: use pipelined transfers for RGTC textures 2011-03-08 08:17:12 +01:00
Marek Olšák 4dfcf3c4fe r300/compiler: fix equal and notequal shadow compare functions 2011-03-08 07:36:40 +01:00
Marek Olšák 94818d4c6a r300/compiler: detect constants harder 2011-03-08 06:54:14 +01:00
Marek Olšák 4f38261179 r300/compiler: improve the detection of constants for constant folding
Now the expression V==0 generates one instruction instead of two.
2011-03-08 06:37:50 +01:00
Marek Olšák eb1acd1613 r300/compiler: saturate Z before the shadow comparison
This fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=31159

NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-03-08 05:13:45 +01:00
Brian Paul 2c1ef65a04 llvmpipe: clamp texcoords in lp_build_sample_compare()
See previous commit for more info.

NOTE: This is a candidate for the 7.10 branch.
2011-03-07 18:59:42 -07:00