summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
Commit message (Collapse)AuthorAgeFilesLines
* radv: replace conditional compilation with MAYBE_UNUSEDEric Engestrom2017-09-191-3/+2
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Add support for more DCC compression with VK_KHR_image_format_list.Bas Nieuwenhuizen2017-09-162-3/+25
| | | | Reviewed-by: Dave Airlie <[email protected]>
* radv: Add code to check if two formats can share DCC metadata.Bas Nieuwenhuizen2017-09-162-0/+87
| | | | | | Ported from radeonsi. Reviewed-by: Dave Airlie <[email protected]>
* radv: Don't redundantly emit pipelines after secondary cmd buffer.Bas Nieuwenhuizen2017-09-151-5/+6
| | | | Reviewed-by: Dave Airlie <[email protected]>
* automake: include radv_shader.h in the sources listEmil Velikov2017-09-151-0/+1
| | | | | | | Otherwise it will be missing from the tarball, leadin to build failure. Fixes: d4d777317b9 ("radv: move shaders related code to radv_shader.c") Signed-off-by: Emil Velikov <[email protected]>
* radv: fix a potential crash if attachments allocation failedSamuel Pitoiset2017-09-151-1/+2
| | | | | | | | | Also, it's useless to set the error code twice. Though, we should probably skip the next commands when the command buffer is considered invalid. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: dump the device name into the hang reportSamuel Pitoiset2017-09-151-0/+30
| | | | | | | Similar to RadeonSI renderer string. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add get_chip_name() callbackSamuel Pitoiset2017-09-152-0/+10
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: dump the list of enabled options when a hang occuredSamuel Pitoiset2017-09-143-0/+46
| | | | | | | | Useful to know which debug/perftest options were enabled when a hang report is generated. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: dump last 60 lines of dmesg when a hang occuredSamuel Pitoiset2017-09-141-0/+20
| | | | | | | Copied from dd_dump_dmesg(). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: dump descriptors when a hang occuredSamuel Pitoiset2017-09-141-0/+182
| | | | | | | | Might be useful for checking if all descriptors are sets by the application. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: save all descriptor pointers into the trace BOSamuel Pitoiset2017-09-142-0/+35
| | | | | | | To dump them when a hang is detected. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: dump annotated shaders using UMRSamuel Pitoiset2017-09-141-0/+172
| | | | | | | | | This might be very useful in order to figure out where a shader is stucked. This uses UMR to detect which instruction is executing bad things. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: dump some status MMIO registers when a hang occuredSamuel Pitoiset2017-09-141-0/+57
| | | | | | | | Might report some useful information to help figuring out where does the hang happened. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/winsys: add a read_registers() callbackSamuel Pitoiset2017-09-142-0/+14
| | | | | | | To dump some status MMIO registers when a hang is detected. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: dump shader stats when a hang occuredSamuel Pitoiset2017-09-141-3/+6
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add radv_shader_dump_stats() helperSamuel Pitoiset2017-09-143-63/+77
| | | | | | | To dump the shader stats when a hang is detected. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: dump the active shaders when a hang occuredSamuel Pitoiset2017-09-141-5/+89
| | | | | | | Only the disassembly is currently dumped. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add debug flags for syncing shaders after every draw callSamuel Pitoiset2017-09-143-0/+17
| | | | | | | To improve GPU hangs detection when shaders are stucked. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add radv_cmd_buffer_after_draw() helper functionSamuel Pitoiset2017-09-141-6/+12
| | | | | | | To share common code after every draw/compute calls. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: save the bound pipeline pointers into the trace BOSamuel Pitoiset2017-09-142-7/+54
| | | | | | | | | | | | | When a GPU hang is detected in radv_gpu_hang_occured() we know which command buffer is faulty but the bound pipelines might have been updated during the execution. The pointers to the radv_pipeline objects are emitted just after the second trace ID, that way it would be easy to dump the active shaders at the moment of the hang. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add a comment that describes the trace BO layoutSamuel Pitoiset2017-09-141-0/+6
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: initialize the trace BO to 0Samuel Pitoiset2017-09-141-1/+6
| | | | | | | To avoid random initial values. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv/nir: call opt_remove_phis after trivial continues.Dave Airlie2017-09-131-0/+1
| | | | | | | | | | | | | With the shaders in the ssao demo, the nir_opt_if wasn't working properly without this, after this the if gets optimised so that loop unrolling gets called. (loop unrolling fails due to instruction count, but at least it gets to do that.) Reviewed-by: Timothy Arceri <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: compile out unused codeEric Engestrom2017-09-131-0/+2
| | | | Signed-off-by: Eric Engestrom <[email protected]>
* radv: clear push_constant_stages when resetting a command bufferSamuel Pitoiset2017-09-131-0/+1
| | | | | | | | | | | | | | | Per the spec: "Resetting a command buffer is an operation that discards any previously recorded commands and puts a command buffer in the initial state." As far I'm concerned, that flag can be changed by calling VkCmdPushConstants() (or any other functions which update it), so it should be cleared as well. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add more radv_emit_XXX() helpers for the dynamic stateSamuel Pitoiset2017-09-131-40/+77
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: remove useless 'cmd_buffer' param from radv_buffer_view_init()Samuel Pitoiset2017-09-134-7/+5
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx9: fix image resource handling.Dave Airlie2017-09-131-8/+19
| | | | | | | | | | GFX9 changes how images are layed out, so this needs updating. Fixes: dEQP-VK.query_pool.statistics_query.* Cc: "17.2" <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/gfx9: set mip0-depth correctly for 2d arrays/3d imagesDave Airlie2017-09-131-2/+2
| | | | | | | | | | | | This field covers the whole resource. Fixes: dEQP-VK.pipeline.image.suballocation.sampling_type.combined.view_type.3d.format.* dEQP-VK.texture.filtering.3d.combinations.* Cc: "17.2" <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: handle GFX9 1D texturesDave Airlie2017-09-131-3/+7
| | | | | | | | | | | | As GFX9 can't handle 1D depth textures, radeonsi and apparantly pro just update all 1D textures to 2D, and work around it. This ports the workarounds from radeonsi. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: don't use iview for meta image width/height.Dave Airlie2017-09-132-13/+21
| | | | | | | | | | | | Work out the width/height from the level manually, as on GFX9 we won't minify the iview width/height. This fixes: dEQP-VK.api.image_clearing.core.clear_color_image* on gfx9 Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Don't allocate CMASK for linear images.Bas Nieuwenhuizen2017-09-121-1/+3
| | | | | | | We can't use it anyway in fast clears, and on GFX9 it seems to actually hange the card if we specify it. Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
* radv: Disable multilayer & multilevel DCC.Bas Nieuwenhuizen2017-09-121-0/+1
| | | | | | | | | | | | The current DCC init routine doesn't account for initializing a single layer or level. Multilayer seems hard for small textures on pre-GFX9 as tre metadata for the layers can be interleaved. For GFX9 multilevel textures are a problem for similar reasons. So just disable this for now, until we handle the texture modes correctly. Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
* radv: work out a base ia_multi_vgt_param.Dave Airlie2017-09-113-10/+13
| | | | | | | This just reduces the calculations a bit further. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: calculate non-draw related ia_multi_vgt_param bits in pipelineDave Airlie2017-09-113-60/+76
| | | | | | | | This moves a bunch of non-draw dependent calcs into the pipeline code, to reduce CPU overheads in the draw path. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: move calculating primgroup_size to pipeline.Dave Airlie2017-09-113-9/+11
| | | | | | | This moves this out of the draw paths. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: only calculate num_prims when required.Dave Airlie2017-09-111-4/+10
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: use upload_data to upload push descriptors.Dave Airlie2017-09-111-6/+3
| | | | | | | This is just a reusing code. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: realign vgt flush on hawaii workaround with radeonsi.Dave Airlie2017-09-111-6/+12
| | | | | | | | This realigns this code with the radeonsi version and fixes the indirect case to work properly. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: return an error code when resetting a command bufferSamuel Pitoiset2017-09-111-8/+14
| | | | | | | If the upload BO allocation failed. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: remove unnecessary goto in radv_create_cmd_buffer()Samuel Pitoiset2017-09-111-8/+2
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: do not pass a pipeline object to radv_emit_graphics_pipeline()Samuel Pitoiset2017-09-111-4/+4
| | | | | | | To be consistent with radv_emit_compute_pipeline(). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: add debug flags to zero vram allocations.Dave Airlie2017-09-125-0/+7
| | | | | | | | | We are seeing apps that sometimes rely on Windows behaviour, add a flag to rule out vram zeroing. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Actually check for vm faults.Bas Nieuwenhuizen2017-09-093-3/+9
| | | | | | | | | The code can check for vm faults having happened. If we only do it on a hang we don't know when the faults happened. This changes the behavior to when the first VM faults is found, even without a hang. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* 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]>