Commit graph

24721 commits

Author SHA1 Message Date
Corbin Simpson
30bca7a4e6 Merge commit 'nha/r300-compiler-gallium' 2009-08-02 16:56:52 -07:00
Alex Deucher
d07bf2b35c r600: handle state emit better
- move shader-related state with the rest of the shader setup/emit
- start to track dirty state better
2009-08-02 18:26:12 -04:00
vehemens
562ca49611 r600: Logic Operations Fix
fixes bug 23087
2009-08-02 18:03:58 -04:00
Alex Deucher
5e51903606 r600: fix regression in texenv
Emit shader consts with the shader program itself
2009-08-02 13:29:18 -04:00
Nicolai Hähnle
b1700b03af r300: Fix a regression on non-KMS
The regression was introduced by 9a1c336253

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-08-02 16:24:52 +02:00
Alex Deucher
86ac0ae0b0 r600: fix rectangle textures
It might be better to add an instruction to normalize the
coordinates for rectanglular textures as there are some limitations
to wrap modes on unnormalized tex coords.

fixes texrect
2009-08-01 20:55:43 -04:00
Nicolai Hähnle
9a1c336253 r300: Fix corner-case of KIL on R300
R300 hardware (but _not_ R500) hardware requires an enabled texture unit
if KIL is used in fragment programs. We now work around the CS checker
correctly when enabling such a fake texture unit.

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-08-01 19:00:55 +02:00
Nicolai Hähnle
3d21e3d3a2 r300: Fix Z buffer re-emit after window resize
We used to not always correctly re-emit the Z buffer size in all cases,
in particular the clear path, and invalidated state was not always picked
up correctly.

This fixes a bug where the kernel CS checker correctly complains about
a Z buffer that is too small.

Note that this bug was probably only visible with ridiculously high
framerates, i.e. glxgears.

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-08-01 17:16:50 +02:00
Patrice Mandin
fc3d564dae mesa st: Use POT texture for draw pixels operations if NPOT texture is not supported 2009-08-01 11:15:18 +02:00
Patrice Mandin
c1785c19ca mesa st: Move logbase2 function to util/u_math.h 2009-08-01 11:03:30 +02:00
Roland Scheidegger
801c3fcbca radeon: fix r100/r200 compressed texture stride
This almost fixes compressed mipmapped textures on r200, though some small
mip levels are still broken.
Leave r300 compressed texture stride as is though afaik it's different
to pre-radeon-rewrite too. Also do the fixup for rs600 uncompressed row stride
at same place.
2009-07-31 23:24:44 +02:00
Roland Scheidegger
2730ee75c7 radeon: s/r300/radeon in shared code error message 2009-07-31 23:20:22 +02:00
Pauli Nieminen
55bc8b1390 radeon: Cliprects has to be updated before doing anything with clip rectangles
Reported to fix corruption while dragging an active window by John Bridgman.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-31 21:44:31 +02:00
Pauli Nieminen
1fcb321e2f radeon: Remove unused variable from context.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-31 21:39:25 +02:00
Alex Deucher
95b64c0ed2 r600: make sure bos are valid before usign that 2009-07-31 15:11:41 -04:00
Alex Deucher
80d80d23b6 r600: fix reloc setup
re-use the same reloc index for bos that are referenced
multiple times.

Fixes rain demo.
2009-07-31 14:52:56 -04:00
Alex Deucher
177c33c481 r600: remove unused offset_mod stuff
this is a step in migrating to the common cs code
2009-07-31 14:52:56 -04:00
Alex Deucher
19ce428c8a r600: ensure we have enough room for full state emit
full state is roughly 4000 dwords, but will vary depending
on the rendering.
Also fix some warnings.
2009-07-31 14:52:56 -04:00
Alex Deucher
54a1641923 r600: unify state emit into one function 2009-07-31 14:52:55 -04:00
Alex Deucher
be1687a892 r600: re-arrange state setup and emit so they are not mixed 2009-07-31 14:52:55 -04:00
Michal Krol
cb90c43676 Rename TGSI LOOP instruction to better match theri usage.
The LOOP/ENDLOOP pair is renamed to BGNFOR/ENDFOR as its behaviour
is similar to a C language for-loop.

The BGNLOOP2/ENDLOOP2 pair is renamed to BGNLOOP/ENDLOOP as now
there is no name collision.
2009-07-31 18:14:40 +02:00
Chia-Wu
dc516d6e2a egl: Silence warnings on x86-64.
Casting an unsigned int to or from a pointer directly gives warnings on
x86-64.  Add wrappers to silence the warnings.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-07-31 07:30:13 -06:00
Alex Deucher
826f1f9c6f r600: get updated pending age from cs ioctl
REQUIRES AN UPDATED DRM
2009-07-31 02:13:43 -04:00
Alex Deucher
643d52a394 r600: warning fixes 2009-07-30 21:32:36 -04:00
Alex Deucher
e0e51ab1ea r600: split primitive draw into a separate function 2009-07-30 21:32:36 -04:00
Nicolai Hähnle
d0c398a8e2 r300g: Use radeon compiler for fragment programs
This is entirely untested on R500, and needs more testing on R300.
2009-07-30 23:55:12 +02:00
Nicolai Hähnle
fbc88a7334 r300g: Remove extraneous printf
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-30 23:45:18 +02:00
Nicolai Hähnle
188f8c6792 r300g: Use r300compiler for vertex shaders 2009-07-30 23:45:18 +02:00
Nicolai Hähnle
cab62aa28f r300/compiler: Remove inst_offset from r500_fragment_program_code
The field is not used, and in any case it would be more interesting to
manipulate from *outside* the compiler if we ever wanted to load several
fragment programs at the same time or something.

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-07-30 23:42:59 +02:00
Ian Romanick
9f26f801dc progs/vp: Correct the PARAM array sizes in arl-*.txt 2009-07-30 14:08:53 -07:00
Chia-I Wu
27fb3ff858 softpipe: Mark texture dirty when unmapped.
When a texutre transfer is mapped for writing, mark the texture dirty
when unmapped.  This was done in surface creation, and this commit moves
it to happen in texture unmapping.

This fixes subtex test in progs/tests/.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-07-30 10:42:46 -06:00
Brian Paul
9c936403de mesa: re-enable _mesa_source_buffer_exists() call
Somehow this code wound up inside a comment a while back.
2009-07-30 10:04:42 -06:00
Brian Paul
4406f79402 mesa: get_current_tex_unit() helper function 2009-07-30 09:59:52 -06:00
Brian Paul
25be043940 mesa: refactor glGetTexImage error checking code 2009-07-30 09:50:36 -06:00
Brian Paul
783a93a2c3 tests: glGetTexImage() test 2009-07-30 09:46:57 -06:00
Brian Paul
c156eeb682 mesa: simplify _mesa_select_tex_image() 2009-07-30 09:24:01 -06:00
Brian Paul
9c9a9abd7b mesa: simplify _mesa_set_tex_image() 2009-07-30 09:10:26 -06:00
Brian Paul
1e355a0cb3 Merge branch 'mesa_7_5_branch' 2009-07-30 09:03:43 -06:00
Brian Paul
35e3449ad7 mesa: move misplaced return statement
Fixes regression from commit 7d93f817c9
2009-07-30 09:02:36 -06:00
Brian Paul
288299ae12 Merge branch 'mesa_7_5_branch' 2009-07-30 08:24:10 -06:00
Brian Paul
7d93f817c9 mesa: add missing return after catching program error 2009-07-30 08:23:26 -06:00
Brian Paul
e87320b5e0 Merge branch 'mesa_7_5_branch' 2009-07-30 08:22:57 -06:00
Brian Paul
aefaeba54a docs: document new i915/945 extensions 2009-07-30 08:22:26 -06:00
Thomas Hellstrom
98ba6cfb4c mesa st: Change the preferred internal format for some RGB formats.
For GL_RGB5, GL_RGB4 and GL_R3_G3_B2, prefer
PIPE_FORMAT_R5G6B5_UNORM over PIPE_FORMAT_A1R5G5B5_UNORM, since hardware
is more likely to support the previous format for rendering.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2009-07-30 12:43:35 +02:00
Thomas Hellstrom
f583745519 mesa st: Report unsupported render-to-texture formats.
If a texture image is bound to a framebuffer for render-to-texture, but
the hardware doesn't support rendering to its internal format,
report the framebuffer as incomplete with FRAMEBUFFER_UNSUPPORTED.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
2009-07-30 12:43:35 +02:00
Michal Krol
6c70285e33 tgsi: Add proper constraints to sanity. 2009-07-30 11:39:06 +02:00
Michal Krol
cf8907018e tgsi: Declare a LOOP register.
The only valid usage for LOOP/ENDLOOP instructions
is LOOP[0] as a destination register.
The only valid usage for the remaining instructions
is LOOP[0].x as an indirect register.
2009-07-30 10:34:06 +02:00
Michal Krol
65fb2c52f9 tgsi: Fix number operands for LOOP/ENDLOOP. 2009-07-30 10:33:18 +02:00
Michal Krol
1e9d3ad4e1 vbo: Fix build on windows. 2009-07-30 10:31:57 +02:00
Michal Krol
b724dd28e2 tgsi: Document LOOP/ENDLOOP instruction operation. 2009-07-30 10:14:17 +02:00