summaryrefslogtreecommitdiffstats
path: root/src/amd
Commit message (Collapse)AuthorAgeFilesLines
* radv: keep track of the disasm string in debug mode onlySamuel Pitoiset2017-09-082-1/+9
| | | | | | | | This will allow to dump the active shaders when a hang is detected. Only the ASM will be dumped for now. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add shader_variant_create() helper functionSamuel Pitoiset2017-09-081-58/+56
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: drop 'dump' parameters from some shader related functionsSamuel Pitoiset2017-09-083-22/+19
| | | | | | | The device object contains the debug flags. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: move shaders related code to radv_shader.cSamuel Pitoiset2017-09-0811-523/+642
| | | | | | | | Reduce size of radv_pipeline.c and improve code isolation. More code can probably moved but it's a start. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: fix error code when initializing the push descriptorsSamuel Pitoiset2017-09-081-1/+1
| | | | | | | malloc() failures are unrelated to the device memory. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: do not update vertex descriptors if the allocation failedSamuel Pitoiset2017-09-081-4/+8
| | | | | | | | A return code error is stored in the command buffer and should be returned to the user via EndCommandBuffer(). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add radv_vertex_elements_info data structureSamuel Pitoiset2017-09-083-18/+26
| | | | | | | In my opinion, this improves code readability. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add an assertion when pushing meta descriptor setsSamuel Pitoiset2017-09-081-0/+1
| | | | | | | | Just to make sure we are using the set 0, because it's the only one which is saved/restored when doing meta operations. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: remove bitcast_to_float()Connor Abbott2017-09-081-16/+2
| | | | | | ac_to_float() does a superset of what it does. Signed-off-by: Dave Airlie <[email protected]>
* ac: move ac_to_integer() and ac_to_float() to ac_llvm_build.cConnor Abbott2017-09-083-162/+172
| | | | | | We'll need to use ac_to_integer() for other stuff in ac_llvm_build.c. Reviewed-by: Dave Airlie <[email protected]>
* ac: fix ac_get_type_size() for doublesConnor Abbott2017-09-081-0/+1
| | | | Reviewed-by: Dave Airlie <[email protected]>
* radv/ac: use ac_get_type_size.Dave Airlie2017-09-081-23/+3
| | | | | | Just moved to newly shared code. Signed-off-by: Dave Airlie <[email protected]>
* radeonsi: move the guts of ARB_shader_group_vote emission to acConnor Abbott2017-09-082-0/+36
| | | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeonsi: move si_emit_ballot() to acConnor Abbott2017-09-082-0/+29
| | | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeonsi: move emit_optimization_barrier() to acConnor Abbott2017-09-082-0/+45
| | | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeonsi: move llvm_get_type_size() to acConnor Abbott2017-09-082-0/+26
| | | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/winsys: fix flags vs va_flags thinko.Dave Airlie2017-09-081-1/+1
| | | | | Fixes: e8d57802f (radv/gfx9: allocate events from uncached VA space) Signed-off-by: Dave Airlie <[email protected]>
* radv: use simpler indirect packet 3 if possible.Dave Airlie2017-09-071-14/+23
| | | | | | | | This fixes some observed hangs on CIK GPUs. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/gfx9: allocate events from uncached VA spaceDave Airlie2017-09-073-3/+8
| | | | | | | | | | | | This copies what amdgpu-pro does, and allocates the memory for an event with an uncached mtype. This fixes hangs with: dEQP-VK.api.command_buffers.record_simul_use_primary Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/winsys: use amdgpu_bo_va_op_raw.Dave Airlie2017-09-071-7/+24
| | | | | | | | | | This is a precursor to the gfx9 fix to use uncached for the event memory. Move to the interface which allows setting the flags, but wrap it to avoid having to copy it around the place. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac/surface: add radeon_surf::has_stencil for convenienceMarek Olšák2017-09-073-3/+6
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radv: do not use a bitfield when dirtying the vertex buffersSamuel Pitoiset2017-09-072-3/+4
| | | | | | | | Useless to track which one has been updated because we re-upload all the vertex buffers in one shot. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: remove unused radv_meta_saved_state::vertex_saved fieldSamuel Pitoiset2017-09-072-8/+0
| | | | | | | It's always false. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/surface: reduce gfx9_surface_layout size.Dave Airlie2017-09-071-2/+3
| | | | | | 152->144. Signed-off-by: Dave Airlie <[email protected]>
* radv: reduce radv_amdgpu_winsys struct size.Dave Airlie2017-09-071-3/+3
| | | | | | 1168->1160. Signed-off-by: Dave Airlie <[email protected]>
* radv: reduce radv_image struct size.Dave Airlie2017-09-071-3/+2
| | | | | | 1480->1472. Signed-off-by: Dave Airlie <[email protected]>
* radv: reduce radv_shader_variant struct size.Dave Airlie2017-09-071-1/+1
| | | | | | 544->536 Signed-off-by: Dave Airlie <[email protected]>
* radv: reduce radv_cmd_state struct size.Dave Airlie2017-09-071-2/+2
| | | | | | 1632->1624. Signed-off-by: Dave Airlie <[email protected]>
* radv: reduce meta_saved_state struct size.Dave Airlie2017-09-071-4/+3
| | | | | | 904->896. Signed-off-by: Dave Airlie <[email protected]>
* radv: fix error code when resizing the upload BOSamuel Pitoiset2017-09-061-1/+1
| | | | | | | malloc() failures are unrelated to the device memory. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/debug: take ASIC generation into account when printing registersNicolai Hähnle2017-09-062-107/+177
| | | | | | | | | | | There were some overlapping changes in gfx9 especially in the CB/DB blocks which made register dumps rather misleading. The split is along the lines of the header files, so we'll print VI-only fields on SI and CI, for example, but we won't print GFX9 fields on SI/CI/VI, and we won't print SI/CI/VI fields on GFX9. Acked-by: Marek Olšák <[email protected]>
* amd/common: pass chip_class to ac_dump_regNicolai Hähnle2017-09-062-45/+45
| | | | Acked-by: Marek Olšák <[email protected]>
* ac/sid_tables: add FieldTable objectNicolai Hähnle2017-09-061-30/+85
| | | | | | | | Automatically re-use table entries like StringTable and IntTable do. This allows us to get rid of the "fields_owner" logic, and simplifies the next change. Acked-by: Marek Olšák <[email protected]>
* ac/sid_tables: remove unused variable varname_valuesNicolai Hähnle2017-09-061-1/+0
| | | | Acked-by: Marek Olšák <[email protected]>
* Revert "radv: disable support for VEGA for now."Dave Airlie2017-09-061-5/+0
| | | | | | | | | | | | This reverts commit 611076a41aac3095a82dff2432943d7f8d429822. With the two previous commits, vega shouldn't be unstable, doesn't pass CTS, but can do a complete run, and games shouldn't hang anymore, so bring it back online. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/gfx9: set descriptor up for base_mip to level range.Dave Airlie2017-09-061-1/+4
| | | | | | | | | | This is required on GFX9, fixes a bug in Talos where all the mipmaps overlay each other. Just pushing this as well as it fixes Talos. Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: disable 1d/2d linear optimisation on gfx9.Dave Airlie2017-09-061-3/+4
| | | | | | | | | | | | | This causes hangs in some of the CTS tests with a 2d 1536x2 texture. This fixes hangs with: dEQP-VK.pipeline.image.suballocation.sampling_type.combined.iew_type.1d_aray.format.r4g4b4a4_unorm_pack16.count_1.size.512x1_array_of_3 if we reenable it, make sure these don't regress. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/gfx9: fix buffer size on gfx9.Dave Airlie2017-09-061-1/+1
| | | | | | | | | | The VI sizing only applies to VI. This fixes: dEQP-VK.image.image_size.buffer.* Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Fix vkCopyImage with both depth and stencil aspects.Bas Nieuwenhuizen2017-09-061-99/+107
| | | | | Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver" Reviewed-by: Dave Airlie <[email protected]>
* radv: fix a memleak when compiling the GS copy shaderSamuel Pitoiset2017-09-051-0/+2
| | | | | | | | Found by inspection. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: reorg ac_shader_binary struct to take less space.Dave Airlie2017-09-041-8/+9
| | | | | | | | This reduces the size from 96 to 80 bytes but putting all the 32-bit sizes at the start. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: drop emit2d_dst_type.Dave Airlie2017-09-041-16/+0
| | | | | | | This is completely unused now. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: missing initialisations in create_pass().Xavier Bouchoux2017-09-041-0/+3
| | | | | | | | | | Otherwise radv_cmd_state_setup_attachments() will complain it has no clearvalues, when called via radv_process_depth_image_inplace(). v2: use LOAD/STORE instead of DONT_CARE, to preserve stencil values. Signed-off-by: Xavier Bouchoux <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Enable command buffer chaining by default.Bas Nieuwenhuizen2017-09-043-3/+3
| | | | | | For approx 5-10% performance improvement in dota2. Reviewed-by: Dave Airlie <[email protected]>
* radv: Put semaphore waits in preamble cs.Bas Nieuwenhuizen2017-09-042-60/+37
| | | | | | The separate flush cs gets in the way of batchchain. Reviewed-by: Dave Airlie <[email protected]>
* radv: Actually set the cmd_buffer usage_flags.Bas Nieuwenhuizen2017-09-041-0/+1
| | | | | | | | Otherwise, the simultaneous uage bit doesn't get set from the begin info, which we need for batchchaining. Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver" Reviewed-by: Dave Airlie <[email protected]>
* radv: report VM faults if detectedSamuel Pitoiset2017-09-012-0/+16
| | | | | | | It's fairly simple for now, but this might be quite useful. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radeonsi: move si_vm_fault_occured() to AMD common codeSamuel Pitoiset2017-09-012-0/+113
| | | | | | | | For radv, in order to report VM faults when detected. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add radv_check_gpu_hangs() helper functionSamuel Pitoiset2017-09-013-12/+27
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: disassemble SPIR-V binaries with RADV_DEBUG=spirvSamuel Pitoiset2017-09-014-0/+39
| | | | | | | | | This introduces a new separate option because the output can be quite verbose. If spirv-dis is not found in the path, this debug option is useless. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>