summaryrefslogtreecommitdiff
path: root/src/amd
AgeCommit message (Collapse)AuthorFilesLines
2017-08-25radv/gfx9: gfx9 has buffer sizing rules like pre-VI.Dave Airlie1-1/+1
This fixes: dEQP-VK.robustness.buffer_access.* on GFX9. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: "17.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-08-25radv: fix predication on gfx9Dave Airlie1-1/+3
When I added gfx9 I did it wrong, this fixes it. Fixes: 5247b311e9 "radv/gfx9: fix set predication packet." Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-08-24ac/debug: use util_strchrnul() to fix android build errorMauro Rossi1-1/+2
Similar to e09d04cd56 "radeonsi: use util_strchrnul() to fix android build error" Android Bionic does not support strchrnul() string function, gallium auxiliary util/u_string.h provides util_strchrnul() This change avoids the following warning and error: external/mesa/src/amd/common/ac_debug.c:501:15: warning: implicit declaration of function 'strchrnul' is invalid in C99 char *end = strchrnul(out, '\n'); ^ external/mesa/src/amd/common/ac_debug.c:501:9: error: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' char *end = strchrnul(out, '\n'); ^ ~~~~~~~~~~~~~~~~~~~~ 1 warning and 1 error generated. Fixes: c2c3912410 "ac/debug: annotate IB dumps with the raw values" Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Rob Herring <robh@kernel.org>
2017-08-24radeonsi: get the raster config from AMDGPU on SIMarek Olšák2-0/+5
Not sure yet if we wanna do this on CIK and VI too. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-08-24radv: Expose VK_KHX_multiview.Bas Nieuwenhuizen2-0/+18
Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-08-24radv: Implement multiview draws.Bas Nieuwenhuizen2-33/+112
v2: - Use for_each_bit. - split emitting the draw packets out to separate functions. Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-08-24radv: Implement determining the has_multiview_view_index key.Bas Nieuwenhuizen1-4/+16
Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-08-24ac/nir: Add shader support for multiviews.Bas Nieuwenhuizen4-2/+44
It uses an user SGPR to pass the view index to the shaders, except for the fragment shader where we use layer=view (which comes in handy when we want to do the NV ext that allows us to execute pre-FS stages once instead of per view). Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-08-24radv: Add multiview clears.Bas Nieuwenhuizen3-19/+47
v2: Use for_each_bit. Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-08-24radv: Store multiview info in renderpass.Bas Nieuwenhuizen2-1/+27
Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-08-24ac/nir: Make shader key a struct.Bas Nieuwenhuizen4-22/+24
Some bits can be passed to almost every shader, and I don't like adding 5 variables. Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-08-24radv: Use 0 for the layer id if the vertex shader does not export it.Bas Nieuwenhuizen1-3/+4
To use when we have e.g. input attachments, but there is no layer export in the previous shader and hence no layered rendering. Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-08-24ac/nir: Implement input attachments with layered rendering.Bas Nieuwenhuizen1-2/+11
Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-08-24ac/nir: Determine if input attachments are used in the info pass.Bas Nieuwenhuizen2-1/+11
Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-08-24ac/nir: Cast sources of integer ops to int.Bas Nieuwenhuizen1-0/+16
The int32->float semantic conversion got dropped in a testcase, because the src was already float. On closer inspection I decided to add a few more casts for integer op operands to be safe too. Cc: 17.2 <mesa-stable@lists.freedesktop.org> Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-08-24radv/gfx9: don't expose linear depth on vega.Dave Airlie1-0/+4
This just zeros out the linear flags for gfx9 + depth formats. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: "17.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-08-24radv: don't degrade tiling mode for small compressed or depth texture.Dave Airlie1-6/+10
This is what radeonsi does, so we should do the same, also vega doesn't support linear depth textures anyways. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: "17.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-08-24radv/gfx9: only minify image view width/height/depth before gfx9.Dave Airlie2-7/+15
For gfx9 the addressing for images has changed, so we need to provide the hw with the level0, however we still need to scale for format block differences (so our compressed upload paths still work). Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: "17.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-08-24radv/image: don't rescale width/height if the format isn't changingDave Airlie1-4/+6
If the image view has the same format, we don't need to rescale the w/h. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: "17.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-08-24radv: cleanup some image view descriptor setup.Dave Airlie2-13/+21
Avoid passing the vulkan image creation into the image view descriptor setup. This cleans up the usage of range inside the init, instead using the properly inited values in the image view. This is just a cleanup but some future vega changes will depend on it. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: "17.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-08-24radv/gfx9: emit sx_mrt_blend registersDave Airlie3-3/+134
GFX9 needs the SX MRT blend registers programmed, port over the code from radeonsi to workout the values from the blend state, and program the registers on rbplus systems. This fixes lots of: dEQP-VK.pipeline.blend.* Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: "17.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-08-24radv: bump space check for indexed draw.Dave Airlie1-1/+1
For the GFX9 packet we need one more dword. Fixes an assert in: dEQP-VK.draw.shader_draw_parameters.base_vertex.draw_indexed Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: "17.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-08-24radv/gfx9: fixup db/stencil disable.Dave Airlie1-3/+7
This fixes disabled Z/stencil. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: "17.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-08-24radv/gfx9: fix level count in color register setup.Dave Airlie1-1/+1
There was an off by one here. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: "17.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-08-24radv/gfx9: use total levels in texture descriptorDave Airlie1-1/+1
We need to use all the levels when filling out the gfx9 descriptor. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: "17.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-08-24radv: Implement bc optimize.Bas Nieuwenhuizen3-0/+33
Seems like we actually enabled it already, but did not implement the shader part. With this patch we do. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-08-24ac/nir: refactor input variable iteration.Bas Nieuwenhuizen1-19/+11
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-08-23ac/debug: invoke valgrind checks while parsing IBsNicolai Hähnle1-0/+20
Help catch garbage data written into IBs. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-08-23ac/debug: annotate IB dumps with the raw valuesNicolai Hähnle1-18/+66
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-08-23ac/debug: use an explicit getter for fetching words from the IBNicolai Hähnle1-153/+215
Guard against out-of-bounds accesses, and prepare for upcoming changes. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-08-22ac/surface/gfx9: don't allow DCC for the smallest mipmap levelsMarek Olšák1-1/+18
This fixes garbage there if we don't flush TC L2 after rendering. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-08-22gallium/radeon: clean up EOP_DATA_SEL magic numbersMarek Olšák1-6/+4
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-08-22radeonsi/gfx9: properly handle imported textures with unexpected swizzle modeMarek Olšák1-0/+5
Cc: 17.2 <mesa-stable@lists.freedesktop.org> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-08-22amd/common: split out ac_parse_ib_chunk from ac_parse_ibNicolai Hähnle2-8/+32
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-08-21Android: Fix LLVM duplicated symbols linking for N and MRob Herring1-3/+1
Both statically linking libLLVMCore and dynamically linking libLLVM causes duplicated symbols in gallium_dri.so and it fails to dlopen. We don't really need to link libLLVMCore, but just need generated headers to be built first. Dynamically linking to libLLVM instead is enough to do that. Thanks to Qiang Yu for finding the root cause. With this change, we can align all versions and just have libLLVM as a shared lib dependency. This also requires changes in the M and N versions of LLVM to export the include paths for libLLVM. AOSP master is okay. Fixes: 26aee6f4d5a ("Android: rework LLVM build support") Reported-by: Mauro Rossi <issor.oruam@gmail.com> Cc: 17.2 <mesa-stable@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Qiang Yu <Qiang.Yu@amd.com> Signed-off-by: Rob Herring <robh@kernel.org>
2017-08-21ac/nir: fixup layer/viewport export for GFX9.Dave Airlie1-7/+25
GFX9 moved where the viewport index export goes. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: "17.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-08-18radv: disable support for VEGA for now.Dave Airlie1-0/+5
I'm working on this, but I'm not sure I'll make 17.2 at this stage, maybe 17.2.1. Cc: "17.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-08-17radv: disable texture gather workaround on gfx9.Dave Airlie1-1/+1
Not required anymore. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: "17.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-08-16radv/gfx9: for fast clear use is_linear flag.Dave Airlie1-1/+1
The legacy test won't work on gfx9. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: "17.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-08-16radv/gfx9: fix tile swizzle handling for gfx9David Airlie2-11/+8
This sets the tile swizzle up properly for gfx9. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: "17.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-08-16radv/gfx9: handle GFX9 opaque metadataDavid Airlie1-4/+5
port the opaque metadata changes from radeonsi for gfx9. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: "17.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-08-16radv: emit db_htile_surface reg on gfx9 as wellDavid Airlie1-1/+2
This is also a GFX9 register. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: "17.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-08-16radv/gfx9: remove some leftover gfx6 descriptor setup.Dave Airlie1-4/+0
We set this later in the non-gfx9 path, just remove these bits from here. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: "17.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-08-16radv/gfx9: fix set predication packet.Dave Airlie1-9/+12
The predication packet changed format on GFX9, update the driver. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: "17.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-08-10ac: fail shader compilation if libelf is replaced by an incompatible versionMarek Olšák2-3/+11
UE4Editor has this issue. This commit prevents hangs (release build) or assertion failures (debug build). It doesn't fix the editor, but catastrophic scenarios are prevented. Cc: 17.1 17.2 <mesa-stable@lists.freedesktop.org> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-08-09radv: force cs/ps/l2 flush at end of command stream. (v2)Dave Airlie1-1/+4
This seems like a workaround, but we don't see the bug on CIK/VI. On SI with the dEQP-VK.memory.pipeline_barrier.host_read_transfer_dst.* tests, when one tests complete, the first flush at the start of the next test causes a VM fault as we've destroyed the VM, but we end up flushing the compute shader then, and it must still be in the process of doing something. Could also be a kernel difference between SI and CIK. v2: hit this with a bigger hammer. This fixes a bunch of hangs in the vk cts with the robustness tests. Fixes: f4e499ec791 ("radv: add initial non-conformant radv vulkan driver") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101334 Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-08-08ac/nir: fix saturate emissionConnor Abbott1-2/+2
The .f32 was already getting added by emit_intrin_2f_param(). Noticed when enabling LLVM module verification. Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-08-08radv: remove semicolon in if(...);Bas Nieuwenhuizen1-1/+1
Trivial. Fixes: a6a6146aa91 "radv: Don't allow fmask swizzling for shareable images."
2017-08-07radv: Fix decompression on multisampled depth buffersAlex Smith2-35/+69
Need to take the sample count into account in the depth decompress and resummarize pipelines and render pass. Fixes: f4e499ec791 ("radv: add initial non-conformant radv vulkan driver") Signed-off-by: Alex Smith <asmith@feralinteractive.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Cc: "17.2" <mesa-stable@lists.freedesktop.org>
2017-08-07radv: Don't allow fmask swizzling for shareable images.Bas Nieuwenhuizen1-1/+4
Also adds an assert because you never know how the winsys changes, and multiprocess format differences are annoying. Fixes: 1e696b962b7 "radv: add separate fmask tile swizzle counter." Reviewed-by: Dave Airlie <airlied@redhat.com>