OSDN Git Service
Nicolai Hähnle [Fri, 24 Jul 2009 21:28:08 +0000 (23:28 +0200)]
r300/fragprog: Refactor wpos rewrite to use rc_program
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Fri, 24 Jul 2009 21:06:54 +0000 (23:06 +0200)]
r300/compiler: Refactor fragment program fog rewrite to use rc_program
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Fri, 24 Jul 2009 20:50:35 +0000 (22:50 +0200)]
r300/compiler: Refactor rewrite_depth_out to use rc_program
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Fri, 24 Jul 2009 20:34:44 +0000 (22:34 +0200)]
r300/compiler: Refactor local transforms to use rc_program
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Fri, 24 Jul 2009 20:41:14 +0000 (22:41 +0200)]
r300: Allow compiler to add constants in a cleaner way
Adding constants is used in a number of non-native instruction
rewrites, and it required us to keep copies of modified gl_programs
around. This is a first step towards ending this.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Thu, 23 Jul 2009 20:49:31 +0000 (22:49 +0200)]
r300/compiler: Refactor nqssadce to use rc_program
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Thu, 23 Jul 2009 20:09:48 +0000 (22:09 +0200)]
r300/compiler: Refactor for rc_program usage
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Thu, 23 Jul 2009 20:09:11 +0000 (22:09 +0200)]
r300/compiler: Add rc_print_program
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Thu, 23 Jul 2009 19:38:28 +0000 (21:38 +0200)]
r300/compiler: Lay groundwork for better error handling
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Thu, 23 Jul 2009 19:10:37 +0000 (21:10 +0200)]
r300: Remove dependency on GLcontext from compiler
Unfortunately, this does cause some code duplication (which we can hopefully
eliminate eventually).
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Thu, 23 Jul 2009 18:24:22 +0000 (20:24 +0200)]
r300/vertprog: Cleanup source conflict handling
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Thu, 23 Jul 2009 17:52:00 +0000 (19:52 +0200)]
r300/vertprog: Massively reduce code duplication
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Thu, 23 Jul 2009 17:25:06 +0000 (19:25 +0200)]
r300/vertprog: Use generic transforms and throw away unneeded code
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Thu, 23 Jul 2009 16:40:41 +0000 (18:40 +0200)]
r300: Move vertex program compilation to compiler
This is just the first step of refactoring. The separation is not yet
clean enough with this commit.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Thu, 23 Jul 2009 22:32:41 +0000 (00:32 +0200)]
r300: Cleanup vertex_program structure
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Wed, 22 Jul 2009 20:47:31 +0000 (22:47 +0200)]
r300: Remove faux lazy translation of vertex programs
De facto, vertex programs were translated immediately in all situations,
so let's just stop pretending that we do lazy translation.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Wed, 22 Jul 2009 20:13:06 +0000 (22:13 +0200)]
r300: Reduce include dependencies
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Wed, 22 Jul 2009 20:10:13 +0000 (22:10 +0200)]
r300: Introduce rc_program and use it in radeon_pair
The goal is to convert both Mesa and TGSI programs into an intermediate format
that happens to be convenient for us.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Wed, 22 Jul 2009 19:29:35 +0000 (21:29 +0200)]
r300: Add radeon_compiler as a base for compilation-related tasks
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Tue, 21 Jul 2009 18:25:33 +0000 (20:25 +0200)]
r300: Remove some unnecessary includes
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Thu, 16 Jul 2009 21:56:15 +0000 (23:56 +0200)]
r300/compiler: Compile the compiler seperately into an archive
This is all part of untangling the compiler from the classic driver, so that
it may be used in Gallium without depending on Mesa stuff if possible
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Tue, 21 Jul 2009 16:28:30 +0000 (18:28 +0200)]
r300: Further reduce dependency between compiler and classic driver
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Thu, 16 Jul 2009 20:58:13 +0000 (22:58 +0200)]
r300: Remove some dependencies on additional fragment program copies
The copy is still needed because some program transforms add state variables
or constants.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Thu, 16 Jul 2009 20:40:53 +0000 (22:40 +0200)]
r300: Remove GLcontext from r300_fragment_program_compiler
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Thu, 16 Jul 2009 20:39:16 +0000 (22:39 +0200)]
r300: Remove GLcontext requirement from radeonLocalTransform
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Thu, 16 Jul 2009 20:36:54 +0000 (22:36 +0200)]
r300: Remove unused enums
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Thu, 16 Jul 2009 20:32:46 +0000 (22:32 +0200)]
r300: Remove GLcontext requirement from radeon_nqssadce
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Thu, 16 Jul 2009 20:23:48 +0000 (22:23 +0200)]
r300: Remove GLcontext requirement from radeon_program_pair
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Thu, 16 Jul 2009 17:57:43 +0000 (19:57 +0200)]
r300/program_pair: Introduce driver-specific texture instruction structure
This is to prepare more experimentation and possible internal changes in the
compiler.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Wed, 15 Jul 2009 20:25:28 +0000 (22:25 +0200)]
r300/program_pair: Dynamically allocate instructions temporarily
In preparation of using TGSI, where we cannot easily predict the number
of instructions.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Nicolai Hähnle [Wed, 15 Jul 2009 15:36:42 +0000 (17:36 +0200)]
r300: Detangle fragment program compiler from driver-specific structure
This is in preparation of sharing the fragment program compiler with Gallium:
Compiler code is moved into its own directory and modified so that it no
longer depends on driver structures.
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Pauli Nieminen [Mon, 27 Jul 2009 14:13:48 +0000 (17:13 +0300)]
radeon: Add r6xx/r7xx chip family to get_chip_family_name
This fixes problem that glxinfo was reporting r600+ cards as unknown.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Patrice Mandin [Mon, 27 Jul 2009 08:57:53 +0000 (10:57 +0200)]
nouveau: swizzle a single row or column, doing it one pixel at a time
Alex Deucher [Mon, 27 Jul 2009 07:52:37 +0000 (03:52 -0400)]
r600: fix textures
We weren't allocating enough gprs for the fragment shader
in some cases. There are likely other issues that still need
to be sorted out for textures, but at least they now work.
Alex Deucher [Mon, 27 Jul 2009 06:25:24 +0000 (02:25 -0400)]
r600: don't draw when num indices is 0
fixes engine demo
Alex Deucher [Mon, 27 Jul 2009 06:07:59 +0000 (02:07 -0400)]
r600: set VGT NUM_INSTANCES as part of the draw command
set VGT NUM_INSTANCES as part of the draw command rather
than as state as recommended by the pm4 guide. Also,
use the NUM_INSTANCES packet.
Alex Deucher [Mon, 27 Jul 2009 05:57:25 +0000 (01:57 -0400)]
r600: Use R600_SCRATCH_REG_OFFSET rather than RADEON_SCRATCH_REG_OFFSET
noticed by vehemens on IRC.
Alex Deucher [Fri, 24 Jul 2009 16:39:51 +0000 (12:39 -0400)]
r600: switch vtx resource setup to use SETfield macros
For consistency
Alex Deucher [Fri, 24 Jul 2009 14:58:47 +0000 (10:58 -0400)]
r600: switch tex code to use SETfield macros
for consistency with the rest of the code.
Corbin Simpson [Mon, 27 Jul 2009 05:48:20 +0000 (22:48 -0700)]
r300g: Fix two trivial texture size issues.
Next thing to fix: progs/tests/mipgen.
Corbin Simpson [Mon, 27 Jul 2009 05:35:26 +0000 (22:35 -0700)]
radeon-gallium: If BO allocation fails, return NULL.
Corbin Simpson [Fri, 24 Jul 2009 21:37:07 +0000 (14:37 -0700)]
r300g: Add some debugging, correct little bits of math in texture setup.
Simple stuff still works, but not sure about some of the more complex things.
Patrice Mandin [Sun, 26 Jul 2009 20:30:35 +0000 (22:30 +0200)]
nouveau: only swizzle square textures for copy
Patrice Mandin [Sun, 26 Jul 2009 14:18:06 +0000 (16:18 +0200)]
nouveau: Take into account destination position for copy_swizzle, need to split copy a bit more
Patrice Mandin [Sun, 26 Jul 2009 10:30:12 +0000 (12:30 +0200)]
nouveau: Recursively swizzle an NPOT sized copy
Patrice Mandin [Fri, 24 Jul 2009 21:37:46 +0000 (23:37 +0200)]
nouveau: use nv04_surface_copy_swizzle only for POT sizes
Joakim Sindholt [Fri, 24 Jul 2009 12:54:00 +0000 (14:54 +0200)]
radeon-gallium: remove old getparam ioctl
Alex Deucher [Thu, 23 Jul 2009 22:23:18 +0000 (18:23 -0400)]
r600: fix segfault in morph3d
These attributes still need work, but it shouldn't hurt to
enable them.
Keith Whitwell [Thu, 23 Jul 2009 17:48:04 +0000 (18:48 +0100)]
draw: correct address for machine struct in llvm path
This changed after a recent commit.
Keith Whitwell [Thu, 23 Jul 2009 16:56:41 +0000 (17:56 +0100)]
gallivm: updates for TGSI changes
make linux-llvm succeeds, but doesn't seem to be working, at least with
llvm 2.5
Corbin Simpson [Thu, 23 Jul 2009 14:14:07 +0000 (07:14 -0700)]
r300g, radeon-gallium: Fix API, cleanup.
Something called "validate" should return FALSE on failure, not TRUE.
Nicolai Hähnle [Thu, 23 Jul 2009 14:05:21 +0000 (07:05 -0700)]
radeon-gallium: Build fixes wrt changed libdrm_radeon space check API
Had to be hacked up a bit to apply to master. Sorry 'bout that. :3
Corbin Simpson [Thu, 23 Jul 2009 08:04:26 +0000 (01:04 -0700)]
r300g: PIPE_CAP_BLEND_EQUATION_SEPARATE.
Keith Whitwell [Wed, 22 Jul 2009 10:31:41 +0000 (11:31 +0100)]
gallium: clean up opcode definitions
Remove commented-out opcodes. Remove information about API mappings
to opcodes, but add a reference to tgsi-instruction-set.txt where
that information is better presented.
Keith Whitwell [Wed, 22 Jul 2009 10:25:26 +0000 (11:25 +0100)]
gallium: remove deprecated TGSI opcodes
Various opcodes which can be implemented trivially with other TGSI opcodes,
such as matrix multiplication and negation. These were not used by any
state tracker or implemented by any of the drivers.
José Fonseca [Thu, 23 Jul 2009 13:11:10 +0000 (14:11 +0100)]
r600: Remove CRLF line endings.
Vinson Lee [Thu, 23 Jul 2009 13:07:31 +0000 (14:07 +0100)]
util: Add support for Mac OS.
Corbin Simpson [Thu, 23 Jul 2009 06:58:35 +0000 (23:58 -0700)]
r300g: Actually mark shaders as translated/untranslated.
Also trust that Gallium will not give us TGSI that miscounts shader consts.
This creates a 20x speedup on glxgears, from 8 FPS to 160 FPS.
Brian Paul [Thu, 23 Jul 2009 03:04:07 +0000 (21:04 -0600)]
cell: update TGSI_OPCODE_ cases
Michel Dänzer [Wed, 22 Jul 2009 22:47:32 +0000 (00:47 +0200)]
gallium: Fix PPC build.
Patrice Mandin [Wed, 22 Jul 2009 20:25:36 +0000 (22:25 +0200)]
nouveau: nv30: wrong variable for format
Maciej Cencora [Wed, 22 Jul 2009 20:10:22 +0000 (22:10 +0200)]
r300: fix address register handling in NQSSADCE
For address register we always use X component
Patrice Mandin [Wed, 22 Jul 2009 19:10:20 +0000 (21:10 +0200)]
nouveau: Take into account sx,sy parameters to read from source surface
Keith Whitwell [Fri, 12 Jun 2009 10:59:01 +0000 (11:59 +0100)]
gallium: remove multiple aliases for TGSI opcodes
This is a source of ongoing confusion. TGSI has multiple names for
opcodes where the same semantics originate in multiple shader APIs.
For instance, TGSI includes both Mesa/GLSL and DX/SM30 names for
opcodes with the same semantics, but aliases those names to the same
underlying opcode number.
This makes it very difficult to visually inspect two sets of opcodes
(eg in state tracker & driver) and check if they implement the same
functionality.
This patch arbitarily rips out the versions of the opcodes not currently
favoured by the mesa state tracker and leaves us with a single name
for each distinct operation.
Keith Whitwell [Tue, 21 Jul 2009 23:39:00 +0000 (00:39 +0100)]
gallium: simplify tgsi_full_immediate struct
Remove the need to have a pointer in this struct by just including
the immediate data inline. Having a pointer in the struct introduces
complications like needing to alloc/free the data pointed to, uncertainty
about who owns the data, etc. There doesn't seem to be a need for it,
and it is unlikely to make much difference plus or minus to performance.
Added some asserts as we now will trip up on immediates with more
than four elements. There were actually already quite a few such asserts,
but the >4 case could be used in the future to specify indexable immediate
ranges, such as lookup tables.
Richard Li [Tue, 21 Jul 2009 21:56:06 +0000 (17:56 -0400)]
r600: fix dst reg indexing for real
This fixes segfaults in apps like teapot and tunnel
Alex Deucher [Tue, 21 Jul 2009 21:44:36 +0000 (17:44 -0400)]
Revert "r600: fix dst reg indexing"
This reverts commit
cc893d9a98255d3c26df7123ba5cc02e478c9328.
Richard has the proper fix.
Alex Deucher [Tue, 21 Jul 2009 21:07:17 +0000 (17:07 -0400)]
r600: add stencil support
Alex Deucher [Tue, 21 Jul 2009 18:06:47 +0000 (14:06 -0400)]
r600: use state functions to set default state
Alex Deucher [Tue, 21 Jul 2009 17:46:15 +0000 (13:46 -0400)]
r600: fill in point functions
Alex Deucher [Tue, 21 Jul 2009 17:28:12 +0000 (13:28 -0400)]
r600: set provoking vertex to last vertex for OGL
Alex Deucher [Tue, 21 Jul 2009 17:19:46 +0000 (13:19 -0400)]
r600: fill in r700UpdateViewportOffset
Alex Deucher [Tue, 21 Jul 2009 17:10:26 +0000 (13:10 -0400)]
r600: first pass at polyoffset support
not working yet
Jerome Glisse [Tue, 21 Jul 2009 19:12:40 +0000 (21:12 +0200)]
radeon: fix colorbuffer pitch emission regarding tiling in KMS/CS case
We need to emit a relocation for pitch register so that kernel can
check and properly setup tiling on the color buffer.
Alex Deucher [Tue, 21 Jul 2009 15:09:05 +0000 (11:09 -0400)]
R600: fix up some build problems
Alex Deucher [Tue, 21 Jul 2009 05:58:05 +0000 (01:58 -0400)]
r600: add alpha test support
Michel Dänzer [Tue, 21 Jul 2009 08:46:29 +0000 (10:46 +0200)]
Track Radeon driver symlinks in Git.
Peter Hutterer [Mon, 20 Jul 2009 06:11:26 +0000 (16:11 +1000)]
Add missing X11_INCLUDES to egl/drivers/demo and egl/main.
Compiling mesa on a system with no X headers installed in the default
include paths fails due to missing X11 includes. The header includes are
picked up by configure but not applied.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Eric Anholt [Tue, 21 Jul 2009 00:58:12 +0000 (17:58 -0700)]
i965: Don't clip everything if FRONT_AND_BACK culling while culling disabled.
Fixes everything-black with meta_clear_tris on quake4-mpdemo and doom3-demo.
Bug #18844, 22077.
Alex Deucher [Mon, 20 Jul 2009 23:33:05 +0000 (19:33 -0400)]
r600: fix typo in blend code
Kevin DeKorte [Mon, 20 Jul 2009 22:56:47 +0000 (18:56 -0400)]
r600: fix dst reg indexing
This fixes segfaults in apps like teapot and tunnel
Alex Deucher [Mon, 20 Jul 2009 22:50:59 +0000 (18:50 -0400)]
r600: add blending support
Alex Deucher [Mon, 20 Jul 2009 21:22:59 +0000 (17:22 -0400)]
r600: add user clip plane support
Alex Deucher [Mon, 20 Jul 2009 19:27:28 +0000 (15:27 -0400)]
r600: add logicop support
Keith Whitwell [Mon, 20 Jul 2009 18:45:24 +0000 (19:45 +0100)]
tgsi: get texturing working in vertex shader sse2 path
Missing file from previous commit.
Michel Dänzer [Mon, 20 Jul 2009 18:41:11 +0000 (20:41 +0200)]
Merge branch 'mesa_7_5_branch'
Michel Dänzer [Mon, 20 Jul 2009 18:26:28 +0000 (20:26 +0200)]
radeon: With DRI1, if we have HW stencil, only expose fbconfigs with stencil.
Otherwise simple apps like glxgears pick up a DirectColor visual since the X
server mixes the depth 32 visual in with the other GLX visuals, and this seems
to result in a (mostly) black screen due to a bad ColorMap for a lot of people.
The bad ColorMap may be a bug in the apps, the X server or X driver, and
regardless of that I think the X server should ideally make the depth 32 GLX
visual separate from the rest again, but in the meantime this makes us cope.
(depth_bits is either 16 or 24, never 0)
Keith Whitwell [Mon, 20 Jul 2009 18:29:22 +0000 (19:29 +0100)]
tgsi: get texturing working in vertex shader sse2 path
Keith Whitwell [Mon, 20 Jul 2009 18:28:34 +0000 (19:28 +0100)]
tgsi: fix regression in indexed const lookups
This function was calling get_input_base() and get_output_base() to
get the names of a couple of register to use as temps. Those
functions no longer return registers, so adjust it to get the
registers elsewhere.
This change doesn't address the issue that it's a fairly poor way to
grab a register name by calling a function with an apparently
unrelated meaning.
Kevin DeKorte [Mon, 20 Jul 2009 13:27:17 +0000 (09:27 -0400)]
r600: Fix compilation
Cooper Yuan [Mon, 20 Jul 2009 09:42:47 +0000 (17:42 +0800)]
R6xx/r7xx: Fix line stipple and width issue
Michel Dänzer [Mon, 20 Jul 2009 00:11:17 +0000 (02:11 +0200)]
Add common_ppc.c to MESA_GALLIUM_SOURCES.
Michel Dänzer [Mon, 20 Jul 2009 00:06:37 +0000 (02:06 +0200)]
r300g: Fix SCons build.
Michel Dänzer [Mon, 20 Jul 2009 00:05:38 +0000 (02:05 +0200)]
gallium/trace: Fix SCons build.
Michel Dänzer [Sun, 19 Jul 2009 23:53:15 +0000 (01:53 +0200)]
r300g: Guard R500 register writes by is_r500 check.
Flagged by the DRM command stream checker. This allows the driver to work on
non-R500 cards.
Dave Airlie [Sat, 18 Jul 2009 07:44:44 +0000 (17:44 +1000)]
gallium: make g3dvl build again
Brian Paul [Sat, 18 Jul 2009 04:00:47 +0000 (22:00 -0600)]
Merge branch 'mesa_7_5_branch'
Conflicts:
Makefile
progs/glsl/multitex.c
src/mesa/main/enums.c
src/mesa/main/state.c
src/mesa/main/texenvprogram.c
src/mesa/main/version.h
Alex Deucher [Fri, 17 Jul 2009 23:04:19 +0000 (19:04 -0400)]
R6xx/R7xx: add fine grained syncing support
Alex Deucher [Fri, 17 Jul 2009 21:08:40 +0000 (17:08 -0400)]
R6xx/r7xx: send depth state in it's own function
Andrew Randrianasulu [Fri, 17 Jul 2009 22:55:12 +0000 (00:55 +0200)]
st/egl: Fix broken build after EGL thread changes