Commit Graph

1784 Commits

Author SHA1 Message Date
Matt Turner 24c2fe94a2 winsys/sw/wrapper: Convert to automake 2013-01-10 22:01:08 +01:00
Matt Turner 1d0ef53e7b winsys/sw/wayland: Convert to automake 2013-01-10 22:01:08 +01:00
Matt Turner 1c9fb3c5b5 winsys/sw/null: Convert to automake 2013-01-10 22:01:08 +01:00
Matt Turner 5c4ade53a4 winsys/sw/fbdev: Convert to automake 2013-01-10 22:01:08 +01:00
Matt Turner a6b3cd1349 winsys/sw/dri: Convert to automake 2013-01-10 22:01:08 +01:00
Matt Turner b4beea6418 winsys/sw: Convert to automake 2013-01-10 22:01:07 +01:00
Matt Turner 2b5a1c0299 svga/winsys/drm: Convert to automake 2013-01-10 22:01:07 +01:00
Matt Turner 77fc30b57d nouveau/winsys/drm: Convert to automake 2013-01-10 22:01:07 +01:00
Matt Turner 3bfe7c2111 i915/winsys/sw: Convert to automake 2013-01-10 22:01:07 +01:00
Matt Turner 266d639b91 i915/winsys/drm: Convert to automake 2013-01-10 22:01:07 +01:00
Tom Stellard 34a6150188 radeon/winsys: Convert to automake 2013-01-10 22:01:06 +01:00
Matt Turner 9bf0d49abe automake: Convert Gallium target and winsys 2013-01-10 22:01:06 +01:00
Marek Olšák 844d14ebee winsys/radeon: bump the size of relocation hashlist
This should reduce the number of hash collisions in ETQW.
2013-01-08 16:41:57 +01:00
Jerome Glisse ca474f98f2 radeon/winsys: move radeon family/class identification to winsys
Upcoming async dma support rely on winsys knowing about GPU families.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-01-07 11:06:07 -05:00
Jerome Glisse d499ff98cd r600g/radeon/winsys: indentation cleanup
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-01-07 11:06:02 -05:00
Marek Olšák 12aeb47b6a gallium/radeon: send the END_OF_FRAME flag to the DRM 2013-01-04 13:18:50 +01:00
Marek Olšák 598cc1f74d gallium: extend pipe_context::flush for it to accept an END_OF_FRAME flag
Usage with pipe_context:
  pipe->flush(pipe, NULL, PIPE_FLUSH_END_OF_FRAME);

Usage with st_context_iface:
  st->flush(st, ST_FLUSH_END_OF_FRAME, NULL);

The flag is only a hint for drivers. Radeon will use it for buffer eviction
heuristics in the kernel (e.g. for queries like how many frames have passed
since a buffer was used).

The flag is currently only generated by st/dri on SwapBuffers.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
2013-01-04 13:18:33 +01:00
Marek Olšák 9b0b4cf058 winsys/radeon: the env var RADEON_NOOP can be used to skip CS ioctls 2012-12-21 23:42:23 +01:00
Marek Olšák 448cd5ea60 winsys/radeon: don't use BIND flags, add a flag for the cache bufmgr instead 2012-12-12 13:09:54 +01:00
Marek Olšák 12dcbd5954 r300g: enable Hyper-Z by default on r500
I fixed the only known bugs on r500 with 0222b2bd41.
Now there are no piglit regressions with Hyper-Z and all apps I tested seem
to work.

To summarize how it works:
- Only one process can use it at a time. This is a hardware limitation.
- The first process to clear a zbuffer gets the exclusive access to use
  Hyper-Z.
- Compositors don't use any zbuffer, so they won't steal it, but some web
  browsers do, so make sure there's no web browser running if you want your
  game to use Hyper-Z.
- There's no need to restart an app which couldn't get the access to Hyper-Z.
  Just quit the app which took it, the driver can turn it on for the other app
  in the middle of rendering.
- If an app gets the access to Hyper-Z, it prints "radeon: Acquired Hyper-Z"
  to stdout.

r300-r400:
  Hyper-Z will be enabled by default on r300-r400 once sufficient testing is
  done with piglit and Lightsmark at least.
  Be sure to set the env var RADEON_HYPERZ and run piglit with parameters: -c 0
2012-12-02 18:07:26 +01:00
Vinson Lee ffc318a97a scons: Build ws_xlib on Mac OS X.
Fixes this SCons build error on Mac OS X if X11 is found.

NameError: name 'ws_xlib' is not defined:
  File "SConstruct", line 144:
    duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
  File "scons-2.2.0/SCons/Script/SConscript.py", line 614:
    return method(*args, **kw)
  File "scons-2.2.0/SCons/Script/SConscript.py", line 551:
    return _SConscript(self.fs, *files, **subst_kw)
  File "scons-2.2.0/SCons/Script/SConscript.py", line 260:
    exec _file_ in call_stack[-1].globals
  File "src/SConscript", line 34:
    SConscript('gallium/SConscript')
  File "scons-2.2.0/SCons/Script/SConscript.py", line 614:
    return method(*args, **kw)
  File "scons-2.2.0/SCons/Script/SConscript.py", line 551:
    return _SConscript(self.fs, *files, **subst_kw)
  File "scons-2.2.0/SCons/Script/SConscript.py", line 260:
    exec _file_ in call_stack[-1].globals
  File "src/gallium/SConscript", line 135:
    'targets/libgl-xlib/SConscript',
  File "scons-2.2.0/SCons/Script/SConscript.py", line 614:
    return method(*args, **kw)
  File "scons-2.2.0/SCons/Script/SConscript.py", line 551:
    return _SConscript(self.fs, *files, **subst_kw)
  File "scons-2.2.0/SCons/Script/SConscript.py", line 260:
    exec _file_ in call_stack[-1].globals
  File "src/gallium/targets/graw-xlib/SConscript", line 9:
    ws_xlib,

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-11-27 23:13:57 -08:00
Marek Olšák 369e468889 gallium: unify transfer functions
"get_transfer + transfer_map" becomes "transfer_map".
"transfer_unmap + transfer_destroy" becomes "transfer_unmap".

transfer_map must create and return the transfer object and transfer_unmap
must destroy it.

transfer_map is successful if the returned buffer pointer is not NULL.
If transfer_map fails, the pointer to the transfer object remains unchanged
(i.e. doesn't have to be NULL).

Acked-by: Brian Paul <brianp@vmware.com>
2012-10-11 21:12:16 +02:00
Vadim Girlin 9aa8bac98b winsys/radeon: fix relocs caching
Don't cache pointers to elements of reallocatable array.
In some circumstances it caused false cache hits resulting in incorrect
command stream and gpu lockup.

Note: This is a candidate for the stable branches.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
2012-09-19 04:48:16 +04:00
Matt Turner b6109de34f Remove useless checks for NULL before freeing
Same as earlier commit, except for "FREE"

This patch has been generated by the following Coccinelle semantic
patch:

// Remove useless checks for NULL before freeing
//
// free (NULL) is a no-op, so there is no need to avoid it

@@
expression E;
@@
+ FREE (E);
+ E = NULL;
- if (unlikely (E != NULL)) {
-   FREE(E);
(
-   E = NULL;
|
-   E = 0;
)
   ...
- }

@@
expression E;
type T;
@@
+ FREE ((T) E);
+ E = NULL;
- if (unlikely (E != NULL)) {
-   FREE((T) E);
(
-   E = NULL;
|
-   E = 0;
)
   ...
- }

@@
expression E;
@@
+ FREE (E);
- if (unlikely (E != NULL)) {
-   FREE (E);
- }

@@
expression E;
type T;
@@
+ FREE ((T) E);
- if (unlikely (E != NULL)) {
-   FREE ((T) E);
- }

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-09-05 22:28:50 -07:00
Matt Turner 2b7a972e3f Don't cast the return value of malloc/realloc
This patch has been generated by the following Coccinelle semantic
patch:

// Don't cast the return value of malloc/realloc.
//
// Casting the return value of malloc/realloc only stands to hide
// errors.

@@
type T;
expression E1, E2;
@@
- (T)
(
_mesa_align_calloc(E1, E2)
|
_mesa_align_malloc(E1, E2)
|
calloc(E1, E2)
|
malloc(E1)
|
realloc(E1, E2)
)
2012-09-05 22:28:50 -07:00
Christian König 73dd82061e winsys/radeon: create only one winsys for each fd
Fixing problems with GLAMOR.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2012-09-04 10:51:38 +02:00
Michel Dänzer 18abc270c5 gallium/radeon: Don't assign virtual address space for BO that already has one.
We'd end up re-using the old one and throwing away the new one anyway, but only
after a roundtrip to the kernel.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-08-16 11:58:24 +02:00
Michel Dänzer a60be05284 gallium/radeon: Create hole for waste when allocating from va_offset.
Otherwise, the wasted area could never be used for an allocation again.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-08-16 11:58:24 +02:00
Michel Dänzer 1f455ef5bc gallium/radeon: Fix potential address space loss in radeon_bomgr_force_va().
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-08-16 11:58:23 +02:00
Michel Dänzer 6d59b7f6dc gallium/radeon: Delete uppermost virtual address space hole if it's at the top.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-08-16 11:58:23 +02:00
Michel Dänzer f5fe81daea gallium/radeon: Fix losing holes when allocating virtual address space.
If a hole exactly matches the allocated size plus alignment, we would fail to
preserve the alignment as a hole. This would result in never being able to use
the alignment area for an allocation again.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-08-16 11:58:23 +02:00
Michel Dänzer 206d07625c gallium/radeon: Merge holes when freeing virtual address space.
Otherwise we'll likely end up with an ever increasing amount of ever smaller
holes.

Requires keeping the list ordered wrt offsets.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-08-16 09:39:36 +02:00
Michel Dänzer c25968f3e2 gallium/radeon: Make va_offset 64 bits wide.
Otherwise we'd wrap around after 32 bits. The kernel currently limits GPU
virtual address space to 4GB anyway, but that will probably change sooner or
later, and this would result in confusing error messages when running out of
virtual address space even now.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-08-16 09:37:33 +02:00
Marek Olšák 44f14ebd7b r600g: implement timestamp query and get_timestamp hook
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-08-15 19:20:58 +02:00
Marek Olšák 2f14202f52 configure.ac: bump libdrm_radeon requirement to 2.6.38 2012-08-15 19:20:57 +02:00
Marek Olšák a7f4d3b740 winsys/radeon: print error if CS is overflowed
and don't submit the CS to the kernel.
2012-08-15 19:20:57 +02:00
Christian König 8c44e5a144 radeon/winsys: fix winsys VM handling
Move releasing the VM area after closing the bo handle.

This partially fixes: https://bugs.freedesktop.org/show_bug.cgi?id=45018

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-08-08 12:35:10 +02:00
Vinson Lee 8734584952 scons: Add support for Intel Compiler.
The patch makes the SCons build with Intel Compiler successful.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-08-01 21:28:47 -07:00
Vinson Lee 4f109ca4e8 scons: Fix build with clang.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-07-25 17:04:30 -07:00
Marek Olšák 6e7756db14 r600g: enable streamout by default on r7xx and DRM 2.17.0
Now that it's in Linus's tree.

Has anyone had a chance to test streamout on Cayman recently?
2012-06-17 18:28:32 +02:00
Christian König 92af184690 winsys/radeon: enable IB submission to compute rings v2
This allows to submit things to the compute only
rings on cayman+

v2: rebased on current master and actually make use
    of the new flag in evergreen_compute.c

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
2012-06-15 09:52:38 +02:00
Maarten Lankhorst 6bb0151f1f winsys/radeon: Remove unnecessary pipe_thread_destroy in radeon_drm_cs_destroy
Fixes crash bug introduced with 210ddf0819 fd.o #49198
pthread_detach after a pthread_join is unneeded.

Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Signed-off-by: Marek Olšák <maraeo@gmail.com>
2012-06-15 03:01:23 +02:00
Vinson Lee 5cf693266f scons: Fix SCons build infrastructure for FreeBSD.
This patch gets the FreeBSD SCons build working again. The build still
fails though.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-05-24 18:49:40 -07:00
Michel Dänzer 7446a0407d gallium/radeon: Fix r300g tiling breakage.
Commit 11f056a3f0 broke the r300g build. Fix it
up, and reinstate some code which isn't needed by r600g and radeonsi but is
by r300g.
2012-05-16 23:52:19 +02:00
Michel Dänzer 88a2e2388b radeonsi: Initial tiling support.
Largely based on the corresponding Evergreen support in r600g.
2012-05-16 18:30:50 +02:00
Michel Dänzer 11f056a3f0 r600g: Set tiling information for BOs being shared.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=48747
2012-05-16 18:30:45 +02:00
Tom Stellard d0f6274489 winsys/radeon: Get max_pipes from the kernel
Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
2012-05-02 09:39:10 -04:00
Marek Olšák 0a6120244e winsys/radeon: simplify buffer map/unmap functions
The idea is not to use pb_map and pb_unmap wrappers, calling straight
into the winsys.
2012-04-29 14:46:52 +02:00
Christoph Bumiller e44089b2f7 nvc0: add initial support for nve4+ (Kepler) chipsets
Most things that work on Fermi should work on Kepler too.

There are a few performance optimizations left to do, like better
placement of texture barriers and adding scheduling data to the
shader instructions (without them, a thread group will be masked
for 32 cycles after each single instruction issue).
2012-04-15 00:08:51 +02:00
Ben Skeggs a2fc42b899 nv30: import new driver for GeForce FX/6/7 chipsets, and Quadro variants
The primary motivation for this rewrite was to have a maintainable driver
going forward, as nvfx was quite horrible in a lot of ways.

The driver is heavily based on the design of the nv50/nvc0 3d drivers we
already have, and uses the same common buffer/fence code.  It also passes
a HEAP more piglit tests than nvfx did, supports a couple more features,
and a few more to come still probably.

The CPU footprint of this driver is far far less than nvfx, and translates
into far greater framerates in a lot of applications (unless you're using
a CPU that's way way newer than the GPUs of these generations....)

Basically, we once again have a maintained driver for these chipsets \o/

Feel free to report bugs now!
2012-04-14 02:56:34 +10:00
Christoph Bumiller 6d1cdec3ba nouveau: switch to libdrm_nouveau-2.0 2012-04-14 02:56:33 +10:00
Ben Skeggs 66c7dc5688 nvfx: completely remove this driver (GeForce FX/6/7)
This driver hasn't been maintained properly for a very long time, and for
many very good reasons.  It's horrible.

A new driver supporting these chipsets will appear with the commits that
port vieux/nv50/nvc0 to libdrm_nouveau-2.0.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-04-14 02:56:30 +10:00
Tom Stellard a75c6163e6 radeonsi: initial WIP SI code
This commit adds initial support for acceleration
on SI chips.  egltri is starting to work.

The SI/R600 llvm backend is currently included in mesa
but that may change in the future.

The plan is to write a single gallium driver and
use gallium to support X acceleration.

This commit contains patches from:
Tom Stellard <thomas.stellard@amd.com>
Michel Dänzer <michel.daenzer@amd.com>
Alex Deucher <alexander.deucher@amd.com>
Vadim Girlin <vadimgirlin@gmail.com>

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

The following commits were squashed in:

======================================================================

radeonsi: Remove unused winsys pointer

This was removed from r600g in commit:

commit 96d882939d
Author: Marek Olšák <maraeo@gmail.com>
Date:   Fri Feb 17 01:49:49 2012 +0100

    gallium: remove unused winsys pointers in pipe_screen and pipe_context

    A winsys is already a private object of a driver.

======================================================================

radeonsi: Copy color clamping CAPs from r600

Not sure if the values of these CAPS are correct for radeonsi, but the
same changed were made to r600g in commit:

commit bc1c836938
Author: Marek Olšák <maraeo@gmail.com>
Date:   Mon Jan 23 03:11:17 2012 +0100

    st/mesa: do vertex and fragment color clamping in shaders

    For ARB_color_buffer_float. Most hardware can't do it and st/mesa is
    the perfect place for a fallback.
    The exceptions are:
    - r500 (vertex clamp only)
    - nv50 (both)
    - nvc0 (both)
    - softpipe (both)

    We also have to take into account that r300 can do CLAMPED vertex colors only,
    while r600 can do UNCLAMPED vertex colors only. The difference can be expressed
    with the two new CAPs.

======================================================================

radeonsi: Remove PIPE_CAP_OUTPUT_READ

This CAP was dropped in commit:

commit 04e3240087
Author: Marek Olšák <maraeo@gmail.com>
Date:   Thu Feb 23 23:44:36 2012 +0100

    gallium: remove PIPE_SHADER_CAP_OUTPUT_READ

    r600g is the only driver which has made use of it. The reason the CAP was
    added was to fix some piglit tests when the GLSL pass lower_output_reads
    didn't exist.

    However, not removing output reads breaks the fallback for glClampColorARB,
    which assumes outputs are not readable. The fix would be non-trivial
    and my personal preference is to remove the CAP, considering that reading
    outputs is uncommon and that we can now use lower_output_reads to fix
    the issue that the CAP was supposed to workaround in the first place.

======================================================================

radeonsi: Add missing parameters to rws->buffer_get_tiling() call

This was changed in commit:

commit c0c979eebc
Author: Jerome Glisse <jglisse@redhat.com>
Date:   Mon Jan 30 17:22:13 2012 -0500

    r600g: add support for common surface allocator for tiling v13

    Tiled surface have all kind of alignment constraint that needs to
    be met. Instead of having all this code duplicated btw ddx and
    mesa use common code in libdrm_radeon this also ensure that both
    ddx and mesa compute those alignment in the same way.

    v2 fix evergreen
    v3 fix compressed texture and workaround cube texture issue by
       disabling 2D array mode for cubemap (need to check if r7xx and
       newer are also affected by the issue)
    v4 fix texture array
    v5 fix evergreen and newer, split surface values computation from
       mipmap tree generation so that we can get them directly from the
       ddx
    v6 final fix to evergreen tile split value
    v7 fix mipmap offset to avoid to use random value, use color view
       depth view to address different layer as hardware is doing some
       magic rotation depending on the layer
    v8 fix COLOR_VIEW on r6xx for linear array mode, use COLOR_VIEW on
       evergreen, align bytes per pixel to a multiple of a dword
    v9 fix handling of stencil on evergreen, half fix for compressed
       texture
    v10 fix evergreen compressed texture proper support for stencil
        tile split. Fix stencil issue when array mode was clear by
        the kernel, always program stencil bo. On evergreen depth
        buffer bo need to be big enough to hold depth buffer + stencil
        buffer as even with stencil disabled things get written there.
    v11 rebase on top of mesa, fix pitch issue with 1d surface on evergreen,
        old ddx overestimate those. Fix linear case when pitch*height < 64.
        Fix r300g.
    v12 Fix linear case when pitch*height < 64 for old path, adapt to
        libdrm API change
    v13 add libdrm check

    Signed-off-by: Jerome Glisse <jglisse@redhat.com>

======================================================================

radeonsi: Remove PIPE_TRANSFER_MAP_PERMANENTLY

This was removed in commit:

commit 62f44f670b
Author: Marek Olšák <maraeo@gmail.com>
Date:   Mon Mar 5 13:45:00 2012 +0100

    Revert "gallium: add flag PIPE_TRANSFER_MAP_PERMANENTLY"

    This reverts commit 0950086376.

    It was decided to refactor the transfer API instead of adding workarounds
    to address the performance issues.

======================================================================

radeonsi: Handle PIPE_VIDEO_CAP_PREFERED_FORMAT.

Reintroduced in commit 9d9afcb5ba.

======================================================================

radeonsi: nuke the fallback for vertex and fragment color clamping

Ported from r600g commit c2b800cf38.

======================================================================

radeonsi: don't expose transform_feedback2 without kernel support

Ported from r600g commit 15146fd1bc.

======================================================================

radeonsi: Handle PIPE_CAP_GLSL_FEATURE_LEVEL.

Ported from r600g part of commit 171be75522.

======================================================================

radeonsi: set minimum point size to 1.0 for non-sprite non-aa points.

Ported from r600g commit f183cc9ce3.

======================================================================

radeonsi: rework and consolidate stencilref state setting.

Ported from r600g commit a2361946e7.

======================================================================

radeonsi: cleanup setting DB_SHADER_CONTROL.

Ported from r600g commit 3d061caaed.

======================================================================

radeonsi: Get rid of register masks.

Ported from r600g commits
3d061caaed13b646ff40754f8ebe73f3d4983c5b..9344ab382a1765c1a7c2560e771485edf4954fe2.

======================================================================

radeonsi: get rid of r600_context_reg.

Ported from r600g commits
9344ab382a1765c1a7c2560e771485edf4954fe2..bed20f02a771f43e1c5092254705701c228cfa7f.

======================================================================

radeonsi: Fix regression from 'Get rid of register masks'.

======================================================================

radeonsi: optimize r600_resource_va.

Ported from r600g commit 669d8766ff.

======================================================================

radeonsi: remove u8,u16,u32,u64 types.

Ported from r600g commit 78293b99b2.

======================================================================

radeonsi: merge r600_context with r600_pipe_context.

Ported from r600g commit e4340c1908.

======================================================================

radeonsi: Miscellaneous context cleanups.

Ported from r600g commits
e4340c1908a6a3b09e1a15d5195f6da7d00494d0..621e0db71c5ddcb379171064a4f720c9cf01e888.

======================================================================

radeonsi: add a new simple API for state emission.

Ported from r600g commits
621e0db71c5ddcb379171064a4f720c9cf01e888..f661405637bba32c2cfbeecf6e2e56e414e9521e.

======================================================================

radeonsi: Also remove sbu_flags member of struct r600_reg.

Requires using sid.h instead of r600d.h for the new CP_COHER_CNTL definitions,
so some code needs to be disabled for now.

======================================================================

radeonsi: Miscellaneous simplifications.

Ported from r600g commits 38bf276348 and
b0337b679a.

======================================================================

radeonsi: Handle PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION.

Ported from commit 8b4f7b0672.

======================================================================

radeonsi: Use a fake reloc to sleep for fences.

Ported from r600g commit 8cd03b933c.

======================================================================

radeonsi: adapt to get_query_result interface change.

Ported from r600g commit 4445e170be.
2012-04-13 10:32:06 -04:00
Benjamin Franzke 9ba3cecaa0 st/egl: Update to the new wl_shm_pool interface 2012-04-03 20:28:20 +02:00
Marek Olšák 669d8766ff r600g: optimize r600_resource_va
Avoid calling get_radeon_bo and inline it.
2012-04-01 23:57:50 +02:00
Christian König fc0a5e21d7 vl: move winsys helper out of winsys directory
They aren't winsys of their own,
just help dealing with them.

v2: add some more comments in vl_winsys.h

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-28 15:47:41 +02:00
Marek Olšák 393d741788 r600g: enable transform feedback on everything that isn't r700
Use R700_STREAMOUT=1 if you wanna hack transform feedback on r700.
2012-03-27 21:06:59 +02:00
Christian König 63d53063f7 vl: handle DRI2GetBuffers reply with multiple buffers
This fixes a crash in XBMC, but we still doesn't see a picture.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-09 12:45:09 +01:00
Christian König 1d0c357a97 st/vdpau: implement support for high-precision output timing
Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-05 16:51:25 +01:00
Marek Olšák 6f50d3d19d winsys/radeon: cleanup includes 2012-03-05 15:31:35 +01:00
Marek Olšák 29e55bc5f1 winsys/radeon: add usage parameter to cs_is_buffer_referenced
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2012-03-05 14:22:25 +01:00
Christian König c14c84f383 vl: move dirty area handling into winsys abstraction
Fixing uninitialized areas in SwapBuffers mode.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-01 15:06:55 +01:00
Christian König 91ac681113 vl: hide X latency by using asynchronous requests
Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-01 15:06:51 +01:00
Christian König 66480c0f56 vl: use SwapBuffers instead of CopyBuffers
This should speed things up a bit, but also shows
some bugs with the kernel implementation.

v2: require xcb-dri2 version 1.8

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-01 15:06:46 +01:00
Christian König 80b40a4841 vl: rewrite vl DRI backend using XCB
v2: also set array_size of texture

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-01 14:37:44 +01:00
Christian König 15e60d9976 vl: fix a douple free in xsp winsys backend
There are a couple of more bugs, but it is only
useful for debugging anyway.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-02-27 12:57:24 +01:00
Marek Olšák 622b65d33b r600g: check for R600_STREAMOUT env var in winsys 2012-02-27 02:03:24 +01:00
Christian König 1448e829e8 vl: rework winsys interface
Throw out all the old and now unneeded stuff.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-02-25 12:14:14 +01:00
Christian König b34c35a524 vl: cleanup dri winsys abstraction
There was way to much dead code in it.

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-02-25 12:14:00 +01:00
Jerome Glisse e372e53ee0 radeon/r600g: fix virtual address space allocation
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-02-21 12:34:54 -05:00
Jerome Glisse 356eb0aadb r600g: fix tiling with cayman and virtual memory
The virtual address but follow the alignment requirement of the
tiled surface. The bo from handle case is not properly fix. Need
bigger change for a proper fix. Work around that by enforcing 1M
alignment for those bo.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-02-14 15:56:09 -05:00
Dave Airlie ff60bd8058 radeon: only init surface manage on r600
r300 fails to init the manager and then fails to init.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-07 14:20:09 +00:00
José Fonseca f763ad5130 scons: r300/r600 now depends on libdrm.
As they now indirectly include on libdrm/radeon_surface.h.
2012-02-07 11:40:58 +00:00
Jerome Glisse c0c979eebc r600g: add support for common surface allocator for tiling v13
Tiled surface have all kind of alignment constraint that needs to
be met. Instead of having all this code duplicated btw ddx and
mesa use common code in libdrm_radeon this also ensure that both
ddx and mesa compute those alignment in the same way.

v2 fix evergreen
v3 fix compressed texture and workaround cube texture issue by
   disabling 2D array mode for cubemap (need to check if r7xx and
   newer are also affected by the issue)
v4 fix texture array
v5 fix evergreen and newer, split surface values computation from
   mipmap tree generation so that we can get them directly from the
   ddx
v6 final fix to evergreen tile split value
v7 fix mipmap offset to avoid to use random value, use color view
   depth view to address different layer as hardware is doing some
   magic rotation depending on the layer
v8 fix COLOR_VIEW on r6xx for linear array mode, use COLOR_VIEW on
   evergreen, align bytes per pixel to a multiple of a dword
v9 fix handling of stencil on evergreen, half fix for compressed
   texture
v10 fix evergreen compressed texture proper support for stencil
    tile split. Fix stencil issue when array mode was clear by
    the kernel, always program stencil bo. On evergreen depth
    buffer bo need to be big enough to hold depth buffer + stencil
    buffer as even with stencil disabled things get written there.
v11 rebase on top of mesa, fix pitch issue with 1d surface on evergreen,
    old ddx overestimate those. Fix linear case when pitch*height < 64.
    Fix r300g.
v12 Fix linear case when pitch*height < 64 for old path, adapt to
    libdrm API change
v13 add libdrm check

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-02-06 18:36:37 -05:00
Marek Olšák 4fd97b46a0 r600g: remove unused flush code 2012-01-31 23:12:30 +01:00
Christian König d36f89c8cf vl: fix some missing prototypes error
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45444
Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-01-31 17:12:05 +01:00
Jerome Glisse bb1f0cf350 r600g: add support for virtual address space on cayman v11
Virtual address space put the userspace in charge of their GPU
address space. It's up to userspace to bind bo into the virtual
address space. Command stream can them be executed using the
IB_VM chunck.

This patch add support for this configuration. It doesn't remove
the 64K ib size limit thought this limit can be extanded up to
1M for IB_VM chunk.

v2: fix rendering
v3: fix rendering when using index buffer
v4: make vm conditional on kernel support add basic va management
v5: catch the case when we already have va for a bo
v6: agd5f: update on top of ioctl changes
v7: agd5f: further ioctl updates
v8: indentation cleanup + fix non cayman
v9: rebase against lastest mesa + improvement from Marek & Michel
v10: fix cut/paste bug
v11: don't rely on updated radeon_drm.h

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-13 18:00:53 -05:00
Jakob Bornecrantz ca21c85ab0 svga: Drop execbuf throttling
This code isn't used anymore in preference for DRI2 client side swap buffers
throttling or throttling done inside the xa or xorg driver.

Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by Brian Paul <brianp@vmware.com>
2012-01-10 16:59:45 +01:00
Jakob Bornecrantz f700370946 svga: Silence warning
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by Brian Paul <brianp@vmware.com>
2012-01-10 16:59:44 +01:00
Jerome Glisse b82a2a848c radeon/winsys: fix get info ioctl error checking
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-01-09 14:59:56 -05:00
Marek Olšák 93f4e3cb6c winsys/radeon: move managing GEM domains back to drivers
This partially reverts commit 363ff84475.

It caused severe performance drops in Nexuiz. Reported by Phoronix.

Tested by me on r300g and by IRC people on r600g.
2011-12-24 21:28:43 +01:00
Marcin Slusarz 10e931219f nouveau: get rid of winsys object
Its only purpose was to destroy itself.
2011-12-13 21:06:29 +01:00
Marek Olšák 41b75dc92c winsys/radeon: add flush option not to rewrite tiling flags in registers
Not used yet.
2011-12-13 18:41:17 +01:00
Tobias Droste e809f4e54c g3dvl/xlib: fix build by changing include order
fixes the following build error since
c83fb4d45f2a47042f395271efe6e5489b2c4aee:

/usr/include/strings.h:46:13: error: expected declaration specifiers or
‘...’ before numeric constant
/usr/include/strings.h:46:13: error: conflicting types for ‘memset’
In file included from
../../../../src/gallium/winsys/g3dvl/xlib/xsp_winsys.c:34:0:
../../../../src/gallium/auxiliary/util/u_inlines.h: In function
‘pipe_buffer_create’:
../../../../src/gallium/auxiliary/util/u_inlines.h:189:4: error: too
many arguments to function ‘memset’
/usr/include/strings.h:46:13: note: declared here

bzero is defined in X11 as: #define bzero(b,len) memset(b,0,len)
including strings.h after the X11 header results in preprocessor
replacing 'bzero' in strings.h and generating unbuildable code.

Signed-off-by: Tobias Droste <tdroste@gmx.de>
2011-12-11 01:03:20 -05:00
Jerome Glisse bbc320a94d gallium/radeon: fix indentation
Indentation cleanup, to keep consistency.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2011-12-05 18:40:53 -05:00
Kai Wasserbäch 2c27f204f1 i965g: Delete this driver.
Never completed, and no plans to do so.

Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
2011-11-29 15:44:09 +00:00
Chia-I Wu 75cc24c876 android: add support for ICS
With ICS (Android 4.0), several headers and structs are renamed.  Define
ANDROID_VERSION so that we can choose a different path depending on the
platform version.

I've tested only softpipe and llvmpipe.  r600g is also reported to work.
2011-11-25 12:34:33 +08:00
Ben Skeggs 4517153278 nvc0: add support for GF119 (NVD9)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-17 10:17:06 +10:00
Brian Paul 3da5196263 radeon: silence initializer warnings 2011-11-10 16:00:46 -07:00
George Sapountzis 721669d078 dri: drop DRI_VALIDATE macros 2011-11-04 23:33:03 +02:00
Marek Olšák ef64da8f01 winsys/radeon: don't use the new GEM_WAIT ioctl for now 2011-10-24 20:01:14 +02:00
Mathias Fröhlich 2717b8f034 winsys/radeon: restore the old r600g winsys memory characteristics.
Use VRAM for static and immutable buffers. This restores the
recently removed r600g winsys behaviour for memory locations.
This also improoves rendering times on the gpu for some
OpenSceneGraph based test cases by about 15%.

Signed-off-by: Marek Olšák <maraeo@gmail.com>
2011-10-24 18:20:07 +02:00
Thomas Hellstrom 60f67cd1f1 winsys/svga: Remove some unneeded debug code
This code isn't really relevant since the kernel takes care not
to destroy busy GMR buffers.

Also with the advent of fence objects, the code was incorrect since
it didn't refcount fence handles.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-10-19 15:33:26 +02:00
Thomas Hellstrom 5dddeb7776 winsys/svga: Rework buffer allocation to make it more robust v2.
Don't allow any "CPU" buffers to be allocated by the pb_fenced
buffer manager, since we can't protect against failures during
buffer validation.
Also, add an extra slab buffer manager to allocate buffers from
the kernel if there is a failure to allocate from our big buffer pool.
The reason we use a slab manager for this, is to avoid allocating
many very small buffers from the kernel.

v2: Increased VMW_MAX_BUFFER_SIZE and fixed some comments.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-10-14 09:53:19 +02:00
Thomas Hellstrom 5a6ca7e9f2 svga/winsys: Make sure a flush always inserts and returns a fence if requested
Needed for throttling.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrant <jakob@vmware.com>
2011-10-14 09:53:01 +02:00
Stéphane Marchesin 3db309aece configure: replace pkg-config calls with $(PKG_CONFIG) in the makefiles.
Us poor souls who cross compile mesa want to be able to specify which pkg-config to pick, or at least just change one place.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2011-10-04 11:19:48 -07:00
Marek Olšák bf0baa7717 r600g: move all files from winsys/r600 into drivers/r600
Be sure to reconfigure after this commit.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-09-30 23:19:52 +02:00
Marek Olšák 363ff84475 winsys/radeon: move GEM domains out of the drivers into winsys
The drivers don't need to care about the domains. All they need to set
are the bind and usage flags. This simplifies the winsys too.

This also fixes on r600g:
- fbo-depth-GL_DEPTH_COMPONENT32F-copypixels
- fbo-depth-GL_DEPTH_COMPONENT16-copypixels
- fbo-depth-GL_DEPTH_COMPONENT24-copypixels
- fbo-depth-GL_DEPTH_COMPONENT32-copypixels
- fbo-depth-GL_DEPTH24_STENCIL8-copypixels
I can't explain it.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-09-30 23:19:52 +02:00
Marek Olšák af8eb5c851 winsys/radeon: remove a redundant parameter 'size' from buffer_from_handle
It's part of pb_buffer already.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-09-30 23:19:52 +02:00
Marek Olšák 90ce3cdde9 r600g: remove struct radeon (or what's left of it)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-09-30 23:19:52 +02:00
Marek Olšák 518557d74a r600g: move family and chip_class from struct radeon to r600_screen
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-09-30 23:19:52 +02:00
Marek Olšák 6101b6d442 r600g: merge r600_bo with r600_resource
I have moved 'last_flush' and 'binding' from r600_bo to winsys/radeon.
The other members are now part of r600_resource.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-09-30 23:19:52 +02:00
Thomas Hellstrom e7843273fa winsys/svga: Update to vmwgfx kernel module 2.1
Introduces fence objecs and a size limit on query buffers.
The possibility to map the fifo from user-space is gone, and
replaced by an ioctl that reads the 3D capabilities.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecranz <jakob@vmware.com>
2011-09-29 20:24:57 +02:00
Marek Olšák a3cd2c6c9b winsys/radeon: remove redundant member radeon_bo::size
It's part of pb_buffer already.
2011-09-29 01:10:18 +02:00
Marek Olšák 798ebc91eb winsys/radeon: simplify updating GEM domains for relocations 2011-09-29 01:10:12 +02:00
Marek Olšák bfa51dfeac winsys/radeon: simplify passing GEM domains through to GEM_CREATE 2011-09-29 01:10:07 +02:00
Marek Olšák 4b1e7cf5d9 r600g: convert if (query->type) into switch statements 2011-09-29 01:07:30 +02:00
Marek Olšák 34f4bd8190 winsys/radeon: use the cache bufmgr for buffers with PIPE_BIND_CUSTOM
so that we don't abuse PIPE_BIND_VERTEX_BUFFER all the time.
2011-09-16 17:25:12 +02:00
Michel Dänzer 373234ce17 r600g: Initialize multi VGT related register on Cayman.
Prevents lockups with piglit tests draw-elements and draw-vertices using large
numbers of vertices.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alex.deucher@amd.com>
2011-09-14 18:40:16 +02:00
Marek Olšák 8dbf9d70d3 r600g: fix typo in "r600g: simplify deducing chip family" 2011-09-13 13:09:17 +02:00
Marek Olšák ac028b20e5 r600g: set the return type of radeon_destroy to void 2011-09-12 22:03:03 +02:00
Marek Olšák b87bc2eb44 r600g: remove r600_drm_public.h 2011-09-12 22:03:03 +02:00
Marek Olšák 1a532ca79a r600g: inline some of the winsys r600_get functions 2011-09-12 22:03:03 +02:00
Marek Olšák 915227b0aa r600g: simplify deducing chip family 2011-09-12 22:03:03 +02:00
Marek Olšák 3603d15788 r600g: compute tiling info in the pipe, not in the winsys
The winsys doesn't need it.
2011-09-12 22:03:02 +02:00
Marek Olšák a94e33a8ef r600g: remove unused ioctl definitions 2011-09-12 22:03:02 +02:00
Marek Olšák d26b49f87f r600g: do not loop in radeon_family_from_device
Also move that function to r600_drm.c
2011-09-12 22:03:02 +02:00
Marek Olšák 85f5d7ceee r600g: cleanup build include dirs and dependencies
The scons build still depended on libdrm_radeon.
2011-09-12 22:03:02 +02:00
Marek Olšák 4682e70601 pb_buffer: inline 'base' sub-struct 2011-09-11 18:29:27 +02:00
Maarten Lankhorst 210ddf0819 winsys/radeon: Create async thread only once
I noticed that a thread was created for every time async flush was called, so I moved it and used some semaphores to synch.

Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Signed-off-by: Christian König <deathsimple@vodafone.de>
2011-08-30 14:01:57 +02:00
Kai Wasserbäch d4e8f38477 winsys/g3dvl: Fix include style
As explained in the thread starting at [0], the internal include style
should be »#include "path/to/header.h"« for non-system includes.

[0]
<http://news.gmane.org/find-root.php?message_id=%3c4E5802BE.6020206%40vmware.com%3e>

Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-08-29 08:03:06 -06:00
Chia-I Wu 534df79187 android: add support for nouveau
Compile tested only.
2011-08-27 17:29:13 +08:00
Chia-I Wu 99be968e99 android: add support for i915g
Quickly tested with 945GME.  SurfaceFlinger (the display server and
compositor) works.  2D apps with RGB or RGBA visuals work.  As for 3D
apps, some work and some do not.
2011-08-27 17:29:09 +08:00
Chia-I Wu 04dbb37eaa android: add support for vmwgfx
Quickly tested with VMWare Workstation 7.1.4 on Linux with GeForce
GT220.  SurfaceFlinger (the display server and compositor) works.  2D
apps with RGB visual works.  However, due to missing
PIPE_FORMAT_R8G8B8A8_UNORM support, those with RGBA visual do not.
2011-08-27 17:28:32 +08:00
Chia-I Wu 0cc0889007 winsys/i915: share the source list
Factor out C_SOURCES from Makefile to Makefile.sources, and let Makefile
and SConscript share it.
2011-08-27 17:28:32 +08:00
Chia-I Wu f9b55e23af winsys/svga: share the source list
Factor out C_SOURCES from Makefile to Makefile.sources, and let Makefile
and SConscript share it.
2011-08-27 17:28:32 +08:00
Chia-I Wu 7b1972d7be android: add support for r600g
Tested with a Radeon HD 6250.  SurfaceFlinger (the display server and
compositor) works.  2D apps with RGB or RGBA visuals work.  As for 3D
apps, some work but some don't (with serious rendering defects).

Reviewed-by: Marek Olšák <maraeo@gmail.com>
2011-08-25 08:54:16 +08:00
Chia-I Wu 689b45fb27 winsys/radeon: share the source list
Factor out C_SOURCES from Makefile to Makefile.sources, and let
Makefile and SConscript share it.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
2011-08-25 08:54:16 +08:00
Chia-I Wu 027a45e5cf winsys/r600: share the source list
Factor out C_SOURCES from Makefile to Makefile.sources, and let
Makefile and SConscript share it.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
2011-08-25 08:54:16 +08:00
Chia-I Wu 1284d5b255 winsys/svga: use os_mmap() for memory mapping
os_mmap() guarantees large file support across OSes.
2011-08-24 10:57:12 +08:00
Chia-I Wu 70b1837dfb winsys/radeon: use os_mmap() for memory mapping
os_mmap() guarantees large file support across OSes.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
2011-08-24 10:57:12 +08:00
Chia-I Wu 9650483acd winsys/sw/android: use HAL formats
Native buffers use HAL formats, not UI formats.
2011-08-21 02:01:49 +08:00
Chia-I Wu f496d8b86d winsys/sw/android: set bo usage correctly
Since this is the software path, set GRALLOC_USAGE_SW_WRITE_OFTEN when
PIPE_BIND_RENDER_TARGET, and set GRALLOC_USAGE_SW_READ_OFTEN when
PIPE_BIND_SAMPLER_VIEW.
2011-08-21 02:01:49 +08:00
Chia-I Wu 15576344f7 android: build android sw winsys
This builds the static library libmesa_winsys_sw_android from winsys/sw.
2011-08-21 02:01:49 +08:00
Chia-I Wu 8e54c47a61 winsys/android: new SW winsys for Android
On Android, color buffers are passed between server and clients as
opaque buffer_handle_t.  This winsys makes use of gralloc, which
provides a generic way to map and unmap buffer_handle_t for CPU access.
2011-08-21 02:01:48 +08: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
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
Marek Olšák 1554e69e00 winsys/radeon: disable use of the buffer busy-for-write flag 2011-08-06 05:45:19 +02:00
Marek Olšák 5b005ecc2b winsys/radeon: do the CS cleanup in the CS ioctl thread 2011-08-05 07:08:18 +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
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 2664980760 winsys/radeon: remove dummy function pb_buffer 2011-08-03 01:18:10 +02: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 f170555a18 winsys/radeon: fix typos in the driver interface 2011-07-25 23:10:40 +02:00
Marek Olšák 533e228923 winsys/radeon: manage constant buffers by the cache bufmgr too 2011-07-25 23:10:40 +02:00
Marek Olšák 7db148d3a5 winsys/radeon: remove usage parameter from buffer_create 2011-07-25 23:10:40 +02:00
Marek Olšák e22a1005c0 winsys/radeon: fix int->boolean conversion in radeon_bo_is_referenced_by_any_cs 2011-07-25 23:10:40 +02:00
Marek Olšák 67c995e0f1 winsys/radeon: little change in radeon_bo_is_referenced_by_cs 2011-07-25 23:10:40 +02:00
Marek Olšák ce9daf6f0b winsys/radeon: add R300 infix to winsys feature names 2011-07-25 23:10:39 +02:00
Marek Olšák 28a336dc38 winsys/radeon: simplify how value queries work
This drops the get_value query and adds a function query_info, which returns
all the values in one nice structure.
2011-07-25 23:10:39 +02:00
Vadim Girlin 9b3ec69cf4 r600g: fix corner case checks for the queries 2011-07-18 08:53:47 -04:00
Henri Verbeet 3093cbaad9 r600g: Get rid of leftover PB_USAGE_* flags.
These happen to work because their values are the same as the equivalent
PIPE_TRANSFER_* flags, but it's still misleading.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
2011-07-18 01:36:07 +02:00
Marek Olšák 036fb07908 r600g: print to stderr that a CS has been rejected by the kernel
Just fixing the warning that r is unused.
2011-07-15 21:48:29 +02:00
Vadim Girlin ef29bfee03 r600g: fix queries and predication
Use all zpass data for predication instead of the last block only.
Use query buffer as a ring instead of reusing the same area
for each new BeginQuery. All query buffer offsets are in bytes
to simplify offsets math.
2011-07-15 15:42:46 -04:00
Christian König ed24e19070 Merge branch 'pipe-video' 2011-07-13 22:56:06 +02:00
Stéphane Marchesin 85e1fa5506 i915g: don't try to check if a NULL buffer is busy. 2011-07-13 11:59:10 -07:00
Christian König a2a6799fbe [g3dvl] remove some unneeded Makefiles 2011-07-13 19:37:28 +02:00
Christian König c8dd301b6f r600g: revert "set BLEND_CLAMP depending on clamp_fragment_color"
BLEND_CLAMP doesn't seems to be the right way to implement "ARB_color_buffer_float".
2011-07-13 15:54:28 +02:00
Alex Deucher 5d0d8366f9 r600g: emit SQ_LDS_RESOURCE_MGMT
Need to be initialized to a reasonable value as
compute code may change it.

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

NOTE: This is a candidate for the 7.11 branch.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-07-12 12:01:25 -04:00
Christian König f919547f37 Merge remote-tracking branch 'origin/master' into pipe-video
Conflicts:
	src/gallium/drivers/r600/r600_pipe.c
	src/gallium/drivers/r600/r600_state_inlines.h
2011-07-11 10:48:59 +02:00
Marek Olšák dc9d789d1b r600g: more valgrind fixes 2011-07-11 04:13:35 +02:00
Marek Olšák daf6604435 r600g: zero memory of ioctl parameters
Fixes valgrind warning.
2011-07-11 04:01:06 +02:00
Henri Verbeet 2e53725bbc r600g: Check for Evergreen chip class instead of Cedar family in r600_context_flush().
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
2011-07-09 18:12:50 +02:00
Christian König 3ed8182c76 [g3dvl] stop calling dri2DestroyDrawable
When switching channels with xine it sometimes happens that xine
destroys the drawable before we get a chance to call
DRI2DestroyDrawable, resulting in an x error.
2011-07-09 00:00:10 +02:00
Christian König ea78480029 [g3dvl] and finally remove pipe_video_context 2011-07-08 19:22:43 +02:00