summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
Commit message (Collapse)AuthorAgeFilesLines
* 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-122-4/+6
| | | | | | | 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]>
* 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]>
* radv/gfx10: fix exporting clip/cull distances for GSSamuel Pitoiset2019-07-121-1/+2
| | | | | | | This fixes dEQP-VK.clipping.user_defined.clip_distance.*geom*. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: fix exporting the subpass view index for GSSamuel Pitoiset2019-07-121-1/+15
| | | | | | | This fixes dEQP-VK.multiview.*geometry*. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: only enable the GS copy shader stage if GS is enabledSamuel Pitoiset2019-07-111-1/+1
| | | | | | Ooops. Signed-off-by: Samuel Pitoiset <[email protected]>
* radv/gfx10: enable geometry shadersSamuel Pitoiset2019-07-111-1/+1
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: Fix NGG GS output mask handlings for LDS indexing.Bas Nieuwenhuizen2019-07-111-1/+5
| | | | | | | | | | | | In emit_vertex we optimize storage if the output mask does not have all bits set. Do the same in the epilogue so the indices actually match up. Fixes dEQP-VK.geometry.input.basic_primitive.points because it outputs PSIZE with an output mask of 1, which cause the generic attribute for the color to be loaded from the wrong indices. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv/gfx10: Simplify output mask handling for NGG GS.Bas Nieuwenhuizen2019-07-111-12/+1
| | | | | | We only ever get in this function for a NGG GS proper. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv/gfx10: Do GS prologue outside of gs_threads if.Bas Nieuwenhuizen2019-07-111-5/+6
| | | | | | Mirror radeonsi. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv/gfx10: implement support for GS as NGGSamuel Pitoiset2019-07-114-6/+568
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: Use correct ES shader for es_vgpr_comp_cnt for GS.Bas Nieuwenhuizen2019-07-111-2/+5
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* radv/gfx10: Do not allocate a gs_copy_shader on gfx10.Bas Nieuwenhuizen2019-07-112-4/+6
| | | | | | Will use ngg for any gs anyway. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv/gfx10: fix VGT_SHADER_STAGES_EN for GS as NGGSamuel Pitoiset2019-07-111-10/+11
| | | | | | | The driver shouldn't set the copy shader bit. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: fix number of GS invocations for NGGSamuel Pitoiset2019-07-111-1/+1
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: fix maximum number of mip levels for 3D imagesSamuel Pitoiset2019-07-111-4/+10
| | | | | | | | | | The dimensions also have to be adjusted if the number of supported mip levels is changed. This fixes dEQP-VK.api.info.image_format_properties.3d.*. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: disable TC-compat HTILE for multisampled D32_SFLOAT formatSamuel Pitoiset2019-07-111-2/+5
| | | | | | | | | | For some reasons D32_SFLOAT is also affected on GFX10, it works fine with previous generations. This fixes some dEQP-VK.renderpass2.depth_stencil_resolve.*. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>