Eric Anholt
af3c9803d8
i965: Start adding the VS visitor and codegen.
...
The low-level IR is a mashup of brw_fs.cpp and ir_to_mesa.cpp. It's
currently controlled by the INTEL_NEW_VS=1 environment variable, and
only tested for the trivial "gl_Position = gl_Vertex;" shader so far.
2011-08-16 13:04:41 -07:00
Eric Anholt
65b5cbbcf7
i965: Rename math FS_OPCODE_* to SHADER_OPCODE_*.
...
I want to just use the same enums in the VS.
2011-08-16 13:04:41 -07:00
Eric Anholt
6034b9a512
i965: Create a shared enum for hardware and compiler-internal opcodes.
...
This should make gdbing more pleasant, and it might be used in sharing
part of the codegen between the VS and FS backends.
2011-08-16 13:04:41 -07:00
Eric Anholt
c1f00731fd
i965: Generate driver-specific IR for non-fragment shaders as well.
...
This will be used by the new vertex shader backend. The scalarizing
passes are skipped for non-fragment, since vertex and geometry threads
are based on vec4s.
2011-08-16 13:04:41 -07:00
Brian Paul
11e4ea0010
mesa: ChooseTextureFormat() returns gl_format, not GLuint
2011-08-16 13:05:34 -06:00
Paul Berry
af501e2b29
glsl: Fix type error when lowering integer divisions
...
This patch fixes a bug when lowering an integer division:
x/y
to a multiplication by a reciprocal:
int(float(x)*reciprocal(float(y)))
If x was a plain int and y was an ivecN, the lowering pass
incorrectly assigned the type of the product to be float, when in fact
it should be vecN. This caused mesa to abort with an IR validation
error.
Fixes piglit tests {fs,vs}-op-div-int-ivec{2,3,4}.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-08-16 11:00:46 -07: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
5e7713caa9
st/dri: remove an unused-but-set variable
2011-08-16 19:39:59 +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
Benjamin Franzke
61d2dfbe48
egl: Add include paths for platform autodetection
...
Needed since commit 85fe9484
.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40145
2011-08-16 19:28:07 +02:00
Cooper Yuan
f272117def
dri2: check if context is valid before flushing the pipe
2011-08-16 20:37:13 +08: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
363295d720
u_blitter: restore some states conditionally
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
ebfcc58b93
winsys/radeon: take advantage of the new ioctl
...
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
296b899095
winsys/radeon: remove broken bo-is-busy-for-write guessing
...
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
efbccfeca0
winsys/radeon: remove the device file descriptor from the interface
...
r600g doesn't need it anymore.
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
5229ba494b
r600g: remove radeon_bo::handle
...
This should be private to radeon_winsys.
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
7ee65800c3
r600g: get tiling flags using radeon_winsys
...
Also remove some unused fence-related leftovers.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák
ecfcf25387
r600g: get winsys_handle using radeon_winsys
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák
1b542aca6e
r600g: move more DRM queries into winsys/radeon
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák
03b25ad8ff
winsys/radeon: consolidate the add_reloc function
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:10 +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
1acaf09778
r600g: don't use RADEON_GEM_DOMAIN_CPU
...
Also staging resources shouldn't be allocated with the initial domain
being VRAM.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:10 +02:00
Marek Olšák
3e57972216
r600g: remove reloc-related variables from radeon_bo
...
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
591d8c3350
r600g: remove the fences which were used for the cache buffer manager
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:10 +02:00
Marek Olšák
cdbb8a195a
r600g: remove now-unused r600_bo::size
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:10 +02:00
Marek Olšák
60ff68ad00
r600g: remove the cache buffer manager from winsys/r600
...
As we've just started using the one from winsys/radeon.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:10 +02:00
Marek Olšák
11daa7e325
r600g: allocate/destroy buffers using radeon_winsys
...
We use the cache buffer manager from radeon_winsys now, but we don't use
anything else yet.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:10 +02:00
Marek Olšák
edca57e533
r600g: remove unused function declarations
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:10 +02:00
Marek Olšák
39db886548
r600g: remove unused r600_bo::tiling_flags
...
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:10 +02:00
Marek Olšák
c092e236cc
r600g: remove unused r600_bo::kernel_pitch
...
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
fb8cf51eeb
r600g: move some queries into winsys/radeon
...
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