Commit Graph

39392 Commits

Author SHA1 Message Date
Tilman Sauerbeck 1bcdc504d1 gallium/docs: The RET opcode may appear anywhere in a subroutine.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-21 21:59:57 +02:00
Eric Anholt dd9a88f4dd i965: Track the windowizer's dispatch for kill pixel, promoted, and OQ
Looks like the problem was we weren't passing the depth to the render
target as expected, so the chip would wedge.  Fixes GPU hang in
occlusion-query-discard.

Bug #30097
2010-09-21 12:29:57 -07:00
Eric Anholt 4a0bc4716d i965: Also enable CC statistics when doing OQs.
This is required by the spec, so respect that.
2010-09-21 12:29:57 -07:00
Eric Anholt 23c507f135 i965: Share the KIL_NV implementation between glsl and non-glsl. 2010-09-21 12:29:57 -07:00
Jerome Glisse 6048be8969 r600g: directly allocate bo for user buffer
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-21 14:37:38 -04:00
Eric Anholt b5bb215629 glsl: Add definition of gl_TextureMatrix inverse/transpose builtins.
Fixes glsl2/builtin-texturematrix.
Bug #30196.
2010-09-21 10:09:46 -07:00
José Fonseca b556bb7c44 llvmpipe: When failing free fs shader too. 2010-09-21 17:51:29 +01:00
José Fonseca 388c94195a llvmpipe: Describe how to profile llvmpipe. 2010-09-21 17:51:29 +01:00
Brian Paul b3a647276e draw: new draw_fs.[ch] files 2010-09-21 10:07:52 -06:00
Brian Paul d49f153ab3 Merge branch 'sprite-coord' 2010-09-21 09:57:25 -06:00
Kristian Høgsberg 441344ba7e glx: Hold on to drawables if we're just switching to another context
https://bugs.freedesktop.org/show_bug.cgi?id=30234
2010-09-21 10:20:23 -04:00
Luca Barbieri bb26272bea d3d1x: actually enable and fix blob apis 2010-09-21 16:01:26 +02:00
Luca Barbieri f815b57b88 d3d1x: add missing file 2010-09-21 15:51:02 +02:00
Luca Barbieri cb7cc36fff d3d1x: fix compilation with recent Wine versions installed
Recent Wine versions provide a d3d11shader.h, which is however empty
and was getting used instead of our non-empty one.

Correct the include path order to fix this.
2010-09-21 15:44:41 +02:00
Luca Barbieri 70fed0b0ec d3d1x: add blob and signature extraction APIs
NOTE: untested, needs a testing tool!
2010-09-21 15:44:41 +02:00
Keith Whitwell 2ec86793bd llvmpipe: fix flatshading in new line code
Calculate interpolants before rearranging the vertices.
2010-09-21 14:36:55 +01:00
Luca Barbieri 92617aeac1 d3d1x: add new Direct3D 10/11 COM state tracker for Gallium
This is a new implementation of the Direct3D 11 COM API for Gallium.

Direct3D 10 and 10.1 implementations are also provided, which are
automatically generated with s/D3D11/D3D10/g plus a bunch of #ifs.

While this is an initial version, most of the code is there (limited
to what Gallium can express), and tri, gears and texturing demos
are working.

The primary goal is to realize Gallium's promise of multiple API
support, and provide an API that can be easily implemented with just
a very thin wrapper over Gallium, instead of the enormous amount of
complex code needed for OpenGL.

The secondary goal is to run Windows Direct3D 10/11 games on Linux
using Wine.
Wine dlls are currently not provided, but adding them should be
quite easy.

Fglrx and nvidia drivers can also be supported by writing a Gallium
driver that talks to them using OpenGL, which is a relatively easy
task.
Thanks to the great design of Direct3D 10/11 and closeness to Gallium,
this approach should not result in detectable overhead, and is the
most maintainable way to do it, providing a path to switch to the
open Gallium drivers once they are on par with the proprietary ones.

Currently Wine has a very limited Direct3D 10 implementation, and
completely lacks a Direct3D 11 implementation.

Note that Direct3D 10/11 are completely different from Direct3D 9
and earlier, and thus warrant a fully separate implementation.

The third goal is to provide a superior alternative to OpenGL for
graphics programming on non-Windows systems, particularly Linux
and other free and open systems.

Thanks to a very clean and well-though design done from scratch,
the Direct3D 10/11 APIs are vastly better than OpenGL and can be
supported with orders of magnitude less code and development time,
as you can see by comparing the lines of code of this commit and
those in the existing Mesa OpenGL implementation.

This would have been true for the Longs Peak proposal as well, but
unfortunately it was abandoned by Khronos, leaving the OpenGL
ecosystem without a graphics API with a modern design.

A binding of Direct3D 10/11 to EGL would solve this issue in the
most economical way possible, and this would be great to provide
in Mesa, since DXGI, the API used to bind Direct3D 10/11 to Windows,
is a bit suboptimal, especially on non-Windows platforms.

Finally, a mature Direct3D 10/11 implementation is intrinsically going
to be faster and more reliable than an OpenGL implementation, thanks
to the dramatically smaller API and the segregation of all nontrivial
work to object creation that the application must perform ahead of
time.

Currently, this commit contains:
- Independently created headers for Direct3D 10, 10.1, 11 and DXGI 1.1,
  partially based on the existing Wine headers for D3D10 and DXGI 1.0
- A parser for Direct3D 10/11 DXBC and TokenizedProgramFormat (TPF)
- A shader translator from TokenizedProgramFormat to TGSI
- Implementation of the Direct3D 11 core interfaces
- Automatically generated implementation of Direct3D 10 and 10.1
- Implementation of DXGI using the "native" framework of the EGL st
- Demos, usable either on Windows or on this implementation
  - d3d11tri, a clone of tri
  - d3d11tex, a (multi)texturing demo
  - d3d11gears, an improved version of glxgears
  - d3d11spikysphere, a D3D11 tessellation demo (currently Windows-only)
- A downloader for the Microsoft HLSL compiler, needed to recompile
  the shaders (compiled shader bytecode is also included)

To compile this, configure at least with these options:
--with-state-trackers=egl,d3d1x --with-egl-platforms=x11
plus some gallium drivers (such as softpipe with --enable-gallium-swrast)

The Wine headers (usually from a wine-dev or wine-devel package) must
be installed.
Only x86-32 has been tested.

You may need to run "make" in the subdirectories of src/gallium/winsys/sw
and you may need to manually run "sudo make install" in
src/gallium/targets/egl

To test it, run the demos in the "progs" directory.
Windows binaries are included to find out how demos should work, and to
test Wine integration when it will be done.

Enjoy, and let me know if you manage to compile and run this, or
which issues you are facing if not.

Using softpipe is recommended for now, and your mileage with hardware
drivers may vary.
However, getting this to work on hardware drivers is also obviously very
important.

Note that currently llvmpipe is buggy and causes all 3 gears to be
drawn with the same color.
Use export GALLIUM_DRIVER=softpipe to avoid this.

Thanks to all the Gallium contributors and especially the VMware
team, whose work made it possible to implement Direct3D 10/11 much
more easily than it would have been otherwise.
2010-09-21 10:58:17 +02:00
Tilman Sauerbeck 894a307a91 r600g: Removed debug code.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-21 08:13:35 +02:00
Dave Airlie 8893427377 r600g: fix eg texture borders.
texture border regs are indexed on evergreen.
2010-09-21 20:53:09 +10:00
Dave Airlie b6ced8ee7b r600g: fixup evergreen miptree setup.
eg seems to have a higher pitch aligmment requirement and uses r700 cube setup

this fixes a couple of piglit tests here.
2010-09-21 20:53:09 +10:00
Tom Stellard 610aed81db r300/compiler: Refactor the pair instruction data structures
Use rc_pair_ prefix for all pair instruction structs

Create a named struct for pair instruction args

Replace structs radeon_pair_instruction_{rgb,alpha} with struct
radeon_pair_sub_instruction.  These two structs were nearly identical
and were creating a lot of cut and paste code.  These changes are the
first step towards removing some of that code.
2010-09-20 18:48:47 -07:00
Dave Airlie 84997cd566 r600g: set back to correct codepaths.
Jerome please use git diff and git show before pushing.
2010-09-21 11:32:15 +10:00
Dave Airlie 8e8b60588b r600g: deal with overflow of VTX/TEX CF clauses.
running piglit's texrect-many caused the vtx to overflow.
2010-09-21 11:26:01 +10:00
Vinson Lee 2491258436 tgsi: Remove duplicate case value. 2010-09-20 18:20:04 -07:00
Francisco Jerez bf8f24c1c8 dri/nouveau: Fix software mipmap generation on 1x1 textures. 2010-09-21 03:04:04 +02:00
Francisco Jerez 98add55fff dri/nv10-nv20: Fix texturing in some cases after a base level change. 2010-09-21 03:03:39 +02:00
Francisco Jerez 22c83ac47a dri/nouveau: Cleanup more references to old FBOs and VBOs. 2010-09-21 03:03:01 +02:00
Francisco Jerez 13c246bcea dri/nouveau: Remove unnecessary assertion. 2010-09-21 02:43:12 +02:00
Francisco Jerez 72e5fd5c02 dri/nv04: Use nvgl_wrap_mode(). 2010-09-21 02:43:11 +02:00
Jakob Bornecrantz d21301675c tgsi: Actually care what check_soa_dependencies says
Thanks to José for the more complete list of supported opcodes.

NOTE: This is a candidate for the 7.9 branch.
2010-09-21 02:19:09 +02:00
José Fonseca c66f0c4629 tgsi: Don't ignore indirect registers in tgsi_check_soa_dependencies
NOTE: This is a candidate for the 7.9 branch.
2010-09-21 02:18:43 +02:00
Timo Wiren 99907303f6 Fix typos in comments and debug output strings.
Bug #30208.
2010-09-20 15:28:32 -07:00
Brian Paul 77af109554 draw: check bitshift against PIPE_MAX_SHADER_OUTPUS 2010-09-20 15:34:02 -06:00
Brian Paul 1662c31703 llvmpipe: check bitshift against PIPE_MAX_SHADER_OUTPUTS 2010-09-20 15:33:49 -06:00
Jerome Glisse 4fc5050f82 r600g: add back reference check when mapping buffer
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-20 17:21:37 -04:00
Brian Paul a7ea4d11fb draw: fix test for using the wide-point stage
As it was, we weren't obeying the draw->pipeline.point_sprite state.
Fixes point sprites in llvmpipe driver.
2010-09-20 14:07:41 -06:00
Jerome Glisse 0f099f2906 r600g: use pipe context for flushing inside map
This allow to share code path btw old & new, also
remove check on reference this might make things
a little slower but new design doesn't use reference
stuff.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-09-20 16:02:13 -04:00
Brian Paul 61fcd9aaa2 llvmpipe: implement sprite coord origin modes 2010-09-20 13:48:02 -06:00
Tilman Sauerbeck 021e68b2cd python/tests: Fixed tri.py for API and TGSI syntax changes.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-20 21:43:01 +02:00
Brian Paul c3982c6bcd llvmpipe: rename sprite field, add sprite_coord_origin 2010-09-20 13:37:39 -06:00
Tilman Sauerbeck ef419599d9 r600g: Implemented the Z and W component write for the SCS opcode.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-20 21:27:59 +02:00
Brian Paul b7a5eac1f3 llvmpipe: clean-up, comments in setup_point_coefficient() 2010-09-20 13:26:27 -06:00
Tilman Sauerbeck 57bf96b43b r600g: Honour destination operand's writemask in the SCS implementation.
If we are not going to write to the X or Y components of the destination
vector we also don't need to prepare to compute SIN or COS.

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-20 21:22:48 +02:00
Brian Paul 924c18da95 llvmpipe: reformatting, remove trailing whitespace, etc 2010-09-20 13:18:41 -06:00
Brian Paul ebba92875a llvmpipe: indentation fix 2010-09-20 13:18:41 -06:00
Brian Paul 955d76c3d2 llvmpipe: maintain fragment shader state for draw module 2010-09-20 12:52:16 -06:00
Luca Barbieri 86d5ec70d1 softpipe: fix whitespace 2010-09-20 20:49:48 +02:00
Luca Barbieri de71e7a4c9 tgsi: add switch/case opcodes to tgsi_opcode_tmp.h 2010-09-20 20:23:35 +02:00
Luca Barbieri 2e7d1c2c86 softpipe: make z/s test always pass if no zsbuf, instead of crashing
D3D10 specifies this.
2010-09-20 20:23:35 +02:00
Luca Barbieri 6d0b695fa7 gallium: avoid the C++ keyword "template" in sw_winsys.h 2010-09-20 20:23:34 +02:00