Commit graph

26245 commits

Author SHA1 Message Date
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
Ian Romanick
565a2a8f38 ARB prog parser: Add support for RGBA components to SWZ instruction in fp 2009-07-30 10:51:43 -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
Ian Romanick
17534ab88c ARB prog parser: Prevent NULL ptr deref for KIL instruction
The KIL instruction doesn't have a destination register, so
dereferencing dst in asm_instruction_ctor would cause a segfault.
2009-07-30 09:41:35 -07: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
Xiang, Haihao
3e2b6a2049 i965: Postpone ff_sync message in CLIP kernel on IGDNG
In addition, it guarantees ff_sync message is issued
2009-07-30 15:40:08 +08:00
Alex Deucher
0fdac3529c r600: fix mipmaps
redbook mipmap works
2009-07-30 03:31:37 -04:00
Eric Anholt
246729162c i915: Add support for EXT_stencil_two_side and ATI_separate_stencil.
Passes tests/stencil_twoside and glean/stencil2.
2009-07-29 21:25:39 -07:00
Ian Romanick
600710907c ARP prog parser: Implement the spec, not what makes sense 2009-07-29 21:07:41 -07:00
Eric Anholt
92b9aa1646 i915: Add ARB_point_sprite since we already expose NV_point_sprite.
It's all fallbacks anyway due to the DD_POINT_ATTEN fallback.
2009-07-29 20:56:14 -07:00
Ian Romanick
48183ca8b6 ARB prog parser: Get program limits from the context
Some debug code from the older stand-alone version of the assembler
was hanging around and needed to go.
2009-07-29 20:51:38 -07:00
Ian Romanick
cbe4133109 ARB prog lexer: attenuation is not just for vp 2009-07-29 20:42:28 -07:00
Ian Romanick
333bb4f291 ARB prog parser: Finish implementing fp state.depth.range 2009-07-29 20:41:48 -07:00
Ian Romanick
e511633985 ARB prog: Fix the order of swizzle application
The swizzle used to generate the "original" value from the value
stored in the parameter array happens before the swizzle specified in
the instruction.  This fixes problems seen in progs/vp/vp-tris with arl-*.txt.
2009-07-29 20:07:59 -07:00
Brian Paul
9d0b8d72d8 mesa: add new FRAG_ATTRIB_FACE and FRAG_ATTRIB_PNTC fragment program inputs
Previously, the FOGC attribute contained the fragment fog coord, front/back-
face flag and the gl_PointCoord.xy values.  Now each of those things are
separate fragment program attributes.  This simplifies quite a few things in
Mesa and gallium.

Need to test i965 driver and fix up point coord handling in the gallium/draw
module...
2009-07-29 20:07:41 -06:00
Brian Paul
b9889517f5 gallium: fix SSE shadow texture instructions
When sampling a 2D shadow map we need 3 texcoord components, not 2.
The third component (distance from light source) is compared against
the texture sample to return the result (visible vs. occluded).

Also, enable proper handling of TGSI_TEXTURE_SHADOW targets in Mesa->TGSI
translation.  There's a possibility for breakage in gallium drivers if
they fail to handle the TGSI_TEXTURE_SHADOW1D / TGSI_TEXTURE_SHADOW2D /
TGSI_TEXTURE_SHADOWRECT texture targets for TGSI_OPCODE_TEX/TXP instructions,
but that should be easy to fix.

With these changes, progs/demos/shadowtex.c renders properly again with
softpipe.
2009-07-29 16:33:58 -06:00