aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/evergreen_compute.c
Commit message (Collapse)AuthorAgeFilesLines
* r600: use radeon_emit in a few more places in evergreen_computeDave Airlie2016-04-071-4/+4
| | | | | | | | This is just a cleanup of the code. Acked-by: Tom Stellard <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600: make compute global buffer functions static.Dave Airlie2016-04-071-86/+86
| | | | | | | | | This moves things around so that the global buffer handling functions in evergreen_compute.c are static. Acked-by: Tom Stellard <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600: make two compute functions static.Dave Airlie2016-04-071-3/+3
| | | | | | | | These aren't used outside evergreen_compute.c Acked-by: Tom Stellard <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600: using pipe_grid_info more in evergreen_compute.Dave Airlie2016-04-071-25/+21
| | | | | | | | | No reason to pull the pieces apart here, also make one of the functions static as it's unused outside this. Acked-by: Tom Stellard <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600: in evergreen_compute use ctx consistently instead of ctx_Dave Airlie2016-04-071-25/+25
| | | | | | Acked-by: Tom Stellard <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600: use rctx consistently in evergreen_compute.cDave Airlie2016-04-071-74/+74
| | | | | | | | Another step towards cleaning this up. Acked-by: Tom Stellard <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600: cleanup whitespace in evergreen_compute.cDave Airlie2016-04-071-87/+75
| | | | | | | | | | This aligns the code with the style of the rest of the driver. Makes editing it a lot less painful. Acked-by: Tom Stellard <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* r600g: remove TGSI->LLVM translationMarek Olšák2016-03-201-2/+63
| | | | | | | | | | It was useful for testing and as a prototype for radeonsi bringup, but it's not used anymore and doesn't support OpenGL 3.3 even. v2: try to fix OpenCL build Reviewed-by: Nicolai Hähnle <[email protected]> Tested-by: Jan Vesely <[email protected]>
* r600g: remove support for DRM < 2.12.0Marek Olšák2016-03-011-15/+6
|
* gallium: add a new interface for pipe_context::launch_grid()Samuel Pitoiset2016-02-131-8/+7
| | | | | | | | | | | | | This introduces pipe_grid_info which contains all information to describe a launch_grid call. This will be used to implement indirect compute in the same fashion as indirect draw. Changes from v2: - correctly initialize pipe_grid_info for nv50/nvc0 Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* gallium/radeon: drop support for LLVM 3.5Marek Olšák2016-02-111-75/+0
| | | | | | Reviewed-by: Nicolai Hähnle <[email protected]> v2: adjust the comment in the amdgpu winsys
* r600, compute: Do not overwrite pipe_resource.screenJan Vesely2016-02-051-1/+1
| | | | | | | found by inspection. Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: rename & reorder members of radeon_infoMarek Olšák2016-02-051-1/+1
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* r600,compute: Plug few memory leaksJan Vesely2016-01-261-3/+21
| | | | | | | | | | | v2: drop inline keyword drop radeon_llvm_dispose_kernel_module wrapper v3: move definitions to .c file use in radeonsi Signed-off-by: Jan Vesely <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* r600: Typos and whitespace fixesJan Vesely2016-01-261-3/+3
| | | | | | Signed-off-by: Jan Vesely <[email protected]> Signed-off-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: pass pipe_debug_callback into radeon_llvm_compile (v2)Nicolai Hähnle2016-01-021-1/+1
| | | | | | | This will allow us to send shader debug info via the context's debug callback. Reviewed-by: Edward O'Callaghan <[email protected]> (v1) Reviewed-by: Marek Olšák <[email protected]>
* gallium/radeon: remove radeon_winsys_cs_handleMarek Olšák2015-12-111-2/+2
| | | | | | | | "radeon_winsys_cs_handle *cs_buf" is now equivalent to "pb_buffer *buf". Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* r600/eg: workaround bug with tess shader and dynamic GPRs.Dave Airlie2015-12-071-1/+5
| | | | | | | | | | | | When using tessellation on eg/ni chipsets, we must disable dynamic GPRs to workaround a hw bug where the GPU hangs when too many things get queued. This implements something like the r600 code to emit the transition between static and dynamic GPRs, and to statically allocate GPRs when tessellation is enabled. Signed-off-by: Dave Airlie <[email protected]>
* gallium/radeon*: Remove useless castsEdward O'Callaghan2015-12-061-2/+2
| | | | | | | | These are unnecessary and are likely just left overs from prior work. Signed-off-by: Edward O'Callaghan <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* r600: add missing register to initial stateDave Airlie2015-11-301-1/+1
| | | | | | | | | | We really should initialise HS/LS_2 and SQ_LDS_ALLOC exists on all evergreen not just cayman, so we should initialise it as well. Reviewed-by: Glenn Kennard <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallium/radeon: inline the r600_rings structureMarek Olšák2015-11-131-7/+7
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: tell the winsys the exact resource binding typesMarek Olšák2015-10-031-2/+2
| | | | | | | Use the priority flags and expand them. This information will be used for debugging. Reviewed-by: Michel Dänzer <[email protected]>
* gallium/radeon: rename r600_context_bo_reloc -> radeon_add_to_buffer_listMarek Olšák2015-09-011-2/+2
| | | | | | | this name should be easy to understand without other knowledge Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]>
* gallium/radeon: rename write_*_reg functionsMarek Olšák2015-09-011-10/+10
| | | | | | | | e.g. radeon_set_context_reg is nicer and looks consistent next to radeon_emit(). Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]>
* r600,compute: setup compute sampler states and viewsZoltan Gilian2015-08-141-19/+6
| | | | | | | | v2: Add compute mode flag to sampler state setup (Marek). Drop branches which avoid reference counting (Marek). Simplify unset branch condition (Marek). Reviewed-by: Marek Olšák <[email protected]>
* gallium/radeon: use helper functions to mark atoms dirtyGrazvydas Ignotas2015-08-111-1/+1
| | | | | | | | | | This is analogous to r300_mark_atom_dirty() used by r300, and will be used by later patches. For common radeon code, appropriate helper is called through a function pointer. No functional changes. Signed-off-by: Marek Olšák <[email protected]>
* radeonsi: store shader disassemblies in memory for future usersMarek Olšák2015-07-311-1/+1
| | | | | This will be used by the new ddebug pipe. I'm including it now to avoid conflicts with other patches.
* util: Move gallium's linked list to utilJason Ekstrand2015-05-081-1/+1
| | | | | | | | | The linked list in gallium is pretty much the kernel list and we would like to have a C-based linked list for all of mesa. Let's not duplicate and just steal the gallium one. Acked-by: Connor Abbott <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* r600g: Fix build with opencl and radeonsi disabledTom Stellard2014-10-311-6/+6
|
* r600g/compute: Enable PIPE_SHADER_IR_NATIVE for compute shaders v2Tom Stellard2014-10-311-66/+101
| | | | | v2: - Drop dependency on LLVM >= 3.5.1
* r600g/compute: Don't initialize vertex_buffer_state masks to 0x2Tom Stellard2014-08-211-3/+0
| | | | | | | | | | | | | | cs_vertex_buffer_state.enabled_mask and cs_vertex_buffer_state.dirty_mask are both updated when r600_set_constant_buffer() is called, so we don't need to manually update these values. This fixes a crash with OpenCL programs that have a kernel with no arguments. https://bugs.freedesktop.org/show_bug.cgi?id=82671 CC: "10.2" <[email protected]>
* r600g/compute: Use the first parameter in evergreen_set_global_binding()Tom Stellard2014-08-211-2/+3
|
* r600g/compute: fix compile warningsMarek Olšák2014-08-091-1/+2
| | | | Trivial.
* r600g: use gpu_address from r600_resourceMarek Olšák2014-08-091-4/+1
| | | | | Reviewed-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* r600g/compute: Fix singed/unsigned comparison compiler warnings.Jan Vesely2014-07-251-7/+7
| | | | | | | The iteration variables go from 0 anyway. Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* Revert "r600g/compute: Fix warnings"Tom Stellard2014-07-231-1/+1
| | | | | | This reverts commit 467f1585e28adba0e94ef593de131bc327f098bb. This breaks the build on some systems.
* r600g/compute: Fix warningsTom Stellard2014-07-231-1/+1
|
* r600g/compute: Defer the creation of the temporary resourceBruno Jiménez2014-06-241-5/+12
| | | | | | | | | | | | | | | For the first use of a buffer, we will only need the temporary resource in the case that a user wants to write/map to this buffer. But in the cases where the user creates a buffer to act as an output of a kernel, then we were creating an unneeded resource, because it will contain garbage, and would be copied to the pool, and destroyed when promoting. This patch avoids the creation and copies of resources in this case. Reviewed-by: Tom Stellard <[email protected]>
* r600g/compute: Handle failures in compute_memory_pool_finalizeJan Vesely2014-06-241-1/+4
| | | | | Reviewed-by: Bruno Jiménez <[email protected]> Signed-off-by: Jan Vesely <[email protected]>
* r600g/compute: Map only against intermediate buffersBruno Jiménez2014-06-201-6/+4
| | | | | | | | | | | | With this we can assure that mapped buffers will never change its position when relocating the pool. This patch should finally solve the mapping bug. v2: Use the new is_item_in_pool util function, as suggested by Tom Stellard Reviewed-by: Tom Stellard <[email protected]>
* r600g/compute: Add statuses to the compute_memory_itemsBruno Jiménez2014-06-201-0/+12
| | | | | | | | | | These statuses will help track whether the items are mapped or if they should be promoted to or demoted from the pool v2: Use the new is_item_in_pool util function, as suggested by Tom Stellard Reviewed-by: Tom Stellard <[email protected]>
* r600g/compute: Add an intermediate resource for OpenCL buffersBruno Jiménez2014-06-201-5/+13
| | | | | | | | | | | | | | | | | | | This patch changes completely the way buffers are added to the compute_memory_pool. Before this, whenever we were going to map a buffer or write to or read from it, it would get placed into the pool. Now, every unallocated buffer has its own r600_resource until it is allocated in the pool. NOTE: This patch also increase the GPU memory usage at the moment of putting every buffer in it's place. More or less, the memory usage is ~2x(sum of every buffer size) v2: Cleanup v3: Use temporary variables to avoid so many castings in functions, as suggested by Tom Stellard Reviewed-by: Tom Stellard <[email protected]>
* r600g/compute: Use %u as the unsigned formatBruno Jiménez2014-06-101-1/+1
| | | | | | | This fixes an issue when running cl-program-bitcoin-phatk piglit test where some of the inputs have negative values Reviewed-by: Tom Stellard <[email protected]>
* gallium/radeon: create and return a fence in the flush functionMarek Olšák2014-04-161-2/+2
| | | | | | All flush functions get a fence parameter. cs_create_fence is removed. Reviewed-by: Christian König <[email protected]>
* r600g,radeonsi: set priorities for relocationsMarek Olšák2014-03-111-2/+4
|
* r600g: remove r600_resource.hMarek Olšák2014-02-251-1/+0
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* clover: Pass buffer offsets to the driver in set_global_binding() v3Tom Stellard2014-02-241-1/+6
| | | | | | | | | | | | | | | The offsets will be stored in the handles parameter. This makes it possible to use sub-buffers. v2: - Style fixes - Add support for constant sub-buffers - Store handles in device byte order v3: - Use endian helpers Reviewed-by: Francisco Jerez <[email protected]>
* r600g/compute: Emit DEALLOC_STATE on cayman after dispatching a compute shader.Tom Stellard2014-01-271-1/+8
| | | | | | | | | | | | This is necessary to prevent the next SURFACE_SYNC packet from hanging the GPU. https://bugs.freedesktop.org/show_bug.cgi?id=73418 Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Alex Deucher <[email protected]> CC: "9.2" "10.0" <[email protected]>
* r600/compute: Use the correct FREE macro when deleting compute stateAaron Watry2013-12-231-1/+1
| | | | | | Reviewed-by: Tom Stellard <[email protected]> CC: "10.0" <[email protected]>
* r600/compute: Free compiled kernels when deleting compute stateAaron Watry2013-12-231-0/+2
| | | | | | v2: Remove unnecessary null pointer check CC: "10.0" <[email protected]>