summaryrefslogtreecommitdiff
path: root/src/amd
AgeCommit message (Collapse)AuthorFilesLines
2017-06-28ac/nir: remove last remnants of v16i8Dave Airlie3-9/+3
llvm doesn't need this workaround anymore. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-28ac/nir: Use correct LLVM intrinsics for atomic ops on imageBuffersAlex Smith1-29/+34
The buffer intrinsics should be used instead of the image ones. Signed-off-by: Alex Smith <asmith@feralinteractive.com> Cc: <mesa-stable@lists.freedesktop.org> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-06-28ac/nir: assert printfs will fitJames Legg1-5/+12
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-06-28ac/nir: Make intrinsic_name buffer long enoughJames Legg1-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: <mesa-stable@lists.freedesktop.org> Reviewed-by: Grazvydas Ignotas <notasas@gmail.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-06-27ac/nir: convert emit helpers to ac_llvm_contextNicolai Hähnle1-117/+118
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-27ac/nir: remove unused nir_to_llvm_context::has_ddxyNicolai Hähnle1-2/+0
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-27ac/nir: implement nir_op_f2bNicolai Hähnle1-0/+12
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-27ac/nir: implement nir_op_{b2i,i2b}Nicolai Hähnle1-0/+20
Booleans in NIR are ~0 for true, b2i returns 0/1. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-27ac/nir: convert type helpers to ac_llvm_contextNicolai Hähnle1-95/+95
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-27ac/llvm: fix type of second llvm.cttz.* parameterNicolai Hähnle1-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 <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-27ac/shader_info: fix a commentNicolai Hähnle1-2/+6
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-27ac: add ac_llvm_context::v8i32Nicolai Hähnle2-0/+2
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-27ac: add ac_llvm_context::{i,f}32_{0,1}Nicolai Hähnle2-0/+10
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-27ac: add ac_llvm_context::{i16, i64, f16, f64}Nicolai Hähnle2-0/+8
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-26radv: use Mesa's u_atomic.h headerEric Engestrom2-4/+6
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-06-26radv/meta: don't need vertex info for resolve shader.Dave Airlie1-18/+2
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-26radv: Remove unused args of radv_image_view_init.Bas Nieuwenhuizen11-55/+23
Signed-off-by: Bas Nieuwenhuizen <basni@google.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-06-26radv: Use correct image layout for blit based copies.Bas Nieuwenhuizen1-10/+10
v2: Don't pass layout to image view usage mask. Signed-off-by: Bas Nieuwenhuizen <basni@google.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Fixes: 0628580eff6 "radv: Specify semantics of HTILE layout helpers."
2017-06-26radv: handle primitive id input into fragment shader with no geom shaderDave Airlie6-13/+65
Fixes: dEQP-VK.pipeline.framebuffer_attachment.no_attachments dEQP-VK.pipeline.framebuffer_attachment.no_attachments_ms Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-26radv: compile fragment shader first.Dave Airlie1-27/+27
This reorders things as we need something from the fs for the vs key. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-26radv: set prim_id for geometry shadersDave Airlie3-2/+9
Noticed in passing. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-26radv: set use_prim_id for tess shaders correctly.Dave Airlie1-3/+5
Just noticed in passing. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-19radeonsi/gfx9: fix TC-compatible stencil compressionMarek Olšák1-2/+2
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-06-19ac/sid.h: don't use parentheses in PKT3_RELEASE_MEM definitionMarek Olšák1-1/+1
The parses skips the line if it contains parentheses. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-06-19ac: parse EVENT_WRITE_EOP, RELEASE_MEM, WAIT_REG_MEM, NOWHEREMarek Olšák2-0/+47
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-06-19amd/common: fix off-by-one in sid_tables.pyNicolai Hähnle1-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 <marek.olsak@amd.com>
2017-06-17android: ac: add missing libdrm_amdgpu shared dependencyMauro Rossi1-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 <emil.l.velikov@gmail.com>
2017-06-17ac: resolve conflicts introduced with "ac: remove amdgpu.h dependency"Emil Velikov1-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 <mark.a.janes@intel.com> Cc: Gregor Münch <gr.muench@gmail.com> Reported-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reported-by: Mark Janes <mark.a.janes@intel.com> Reported-by: Gregor Münch <gr.muench@gmail.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Tested-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-06-16Revert "amd/common: add missing libdrm include path"Emil Velikov1-1/+0
This reverts commit 44b29dd7b6cdc1a3fde58c367b9de8081ac4167b. Should no longer be required as of last patch. Cc: Eric Engestrom <eric.engestrom@imgtec.com>
2017-06-16ac: remove amdgpu.h dependencyEmil Velikov2-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 <nicolai.haehnle@amd.com> Cc: Marek Olšák <marek.olsak@amd.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101189 Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2017-06-13ac/gpu: drop duplicated code line.Dave Airlie1-1/+0
has_hw_decode is assigned twice. Pointed out by coverity. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-13radv: move assert down in radv_bind_descriptor_setDave Airlie1-2/+2
coverity complains about the deref before NULL check. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-13radv: return correct error on invalid handle from vkAllocateMemoryDave Airlie1-2/+3
Coverity pointed out this was returning uninitialised. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-11radv: fix trace dumping for !use_ib_bosGrazvydas Ignotas1-3/+11
Fixes trace dumping crash for SI or when RADV_DEBUG=noibs is set. Fixes: 97dfff5410 "radv: Dump command buffer on hang." Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-06-11radv: don't even attempt to prefetch on SIGrazvydas Ignotas1-7/+16
Before bcae327469 this was emitting CP DMA packet even on SI, but apparently hasn't caused too many problems. After that commit the CP DMA code now always sets the CIK+ only bit for prefetch. Just follow radeonsi there and don't try to prefetch at all. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101334 Fixes: bcae327469 "radv: realign cp dma code with radeonsi" Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-06-11radv: assert on CP_DMA_USE_L2 for SIGrazvydas Ignotas1-0/+1
The register header (and radeonsi comment) states V_411_SRC_ADDR_TC_L2 is for CIK+ only, so let's assert on earlier ASICs. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-06-09radv: set fmask state to all 0s when no fmask. (v2)Dave Airlie1-1/+2
The shader reads the descriptor to decide if it should take the fmask value, however we weren't initing it always, which meant random crap, esp with MSAA depth textures. Fixes random hangs with: dEQP-VK.glsl.builtin_var.fragdepth.* v2: check fmask_state is not NULL Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver" Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-09radv: introduce perf test env var and allow to enable chainingDave Airlie7-4/+20
We have some features that seem to slow things down or cause other possible undesireable side effects, but it would be nice to test games etc with them easily. I forsee multisample DCC and maybe some shader opt changes using this. For now use it for batch chaining. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-08ac/nir: remove another unused variableGrazvydas Ignotas1-1/+0
Declared by each loop already. Trivial. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
2017-06-08radv/meta: remove an unused variableGrazvydas Ignotas1-1/+0
Trivial. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-06-08ac/nir: convert several ifs to a switchGrazvydas Ignotas1-9/+11
Also solve "outinfo may be used uninitialized" warning by putting in an unreachable(). Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-06-08ac/nir: mark some arguments constGrazvydas Ignotas1-30/+31
Most functions are only inspecting nir, so nir related arguments can be marked const. Some more can be done if/when some nir changes are accepted. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-06-07ac/nir: move gpr counting inside argument handling.Dave Airlie1-10/+12
This just moves this code in here to it's cleaner. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-07ac/nir: assign argument param pointers in one place.Dave Airlie1-187/+152
Instead of having the fragile code to do a second pass, just give the pointers you want params in to the initial code, then call a later pass to assign them. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-07ac/nir: consolidate setting userdata locationDave Airlie1-28/+17
Just pass a pointer and increment inside the function, makes the code less error prone. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-07radv: move chip_class extraction down further.Dave Airlie1-1/+2
This seems to matter here in a profile, without this we spend a lot more time exiting this function with no flush bits. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-07radv: move lots of index related things into the bind.Dave Airlie2-19/+14
This just moves lots of stuff to the bind stage rather than dealing with it in the draw stage. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-07radv: move calculating the vertex sgpr to the pipeline.Dave Airlie3-41/+34
There is no need to calculate this at draw time. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-07radv: rename and make global some functions.Dave Airlie2-12/+17
I want to use these in the pipeline setup stage. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-06-07tree-wide: remove trailing backslashEric Engestrom1-1/+1
Simple search for a backslash followed by two newlines. If one of the newlines were to be removed, this would cause issues, so let's just remove these trailing backslashes. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>