Commit Graph

7412 Commits

Author SHA1 Message Date
Marek Olšák 68c54abb2c r600g: fix depth-stencil on evergreen
Such that it actually works in apps which use both.

A separate buffer is allocated for stencil. The only exception is
the window-system-provided depth-stencil buffer, where depth and stencil
share the same buffer.

This fixes:
- fbo-depthstencil-GL_DEPTH24_STENCIL8-clear
- fbo-depthstencil-GL_DEPTH24_STENCIL8-drawpixels-FLOAT-and-USHORT
- fbo-depthstencil-GL_DEPTH24_STENCIL8-readpixels-24_8
- fbo-depthstencil-GL_DEPTH24_STENCIL8-readpixels-FLOAT-and-USHORT
2011-08-19 23:12:11 +02:00
Christoph Bumiller 778997f9df nv50: fix potential null deref in insn modifer optimization pass
Bug introduced in 34980cd153.
2011-08-19 16:57:30 +02:00
Marek Olšák e330d90e91 r600g: fix a possible crash in r600_adjust_gprs 2011-08-19 14:46:25 +02:00
José Fonseca 762bf931ca llvmpipe: Don't build lp_test_arit on MSVC.
Several issues due to expf/logf/etc either not being declared,
or being defined as a macro.
2011-08-18 18:04:44 +01:00
José Fonseca a7f67b1c50 llvmpipe: snprintf->util_snprintf.
For MSVC.
2011-08-18 17:58:02 +01:00
José Fonseca 09042e08cb llvmpipe: Add u_math.h include.
Necessary on platforms with incomplete math.h
2011-08-18 16:06:00 +01:00
Marek Olšák 01680ce2f3 r600g: implement NV_primitive_restart functionality (v2)
Needed for GL3.

v2: evergreen support

I don't set PA_SU_SC_MODE_CNTL.MULTI_PRIM_IB_ENA.
piglit/primitive-restart does pass though. Tested on RV730 and EG-REDWOOD.
2011-08-18 00:25:07 +02:00
Christoph Bumiller 34980cd153 nv50: don't drop flags definition when merging SAT with ADD/MAD 2011-08-17 20:40:43 +02:00
Marek Olšák 9e8f556b19 softpipe: fix an obvious copy-paste error in get_query_result
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-08-16 19:56:29 +02:00
Marek Olšák 4a47662bea r600g: rename bc -> bytecode
It took me a while to figure out what it stands for.
2011-08-16 19:39:59 +02:00
Marek Olšák e3be513118 r600g: expose ARB_ES2_compatibility by claiming fixed-point format support
I also needed to make some changes in u_vbuf_mgr in order to override
the caps from the driver and enable the fallback even though the driver
claims the format is supported.
2011-08-16 09:15:11 +02:00
Marek Olšák 21c5d11b7e noop: redirect the get_param/is_format.. queries to the underlying driver 2011-08-16 09:15:11 +02:00
Marek Olšák 233dd4953e u_blitter: rename util_blitter_copy_region -> util_blitter_copy_texture 2011-08-16 09:15:11 +02:00
Marek Olšák a77431b3b0 r600g: consolidate two files r600d.h 2011-08-16 09:15:11 +02:00
Marek Olšák 47dcfb8dab r600g: set read/write usage flags for each relocation
This takes advantage of the new GEM_WAIT ioctl when mapping buffers.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák 1e3c81a068 winsys/radeon: hook up the new DRM_RADEON_GEM_WAIT ioctl
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák c79e9f0ed5 r600g: enable thread offloading
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák 0bbbd82488 r600g: undefine RADEON_CTX_MAX_PM4
winsys/radeon has its own definition.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák d6da5185f9 r600g: don't include radeon_drm.h and xf86drm.h
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák 041ed559e1 r600g: remove an unused parameter from r600_bo_destroy
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák c6fec83726 r600g: merge radeon_bo with r600_bo
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák ab630b5768 r600g: use buffer_map/unmap from radeon_winsys
This also drops the unneeded bo_busy/wait functions.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák e2e1dc9e66 r600g: set the flush callback in radeon_winsys
I have also renamed the winsys function.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák e6fb62594f r600g: emit CS using radeon_winsys
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:10 +02:00
Marek Olšák 685b8345a8 r600g: remove struct r600_reloc
That is really private to winsys/radeon.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:10 +02:00
Marek Olšák 638d75185e r600g: let radeon_winsys maintain the list of relocations
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:10 +02:00
Marek Olšák 9865b1ec8c r600g: remove now-unused r600_context::fenced_bo
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:10 +02:00
Marek Olšák 2ce783d8dd r600g: put radeon_winsys in screen::winsys, don't include drm_driver in the pipe
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:10 +02:00
Marek Olšák 354f76f386 r600g: cleanup includes in winsys
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:10 +02:00
Marek Olšák ce12f82692 r600g: first step into winsys/radeon
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:10 +02:00
Lauri Kasanen df7859be6b r600g: Add support for ROUND, v2
This is a GLSL 1.3 feature, but also used by MLAA.

Signed-off-by: Lauri Kasanen <cand@gmx.com>
2011-08-10 16:08:59 -04:00
Brian Paul 32faaea743 r300g: silence some warnings about uninitialized variables 2011-08-09 09:04:10 -06:00
Brian Paul 971905bf39 svga: add missing switch case for PIPE_SHADER_CAP_INTEGERS 2011-08-09 08:58:47 -06:00
Christoph Bumiller 9e466e87e6 nv50,nvc0: never convert in resource copy when format sizes match
If there are any cases left where the st thinks that RGBA -> BGRA
will swap components, it will get what it deserves.

Now the GPU's 2D engine goes unused. What a shame.
2011-08-07 15:34:34 +02:00
Marek Olšák 64ab39b035 winsys/radeon: fix space checking
We should remove the relocations which caused a validation failure
from the list, so that the kernel receives only the validated ones.

NOTE: This is a candidate for the 7.11 branch.
2011-08-05 07:08:18 +02:00
Marek Olšák d99c8e191b r300g: handle new CAPs 2011-08-05 07:05:24 +02:00
Marek Olšák 6b3bbf52b8 r300g: adapt to the resource_resolve interface change 2011-08-05 07:05:24 +02:00
Bryan Cain 4683529048 Merge branch 'glsl-to-tgsi'
Conflicts:
	src/mesa/state_tracker/st_atom_pixeltransfer.c
	src/mesa/state_tracker/st_program.c
2011-08-04 15:43:34 -05:00
Christoph Bumiller e9d84dab88 nv50: implement resource_resolve with custom blit 2011-08-04 15:38:49 +02:00
Marek Olšák babb26776f r600g: remove more of unused code
This is a follow-up to f6df430a85.
2011-08-04 03:25:18 +02:00
Vadim Girlin 2bde0cc95d r600g: take into account force_add_cf in pops
When we have two ENDIFs in a row, we shouldn't modify the pop_count
for the same alu clause twice.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=38163

Note: this is a candidate for the 7.11 branch.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-03 10:17:50 -04:00
Vadim Girlin 6eb94fc344 r600g: use backend mask for occlusion queries
Use backend_map kernel query if supported, otherwise analyze ZPASS_DONE
results to get the mask.

Fixes lockups with predicated rendering due to incorrect query buffer
initialization on some cards.

Note: this is a candidate for the 7.11 branch.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-03 10:17:44 -04:00
Marek Olšák e69dde5233 r600g: remove dummy function r600_bo_offset
Always returned 0.
2011-08-02 18:52:17 +02:00
Marek Olšák f6df430a85 r600g: remove unused code 2011-08-02 18:52:17 +02:00
Marek Olšák be7407b75b gallium/util: add functions for manipulating swizzles
Some of those have been in drivers already.
2011-08-02 18:49:30 +02:00
Bryan Cain 17b695e6e7 gallium: add PIPE_SHADER_CAP_INTEGERS 2011-08-01 17:59:07 -05:00
Alex Deucher dc1c0ca22a r600g: fix up vs export handling
Certain attributes (position, psize, etc.) don't
count as params; they are handled separately by the hw.
However, the VS is required to export at least one param
and r600_shader_from_tgsi() takes care of adding a dummy
export if there is none.  Make sure the VS param export
count in the SPI properly accounts for this.

Note: This is a candidate for the 7.11 branch.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2011-07-29 11:34:02 -04:00
Eric Anholt f79e3518b4 softpipe: When doing write_all_cbufs, don't stomp over the color.
We have to make it through this loop processing the color multiple
times, so we can't go overwriting it on our first color buffer.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-07-28 17:32:42 -07:00
Vadim Girlin 95ee961f77 r600g: fix vs export count
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39572

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
2011-07-28 18:58:40 -04:00
Marek Olšák 1c2c4ddbd1 r300g: copy the compiler from r300c
What a beast.

r300g doesn't depend on files from r300c anymore, so r300c is now left
to its own fate. BTW 'make test' can be invoked from the gallium/r300
directory to run some compiler unit tests.
2011-07-26 22:35:49 +02:00