summaryrefslogtreecommitdiffstats
path: root/src/amd
Commit message (Collapse)AuthorAgeFilesLines
* radv/gfx10: set BREAK_WAVE_AT_EOI if TES or GS enable the primitive IDSamuel Pitoiset2019-07-181-0/+8
| | | | Signed-off-by: Samuel Pitoiset <[email protected]>
* radv/gfx10: move emitting VGT_PRIMITIVEID_EN into the NGG pathSamuel Pitoiset2019-07-181-6/+11
| | | | | | And do not emit VGT_GS_MODE which is unnecessary on GFX10. Signed-off-by: Samuel Pitoiset <[email protected]>
* radv/gfx10: do not always execute a barrier before the second shaderSamuel Pitoiset2019-07-181-1/+30
| | | | | | | | | With NGG, empty waves may still be required to export data. This fixes dEQP-VK.ycbcr.format.*_unorm.geometry_*. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: fix VGT_GS_MODE if VS uses the primitive IDSamuel Pitoiset2019-07-181-5/+5
| | | | | | | | Found by inspection. Cc: <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: put back VGT_FLUSH at ring init on gfx10Dave Airlie2019-07-181-4/+2
| | | | | | | I can find no evidence that removing this is a good idea. Fixes: 9b116173b6a ("radv: do not emit VGT_FLUSH on GFX10") Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: dont store disasm string unless keep_shader_info flag setTimothy Arceri2019-07-181-11/+13
| | | | | | | | | This fixes the memory use regression from bug 111107. Fixes: 726a31df705 ("radv: Add the concept of radv shader binaries.") Reviewed-by: Bas Nieuwenhuizen <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111107
* radv/gfx10: set the pgm rsrc3/4 regs using index sh reg setDave Airlie2019-07-183-18/+37
| | | | | | | | This is ported from AMDVLK, it's probably not requires unless we want to use "real time queues", but it might be nice to just have in place. Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: use correct register setter for ngg hw addrDave Airlie2019-07-181-1/+1
| | | | | | this shouldn't matter, but it's good to be correct. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Only save the descriptor set if we have one.Bas Nieuwenhuizen2019-07-181-1/+1
| | | | | | | | After reset, if valid does not contain the relevant bit the descriptor can be != NULL but still not be valid. CC: <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: add an option for disabling NGG on GFX10Samuel Pitoiset2019-07-174-1/+8
| | | | | | | Will be useful for testing the legacy path. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: implement VK_EXT_post_depth_coverageSamuel Pitoiset2019-07-175-0/+5
| | | | | | | | I did implement this extension a while ago but it didn't work on pre GFX10 for some reasons. Now all CTS pass. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: disable the TC compat zrange workaroundSamuel Pitoiset2019-07-174-4/+13
| | | | | | | Unnecessary. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: fallback to the legacy path if tess and extreme geometrySamuel Pitoiset2019-07-172-1/+13
| | | | | | | | | | This is unsupported and hangs. This fixes GPU hangs with dEQP-VK.tessellation.geometry_interaction.limits.output_required_*. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: always build the GS copy shader but uses it on-demandSamuel Pitoiset2019-07-173-7/+24
| | | | | | | | | It should be possible to build it on-demand too but it requires more work. On GFX10, the GS copy shader is required when tess is enabled with extreme geometry. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* android: radv/gfx10: generate gfx10_format_table.hMauro Rossi2019-07-162-1/+17
| | | | | | | | | | | | | | | | | | | | | | This patch adds the missing building rules for Android, to avoid following building errors: In file included from external/mesa/src/amd/vulkan/radv_debug.c:35: In file included from external/mesa/src/amd/vulkan/radv_debug.h:27: external/mesa/src/amd/vulkan/radv_private.h:95:10: fatal error: 'gfx10_format_table.h' file not found ^~~~~~~~~~~~~~~~~~~~~~ 1 error generated. In file included from external/mesa/src/amd/vulkan/radv_android.c:31: external/mesa/src/amd/vulkan/radv_private.h:95:10: fatal error: 'gfx10_format_table.h' file not found ^~~~~~~~~~~~~~~~~~~~~~ 1 error generated. Fixes: 3dc5ec5d16 ("radv/gfx10: generate gfx10_format_table.h") Signed-off-by: Mauro Rossi <[email protected]> Acked-by: Samuel Pitoiset <[email protected]>
* radv: add radv_emit_streamout_{begin,end} helpersSamuel Pitoiset2019-07-161-8/+35
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: pass output values to radv_emit_stream_output()Samuel Pitoiset2019-07-161-13/+18
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: allow to select DST_SEL with RELEASE_MEMSamuel Pitoiset2019-07-164-3/+11
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: allow to emit PS_DONE/CS_DONE with RELEASE_MEMSamuel Pitoiset2019-07-161-1/+2
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: restore an assertion in handle_vs_outputs()Samuel Pitoiset2019-07-161-1/+1
| | | | | | | | The NGG GS epilogue no longers call that function so the assertion is just useless now. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv/gfx10: emit ES outputs of TES when it's not NGGSamuel Pitoiset2019-07-161-3/+3
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: update LATE_ALLOC_VS.LIMITSamuel Pitoiset2019-07-161-18/+42
| | | | | | | Mirror RadeonSI. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv/gfx10: support pixel shaders without exportsSamuel Pitoiset2019-07-161-1/+7
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: fix gathering clip/cull distance masks for GSSamuel Pitoiset2019-07-161-0/+5
| | | | | | | | | | For NGG, the driver relies on the VS outinfo struct. This fixes dEQP-VK.clipping.user_defined.clip_*_vert_tess_geom_* Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* Revert "radv/gfx10: don't set array pitch field on images"Samuel Pitoiset2019-07-161-1/+1
| | | | | | It introduces too many regressions. This reverts commit 6d50dcd80fc120fdabcd57ef576f3e45ea2724e4.
* radv/gfx10: add missing conversions for 16-bit exportsSamuel Pitoiset2019-07-161-0/+9
| | | | | | | | | | This fixes dEQP-VK.spirv_assembly.instruction.graphics.16bit_storage.input_output_* Found with RADV_DEBUG=checkir Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: remove unused code in radv_export_param()Samuel Pitoiset2019-07-161-15/+1
| | | | | | | It was hack for geometry shaders. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: don't set array pitch field on imagesDave Airlie2019-07-161-1/+1
| | | | | | | | | | Setting this seems to be broken, amdvlk only sets it for quilted textures which I'm not sure what those are. Fixes dEQP-VK.glsl.texture_functions.query.texturesize*3d* Fixes: bf11f1c3a47 ("radv/gfx10: add gfx10_make_texture_descriptor") Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: enable OC_LDS_EN for NGG GS if the ES stage is TESSamuel Pitoiset2019-07-151-1/+2
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: export the PrimitiveID for ES stages (VS or TES)Samuel Pitoiset2019-07-151-5/+55
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: declare an external symbol for the ESGS ringSamuel Pitoiset2019-07-151-0/+25
| | | | | | | | It will be used for stream output but for now only declares it if VS and if the PrimitiveID needs to be exported. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: allocate ESGS ring space for exporting PrimitiveIDSamuel Pitoiset2019-07-151-1/+20
| | | | | | | | Only VS needs that. We shouldn't hardcode these values but that's complicated to not do that for now. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: fix crash when emitting NGG GS prologueSamuel Pitoiset2019-07-151-8/+15
| | | | | | | | ac_nir_context is initialized after the driver emits the NGG GS prologue so it's likely to crash. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: Fix DCC clears.Bas Nieuwenhuizen2019-07-141-3/+10
| | | | | | | Looks like if the reg clear bit is set, the hwardware does not use the 0/1 clears for textures. Reviewed-by: Dave Airlie <[email protected]>
* radv/gfx10: enable 1D texturesSamuel Pitoiset2019-07-123-11/+13
| | | | | | | Mirror RadeonSI. This also fixes crashes in addrlib. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: emit DISABLE_CONSERVATIVE_ZPASS_COUNTSSamuel Pitoiset2019-07-121-0/+2
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: init more registers in the graphics preambleSamuel Pitoiset2019-07-121-0/+9
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: set HS/GS/CS.WGP_MODESamuel Pitoiset2019-07-121-4/+8
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: emit GE_PC_ALLOCSamuel Pitoiset2019-07-121-0/+17
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: enable vertex shaders without export parametersSamuel Pitoiset2019-07-121-3/+15
| | | | | | | GFX10 allows this. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: launch 2 compute waves per CU before going onto the next CUSamuel Pitoiset2019-07-121-4/+9
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: use ac_get_compute_resource_limits()Samuel Pitoiset2019-07-121-17/+6
| | | | | | | No behaviour change. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: import ac_get_compute_resource_limits() from RadeonSISamuel Pitoiset2019-07-122-0/+36
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: invalidate everything in L2 when shaders read dataSamuel Pitoiset2019-07-121-1/+3
| | | | | | | | | | | | | This includes metadata as well. On GFX10, we have to invalidate the L2 metadata cache when shaders read DCC. Note that we still have to implement GFX10 coherency by introducing INV_L2_METATADA but for now just flush L2. This fixes a corruption with DCC and Talos. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: fix wrong emission of GE_CNTLSamuel Pitoiset2019-07-121-1/+1
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add more assertions to make sure packets are correctly emittedSamuel Pitoiset2019-07-121-3/+3
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: report shader stage name when dumping LLVM IRSamuel Pitoiset2019-07-121-4/+17
| | | | | | | For debugging purposes. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: tidy up radv_get_shader_name() and add NGG stagesSamuel Pitoiset2019-07-123-12/+32
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: update OVERWRITE_COMBINER_{MRT_SHARING,WATERMARK}Samuel Pitoiset2019-07-121-16/+4
| | | | | | | DCC related, mirror RadeonSI. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]
* radv/gfx10: do not set alignment on the ngg_emit pointerSamuel Pitoiset2019-07-121-1/+0
| | | | | | | This is invalid and this fixes a crash in LLVM. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>