Commit graph

7195 commits

Author SHA1 Message Date
José Fonseca
55f02ba364 util: Fix swizzles for SRGB formats.
Based on Marek Olšák's fix 8-bits-per-channel formats swizzles, with the
exception that the notation for several formats (the vector formats)
is actually reversed so they should be left alone.
2010-02-24 15:45:28 +00:00
José Fonseca
ba7ce0ccd4 util: Organize formats in groups. Add comments. 2010-02-24 15:45:28 +00:00
José Fonseca
b57d80da77 util: Allow '#' comments in u_format.csv. 2010-02-24 15:45:28 +00:00
José Fonseca
573a8002d5 util: Kill unused UTIL_FORMAT_LAYOUT_SCALAR. 2010-02-24 12:15:13 +00:00
José Fonseca
4e526b42b0 llvmpipe: Kill unused UTIL_FORMAT_LAYOUT_SCALAR. 2010-02-24 12:15:13 +00:00
José Fonseca
5dce9b252b util: Store more derived data in the the format description. 2010-02-24 12:15:13 +00:00
Brian Paul
402f54b0d1 gallivm: added clamp and int_to_float functions 2010-02-23 21:16:18 -07:00
Brian Paul
1eec90d660 llvmpipe: add lp_tile_image.c to sources 2010-02-23 21:14:48 -07:00
Brian Paul
5e321280c1 llvmpipe: whole image tile/untile functions 2010-02-23 21:14:48 -07:00
Brian Paul
cd25e436ef llvmpipe: remove Z16 format override hack 2010-02-23 18:57:18 -07:00
Brian Paul
0e7c22ff3c llvmpipe: Z16 format is not supported 2010-02-23 18:57:18 -07:00
Brian Paul
a84575cdc0 st/glx: improved depth/stencil format selection code
Actually ask the gallium screen what Z/stencil format is supported.
This will let us remove some hacks in the llvmpipe driver.
2010-02-23 18:57:18 -07:00
Brian Paul
f7830dc391 st/glx: added PIPE_FORMAT_Z24S8_UNORM code 2010-02-23 18:57:18 -07:00
Brian Paul
049b4c3405 llvmpipe: added assertions to verify that scene is empty 2010-02-23 18:57:18 -07:00
Brian Paul
c8aaa24f2d llvmpipe: added some assertions 2010-02-23 18:57:17 -07:00
Marek Olšák
232f6e1761 r300g: fix texture swizzling for the SRGB formats 2010-02-24 01:00:34 +01:00
Luca Barbieri
2f5beb4b53 pipebuffer: slab: if size < alignment, use alignment to find bucket
If the size is lower than the alignment, we must use the alignment to
select the bucket.

Otherwise, the selected bucket won't be able to satisfy our request
and will fail.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-02-23 19:50:24 +00:00
Luca Barbieri
c36b912e09 pipebuffer: fix inverted signalled checking
A return of 0 means the fence is signalled.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-02-23 19:50:24 +00:00
Luca Barbieri
9f4f87893b pipebuffer: avoid assert due to increasing a zeroed refcnt
The cache manager stores buffers with a reference count that dropped to 0.
pipe_reference asserts in this case on debug builds,
so use pipe_reference_init instead.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-02-23 19:50:24 +00:00
Chia-I Wu
58a72cd65e st/egl: Unify surface creation.
Add a new function egl_g3d_create_surface and use it to create window,
pixmap, buffer, and screen surfaces.
2010-02-23 22:42:41 +08:00
Vinson Lee
a0fe36a39b i965g: Add fallthrough comments in switch statement.
Silences warnings about missing break statements in static analysis.
2010-02-22 23:32:43 -08:00
Vinson Lee
6da07e45b3 draw: Remove dead code. 2010-02-22 23:23:57 -08:00
Marek Olšák
902ccfcb40 r300g: fix draw_elements for "start" != 0
Reported-by: Andre Maasikas <amaasikas@gmail.com>
2010-02-23 03:33:24 +01:00
José Fonseca
b330928549 svga: Upload user buffers only once. 2010-02-22 21:47:22 +00:00
José Fonseca
8ea7d8412c svga: Fix the guest offset of piecewise buffer DMAs.
It was being erroneously set equal to the host offset, but it should be
zero.
2010-02-22 21:47:19 +00:00
José Fonseca
066fd70639 svga: Emit a scalar rcp in shadow maps.
Small improvement in Lightsmark 2008.
2010-02-22 21:47:18 +00:00
José Fonseca
7384cdf651 svga: Don't emit zero writemasks.
This fixes a regression with Lightsmark, where more compact TGSI from Mesa
was causing a zero mask MOV to be emitted for shadow map compare, causing
problems in some backends.

Add a few more assertions to catch cases like this.
2010-02-22 21:47:15 +00:00
José Fonseca
28e80aa0b8 tgsi: Report an error when a destination has an empty writemask. 2010-02-22 21:47:07 +00:00
José Fonseca
d1a0225371 svga: Upload the dirty ranges instead of the whole buffer. 2010-02-22 21:46:42 +00:00
José Fonseca
2452921e5a svga: Break uploads of big buffers into smaller pieces.
Fixes crash in Homeworld2 which tries to create a 14MB buffer, because we
now avoid creating GMR buffers larger than 8MB to ensure progress given
we have only a 16MB pool.
2010-02-22 21:46:40 +00:00
José Fonseca
3a6e581f2f svga: Note ranges even when there is no hardware buffer around.
Not having a hardware buffer around doesn't change the fact that the
range is dirty and needs to be uploaded eventually.
2010-02-22 21:46:37 +00:00
José Fonseca
cf861335a4 svga: Further cleanup/comment svga buffer code.
Just cosmetic changes -- no behavior change.
2010-02-22 21:46:34 +00:00
José Fonseca
6390dbb373 svga: Temporarily create a sw vertex buf when failed to create a hw buf.
Many apps don't check the return of map buffer so it is better not to
fail.
2010-02-22 21:46:30 +00:00
José Fonseca
21480fb9e4 svga: Remove unused buffer download code.
Unnecessary now that we never destroy buffer storage.
2010-02-22 21:46:22 +00:00
José Fonseca
935929595c pipebuffer: Don't synchronize when checking for buffer overflows.
To avoid masking synchronization issues in debug builds.
2010-02-22 21:46:19 +00:00
José Fonseca
422167a9b0 svga: Prevent buffer overflow in buffer ranges.
Do this by extending the nearest range to cover the new range.

This fixes an access fault in Call of Duty which was doing many disjoint
glBufferSubData calls.
2010-02-22 21:46:09 +00:00
José Fonseca
12d5203bb3 svga: Fix PIPE_LOGICOP_INVERT.
Actually the current XOR implementation is an INVERT.

This fixes rectangle selection in Maya.
2010-02-22 21:46:00 +00:00
Brian Paul
2467354842 i965g: added missing texture cap queries 2010-02-22 08:14:14 -07:00
Brian Paul
98e2f6c38b i915g: added missing texture cap queries 2010-02-22 08:14:05 -07:00
Dave Airlie
b14548ea32 Revert "r300g: rebuild winsys/pipe buffer handling and add buffer map"
This reverts commit fff5be8e7b.

Probably went too soon with this, dileX reported OA not working for him
it works here fine, but the optimisations I wanted aren't working properly
yet so I'll fix that now.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-22 17:26:35 +10:00
Dave Airlie
fff5be8e7b r300g: rebuild winsys/pipe buffer handling and add buffer map
This creates a cleaner winsys and drop the simple screen stuff.

It makes r300g use pb_bufmgr structs and adds usage of the cached
bufmgr for vertex/index buffers.

It also avoids mapping too often.

I'm not 100% sure this is perfect but it won't find its own bugs.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-22 16:23:44 +10:00
Marek Olšák
233290f203 r3OOg: support rendering of more than 65535 vertices per draw call (almost)
The path for VAP_ALT_NUM_VERTICES is also in place (and tested)
but not enabled by default due to the missing support of this reg
in the upstream kernel.

Also, a non-zero BUFFER_BASE in the INDX_BUFFER packet3 hangs the machine.
Am I missing something? Because of this, only draw_arrays can render
more than 65535 vertices without the use of VAP_ALT_NUM_VERTICES.
2010-02-22 03:12:13 +01:00
Vinson Lee
c786df2caf i965g: Fix memory leak. 2010-02-21 15:15:52 -08:00
Vinson Lee
8ff6790afb r300g: Remove unnecessary header. 2010-02-21 14:26:53 -08:00
Marek Olšák
3c244dac47 r300g: precompute framebuffer register values 2010-02-21 14:24:13 +01:00
Marek Olšák
7a087e1d6f r300g: add all missing colorbuffer formats 2010-02-21 14:24:13 +01:00
Marek Olšák
5c14fd1743 r300g: make r300_translate_texformat private
Unlikely to increase performance from inlining.

And partially expose it through r300_is_sampler_format_supported.
2010-02-21 14:24:12 +01:00
Marek Olšák
2a30c268bd r300g: re-enable SRGB formats
Ouch.
2010-02-21 14:24:12 +01:00
Vinson Lee
d89de9c13f draw: Remove dead code. 2010-02-21 01:57:16 -08:00
Vinson Lee
3194197efd i965g: Remove dead code. 2010-02-21 01:30:35 -08:00