summaryrefslogtreecommitdiffstats
path: root/src/amd
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* ac/surface: match Z and stencil tile configNicolai Hähnle2017-09-131-7/+42
| | | | | | | Fixes various piglit tests on Stoney, see the comment. Cc: [email protected] Reviewed-by: Marek Olšák <[email protected]>
* ac/surface: sanity-check that we got a TC-compatible HTILE if requestedNicolai Hähnle2017-09-131-0/+6
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/addrlib: enable assertions in debug buildsNicolai Hähnle2017-09-131-9/+17
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/addrlib: relax an assertionNicolai Hähnle2017-09-131-1/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/addrlib: relax an assertionNicolai Hähnle2017-09-131-1/+1
| | | | | | | | | This assertion is triggered on Stoney in Piglit ./bin/framebuffer-blit-levels {draw,read} stencil -auto -fbo and similar tests. It should be harmless -- just relax it until we can get internal clarification. Reviewed-by: Marek Olšák <[email protected]>
* amd/common: get ME/PFP/CE firmware feature versions as wellNicolai Hähnle2017-09-132-4/+9
| | | | Reviewed-by: Marek Olšák <[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/ac: bump params array for image atomic comp swapDave Airlie2017-09-131-1/+1
| | | | | | | | | | | | For the comp_swap case this was overflowing and crashing sometimes. Fixes: dEQP-VK.image.atomic_operations.compare_exchange.* 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-132-14/+76
| | | | | | | | | | | | 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]>
* Android: fix undeclared identifier 'gfx9d_reg_table'Chih-Wei Huang2017-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | Since commit 552aaa11 the compiler complains: external/mesa/src/amd/common/ac_debug.c:124:51: error: use of undeclared identifier 'gfx9d_reg_table'; did you mean 'sid_reg_table'? reg = find_register(gfx9d_reg_table, ARRAY_SIZE(gfx9d_reg_table), offset); ^~~~~~~~~~~~~~~ sid_reg_table It's because the commit ef97cc0c ("radeonsi/gfx9: add IB parser support") add gfx9d.h as a recipe of sid_tables.h. But the corresponding Android.mk was not updated. However, it's not spotted since gfx9d_reg_table is not really used until commit 552aaa11 was landed. Fixes: 552aaa11 (ac/debug: take ASIC generation into account when printing registers) Signed-off-by: Chih-Wei Huang <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Rob Herring <[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]>
* 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]>