summaryrefslogtreecommitdiffstats
path: root/src/amd
Commit message (Collapse)AuthorAgeFilesLines
* radv: Drop support for VK_KHX_external_semaphore_*Jason Ekstrand2017-07-154-188/+2
| | | | | | | These have been formally deprecated by Khronos never to be shipped again. The KHR versions should be implemented/used instead. Acked-by: Dave Airlie <[email protected]>
* radv: Fix descriptors for cube images with VK_IMAGE_USAGE_STORAGE_BITAlex Smith2017-07-133-29/+74
| | | | | | | | | | | | | | | | | | If a cube image has VK_IMAGE_USAGE_STORAGE_BIT set, the type in an image view's descriptor was set to a 2D array (and a few other fields adjusted accordingly). This is correct when the image view is actually bound as a storage image, but not when bound as a sampled image. In that case the type should be set as a cube. Fix by generating 2 sets of descriptors at view creation time for both storage and non-storage usage, and then choose between them based on descriptor type when writing descriptor sets. v2: Generate storage descriptors for images with TRANSFER_DST, since those may be used as storage images internally. Signed-off-by: Alex Smith <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Fix possible invalid free of dynamic descriptorsAlex Smith2017-07-131-1/+0
| | | | | | | | | This free was left in after dynamic descriptors were changed to not be allocated separately from the descriptor set, and can cause a crash. Fixes: 39644fa40a3 ("radv: Don't allocate dynamic descriptors separately") Signed-off-by: Alex Smith <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/ac: drop setting xnackDave Airlie2017-07-091-2/+1
| | | | | | | | | | | Since radv uses compute rings and we can't know when we are setting up the shaders what ring they are to be used on, we should just use the default xnack setting. This may be suboptimal in some places, but if we hit a problem, we likely should try and address this between llvm and mesa. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add support for using addrlib max alignment.Dave Airlie2017-07-095-4/+14
| | | | | | | | Rather than using 64k, use what addrlib returns as the base alignment for vulkan allocations. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Add compute htile clear for combined depth+stencil surfaces.Bas Nieuwenhuizen2017-07-081-9/+7
| | | | | | | | Figured out the clear value when we have a combined depth stencil surface. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* ac/nir: Fix ordering of parameters for image atomic cmpswap intrinsicsAlex Smith2017-07-071-1/+1
| | | | | | | | | | The NIR parameters are ordered "compare, data", matching GLSL, but both the image and buffer LLVM intrinsics take them the other way around. This is already handled correctly for SSBO atomics. Signed-off-by: Alex Smith <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
* radv: don't overallocate depth/stencil formatsDave Airlie2017-07-061-1/+1
| | | | | | | | | | | For depth/stencil formats the surface layer allocates the stencil separately, so we don't need to include it in the bpe. This reduces the side of d32s8 allocates to something closer to pro. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: enable sisched toggle in perftest flags.Dave Airlie2017-07-065-2/+10
| | | | | | | | | RADV_PERFTEST=sisched to enable it. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac/llvm: set xnack like radeonsi does.Dave Airlie2017-07-061-1/+3
| | | | | | | Use family, but only set xnack+ for gfx9. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac/llvm: create features list using snprintf.Dave Airlie2017-07-061-2/+5
| | | | | | | Just more moving code around before adding things to it. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac/radv: change api to create target machineDave Airlie2017-07-063-7/+14
| | | | | | | | This just modifies the API to make it easier to add other flags to target machine creation. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add support for cmd predication.Dave Airlie2017-07-065-30/+64
| | | | | | | | This doesn't get used yet, it just adds support to various PKT3 emissions to enable it later. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac/nir: Move VS position exports before param exports.Bas Nieuwenhuizen2017-07-051-55/+54
| | | | | | | | According to Nicolai the SX can already start work when all the position exports are done, so do those first. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Always set depthbuffer using image format instead of iview format.Bas Nieuwenhuizen2017-07-051-2/+2
| | | | | | | | We have some cases where changing between depth and stencil only aspect was causing hangs. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]>
* radv: Disable depth & stencil tests when the depthbuffer doesn't support it.Bas Nieuwenhuizen2017-07-056-11/+36
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]>
* radv: enable Int64 capability (v2)Dave Airlie2017-07-032-1/+2
| | | | | | | | | I'm not 100% sure this is all wired up but it looks like it is. v2: actually enable extension. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: fix 64-bit shiftsConnor Abbott2017-07-031-3/+12
| | | | | | | | | NIR always makes the shift amount 32 bits, but LLVM asserts if the two sources aren't the same type. Zero-extend the shift amount to make LLVM happy. Signed-off-by: Connor Abbott <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: implement 64-bit packing and unpackingConnor Abbott2017-07-032-0/+32
| | | | | | | | | | | | | | | We implement the split opcodes, and tell NIR to lower the original ones. The lowering to LLVM is a little more complicated, but NIR can optimize the split ones a little better, and some NIR lowering passes that we might want to use (particularly for doubles) emit the split ones. This should fix pack/unpackDouble2x32, which seems like a bug since when we enabled the Float64 capability. It will also fix pack/unpackInt2x32 when we enable the Int64 capability. Fixes: 798ae37c ("radv: Enable Float64 support.") Signed-off-by: Connor Abbott <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Use v4i32 variant of llvm.SI.load.const.Bas Nieuwenhuizen2017-06-301-3/+1
| | | | | | | | | | We apparently still used v16i8 .... As radeonsi doesn't use it with LLVM version checks I don't think we need them either. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* ac/nir: remove last remnants of v16i8Dave Airlie2017-06-283-9/+3
| | | | | | | llvm doesn't need this workaround anymore. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac/nir: Use correct LLVM intrinsics for atomic ops on imageBuffersAlex Smith2017-06-281-29/+34
| | | | | | | | The buffer intrinsics should be used instead of the image ones. Signed-off-by: Alex Smith <[email protected]> Cc: <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: assert printfs will fitJames Legg2017-06-281-5/+12
| | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: Make intrinsic_name buffer long enoughJames Legg2017-06-281-1/+1
| | | | | | | | | | | | When using cmpswap on an image, it was being trunctated to lvm.amdgcn.image.atomic.cmpswa, with the coords type missing entirely. v2: Add stable CC CC: <[email protected]> Reviewed-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: convert emit helpers to ac_llvm_contextNicolai Hähnle2017-06-271-117/+118
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac/nir: remove unused nir_to_llvm_context::has_ddxyNicolai Hähnle2017-06-271-2/+0
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac/nir: implement nir_op_f2bNicolai Hähnle2017-06-271-0/+12
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac/nir: implement nir_op_{b2i,i2b}Nicolai Hähnle2017-06-271-0/+20
| | | | | | | Booleans in NIR are ~0 for true, b2i returns 0/1. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac/nir: convert type helpers to ac_llvm_contextNicolai Hähnle2017-06-271-95/+95
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac/llvm: fix type of second llvm.cttz.* parameterNicolai Hähnle2017-06-271-1/+1
| | | | | | | | LLVM has required an i1 here for a long time. llvm.ctlz.* was fixed in commit edd23e06067 ("ac/llvm: fix various findMSB bugs"). Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac/shader_info: fix a commentNicolai Hähnle2017-06-271-2/+6
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac: add ac_llvm_context::v8i32Nicolai Hähnle2017-06-272-0/+2
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac: add ac_llvm_context::{i,f}32_{0,1}Nicolai Hähnle2017-06-272-0/+10
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac: add ac_llvm_context::{i16, i64, f16, f64}Nicolai Hähnle2017-06-272-0/+8
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: use Mesa's u_atomic.h headerEric Engestrom2017-06-262-4/+6
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* radv/meta: don't need vertex info for resolve shader.Dave Airlie2017-06-261-18/+2
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Remove unused args of radv_image_view_init.Bas Nieuwenhuizen2017-06-2611-55/+23
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Use correct image layout for blit based copies.Bas Nieuwenhuizen2017-06-261-10/+10
| | | | | | | | v2: Don't pass layout to image view usage mask. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Fixes: 0628580eff6 "radv: Specify semantics of HTILE layout helpers."
* radv: handle primitive id input into fragment shader with no geom shaderDave Airlie2017-06-266-13/+65
| | | | | | | | | | Fixes: dEQP-VK.pipeline.framebuffer_attachment.no_attachments dEQP-VK.pipeline.framebuffer_attachment.no_attachments_ms Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: compile fragment shader first.Dave Airlie2017-06-261-27/+27
| | | | | | | | This reorders things as we need something from the fs for the vs key. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: set prim_id for geometry shadersDave Airlie2017-06-263-2/+9
| | | | | | | | Noticed in passing. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: set use_prim_id for tess shaders correctly.Dave Airlie2017-06-261-3/+5
| | | | | | | | Just noticed in passing. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeonsi/gfx9: fix TC-compatible stencil compressionMarek Olšák2017-06-191-2/+2
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* ac/sid.h: don't use parentheses in PKT3_RELEASE_MEM definitionMarek Olšák2017-06-191-1/+1
| | | | | | | The parses skips the line if it contains parentheses. Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* ac: parse EVENT_WRITE_EOP, RELEASE_MEM, WAIT_REG_MEM, NOWHEREMarek Olšák2017-06-192-0/+47
| | | | | Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* amd/common: fix off-by-one in sid_tables.pyNicolai Hähnle2017-06-191-1/+1
| | | | | | | The very last entry in the sid_strings_offsets table ended up missing, leading to out-of-bounds reads and potential crashes. Reviewed-by: Marek Olšák <[email protected]>
* android: ac: add missing libdrm_amdgpu shared dependencyMauro Rossi2017-06-171-0/+3
| | | | | | | | | | | | | | | | Fixes building errors in amd/common: target C: libmesa_amd_common <= external/mesa/src/amd/common/ac_gpu_info.c ... target C: libmesa_amd_common <= external/mesa/src/amd/common/ac_surface.c ... external/mesa/src/amd/common/ac_gpu_info.h:31:10: fatal error: 'amdgpu.h' file not found ^ 2 errors Fixes: 98a2492 ("ac_surface: use radeon_info from ac_gpu_info") Signed-off-by: Emil Velikov <[email protected]>
* ac: resolve conflicts introduced with "ac: remove amdgpu.h dependency"Emil Velikov2017-06-171-1/+3
| | | | | | | | | | | | | | | | | | | The commit did not add the relevant includes - in particular stdint.h and stdbool.h for the respective standard types. At the same time, the amdgpu_device_handle typedef redeclaration was off. Fixes: 81945ded0dc ("ac: remove amdgpu.h dependency") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101471 Cc: Mark Janes <[email protected]> Cc: Gregor Münch <[email protected]> Reported-by: Bas Nieuwenhuizen <[email protected]> Reported-by: Mark Janes <[email protected]> Reported-by: Gregor Münch <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Tested-by: Bas Nieuwenhuizen <[email protected]>
* Revert "amd/common: add missing libdrm include path"Emil Velikov2017-06-161-1/+0
| | | | | | | | This reverts commit 44b29dd7b6cdc1a3fde58c367b9de8081ac4167b. Should no longer be required as of last patch. Cc: Eric Engestrom <[email protected]>
* ac: remove amdgpu.h dependencyEmil Velikov2017-06-162-2/+6
| | | | | | | | | | | | | | | | Add a couple of forward declarations and drop the amdgpu.h requirement. With this we can build the r300 and r600 drivers without the need for amdgpu. v2: - Add amdgpu.h include in the C file (Marek) - Add a comment about pre C11 typedef redeclaration warning (Eric) Cc: Nicolai Hähnle <[email protected]> Cc: Marek Olšák <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101189 Signed-off-by: Emil Velikov <[email protected]>