summaryrefslogtreecommitdiffstats
path: root/src/amd
Commit message (Collapse)AuthorAgeFilesLines
* radv: trivial tidy upsTimothy Arceri2017-03-152-5/+2
| | | | Reviewed-by: Edward O'Callaghan <[email protected]>
* radv/ac: workaround regression in llvm 4.0 releaseDave Airlie2017-03-151-1/+12
| | | | | | | | | | | | | | | LLVM 4.0 released with a pretty messy regression, that hopefully get fixed in the future. This work around was proposed by Tom, and it fixes the CTS regressions here at least, I'm not sure if this will cause any major side effects, but correctness over speed and all that. radeonsi should possibly consider the same workaround until an llvm fix can be found. Acked-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: gather4 cube workaround integerDave Airlie2017-03-151-1/+71
| | | | | | | | | | | | | | | | | | | | This fix is extracted from amdgpu-pro shader traces. It appears the gather4 workaround for integer types doesn't work for cubes, so instead if forces a float scaled sample, then converts to integer. It modifies the descriptor before calling the gather. This also produces some ugly asm code for reasons specified in the patch, llvm could probably do better than dumping sgprs to vgprs. This fixes: dEQP-VK.glsl.texture_gather.basic.cube.rgba8* Acked-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Set driver version to mesa version;Bas Nieuwenhuizen2017-03-151-1/+23
| | | | | | | | | | | | | I couldn't really find an encoding in the spec. I'm not sure it prescribes VK_MAKE_VERSION format, but vulkan.gpuinfo.org interprets it that way by default. vulkaninfo gives the raw number, so we could alternatively do something like 17001000, but that doesn't show up right on vulkan.gpuinfo.org again. Looking at that site, the -pro driver also uses VK_MAKE_VERSION, so keeping consistency is probably best. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]>
* radv: Increase api version to 1.0.42.Bas Nieuwenhuizen2017-03-151-1/+1
| | | | | | | | | I've skimmed to changes from 1.0.5 to 1.0.42 and I think we have all changes. We're still not conformant ofcourse, but this should not regress stuff, Signed-off-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]>
* radv: Flush before copying with PKT3_WRITE_DATA in CmdUpdateBufferAlex Smith2017-03-141-0/+2
| | | | | | | | | | | | | | | Need to flush before updating the buffer to ensure that the copy is ordered after previous accesses (assuming the app has performed the appropriate barriers). This fixes potential issues due to draws prior to an update reading the new buffer content, despite having the necessary barriers between them. Signed-off-by: Alex Smith <[email protected]> Cc: 17.0 <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Emit cache flushes before CP DMA.Bas Nieuwenhuizen2017-03-141-0/+3
| | | | | | | | The flushes could be due to TRANSFER barriers. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Cc: 17.0 <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* nir: Rework conversion opcodesJason Ekstrand2017-03-142-17/+13
| | | | | | | | | | | | | | | | | | | | | | | | The NIR story on conversion opcodes is a mess. We've had way too many of them, naming is inconsistent, and which ones have explicit sizes was sort-of random. This commit re-organizes things and makes them all consistent: - All non-bool conversion opcodes now have the explicit size in the destination and are named <src_type>2<dst_type><size>. - Integer <-> integer conversion opcodes now only come in i2i and u2u forms (i2u and u2i have been removed) since the only difference between the different integer conversions is whether or not they sign-extend when up-converting. - Boolean conversion opcodes all have the explicit size on the bool and are named <src_type>2<dst_type>. Making things consistent also allows nir_type_conversion_op to be moved to nir_opcodes.c and auto-generated using mako. This will make adding int8, int16, and float16 versions much easier when the time comes. Reviewed-by: Eric Anholt <[email protected]>
* radv: setup llvm target data layoutDave Airlie2017-03-141-0/+7
| | | | | | | | | | | | | | Ported from radeonsi, pointed out by Tom. "This prevents LLVM from using sext instructions for local memory offsets and allows the backend to fold immediate offsets into the instruction. This also prevents some incorrect code generation for ptrtoint and inttoptr instructions." Cc: "13.0 17.0" <[email protected]> Reviewed-by: Tom Stellard <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Reinitialise loaderMagic when allocating a cached command bufferAlex Smith2017-03-131-0/+1
| | | | | | | | | | | This must be set to ICD_LOADER_MAGIC by vkAllocateCommandBuffers, which was being done when allocating a new buffer but not when reusing an existing one in the cache. This would hit an assertion and crash in debug builds of the Vulkan loader. Fixes: 682248db451f ("radv: Cache command buffers in command pool.") Signed-off-by: Alex Smith <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* vulkan/wsi: Generate wayland protocol headers separately from EGLJason Ekstrand2017-03-131-3/+0
| | | | | | | | | | | | | | | | Previously, we were depending on EGL for generating the headers and providing the protocol symbols. However, since neither Vulkan driver actually wants to link against EGL, this is kind of pointless. It also creates a weird build dependency. v2 [Jason] - Add missing wsi/ prefix, MKDIR_GEN v3 [Emil Velikov] - include BUILT_SOURCES/generation rules outside of conditional Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* radv/wsi: Don't include wayland headersEmil Velikov2017-03-131-3/+0
| | | | | | | | | Unused and we'll rework the way wayland-drm-client-protocol.h is generated with later commit. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Acked-by: Dave Airlie <[email protected]>
* radv: Store shaders in VRAM.Bas Nieuwenhuizen2017-03-132-2/+2
| | | | | | | | | | Less IFETCH latency on misses. Shader code is write once read many, so GTT doesn't make much sense anyway. If it turns out to fragment the CPU visible VRAM too much, we can upload with SDMA. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv/ac: move to new image intrinsics.Dave Airlie2017-03-131-145/+77
| | | | | | | This hooks up radv to the new image intrinsic builders. Acked-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: disabled scaled formats for transfers.Dave Airlie2017-03-131-7/+10
| | | | | | | These really are only supported for vertex buffers. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* amd: remove shebang from python scriptsEmil Velikov2017-03-103-3/+0
| | | | | | | Analogous to earlier commit(s). Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* amd: remove execute bit from python scriptsEmil Velikov2017-03-103-0/+0
| | | | | | | Analogous to earlier commit(s). Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* radv: Don't flush the CB before doing a fast clear eliminate.Bas Nieuwenhuizen2017-03-091-2/+0
| | | | | | | | | The only way we write CMASK/DCC compressed textures through shaders is fast clears and CMASK/DCC inits, which have their own flushes. Hence the CB cache is always up to date. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Don't emit cache flushes on subpass switch.Bas Nieuwenhuizen2017-03-093-6/+0
| | | | | | | | I think we should only flush right before an action (draw/dispatch etc.), as otherwise it is too easy to issue redundant flushes. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Only flush for the needed stages, and before the flushes.Bas Nieuwenhuizen2017-03-091-6/+1
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Don't invalidate CB/DB for images that aren't modified outside CB/DB.Bas Nieuwenhuizen2017-03-091-9/+19
| | | | | | | | Without stores, the only writes are fast clears, transfers and metadata initialization, each of which have the appropiate invalidations already. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Flush more caches after writes.Bas Nieuwenhuizen2017-03-091-3/+9
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Don't flush for fixed-function reading.Bas Nieuwenhuizen2017-03-091-1/+0
| | | | | | | The data should always be in memory after a src flush. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Invalidate the correct caches for CB/DB dst barriers.Bas Nieuwenhuizen2017-03-091-5/+11
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Determine cache flushes per object.Bas Nieuwenhuizen2017-03-091-17/+19
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv/ac: fixup texture coord to have right number of channels.Dave Airlie2017-03-092-4/+4
| | | | | | | | Jason has patches to add validation to this area, this should fix radv shaders. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: remove duplicate initialization of alphaToOne featureDamien Grassart2017-03-081-1/+0
| | | | | | | | Fixes a GCC warning when compiling with -Wextra: radv_device.c:463:47: warning: initialized field overwritten [-Woverride-init] Signed-off-by: Damien Grassart <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: disable mip point pre clamping.Dave Airlie2017-03-081-1/+1
| | | | | | | | | No idea what this does, but disabling it fixes a bunch of failing CTS tests in the lod area, so let's go with that. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "13.0 17.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: fix multiple descriptor sets with dynamic buffersFredrik Höglund2017-03-071-3/+5
| | | | | | | | | | The dynamic_offset_offset in the descriptor set binding layout is relative to the dynamic_offset_start for the set in the pipeline layout. Cc: 17.0 <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: fix the size of the dynamic_buffers arrayFredrik Höglund2017-03-071-1/+1
| | | | | | | A buffer descriptor is 16 bytes, not 16 dwords. Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: fix the dynamic buffer index in vkCmdBindDescriptorSetsFredrik Höglund2017-03-071-1/+1
| | | | | | | | | This fixes the wrong dynamic buffer descriptors being updated when firstSet > 0. Cc: 17.0 <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* build: Replace NEED_RADEON_LLVM with HAVE_GALLIUM_LLVM.Matt Turner2017-03-071-1/+1
| | | | Reviewed-by: Emil Velikov <[email protected]>
* radv: Use the subresource range in HTILE initialization.Bas Nieuwenhuizen2017-03-072-7/+12
| | | | | | | v2: fix levelCount assert. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Use winsys HTILE info.Bas Nieuwenhuizen2017-03-076-87/+18
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv/amdgpu: Let addrlib calculate the HTILE parameters.Bas Nieuwenhuizen2017-03-072-0/+31
| | | | | | | | | | Still not sure we can support miptrees when sampling from HTILE enabled textures. Added the tcCompatible winsys stuff while I'm at it. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* amd/common: document PREDICATION OP 3 as 64-bit bool.Dave Airlie2017-03-071-0/+1
| | | | | | | This just documents some info for possible future use. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: handle z offset for 3d image <-> buffer copies.Dave Airlie2017-03-071-0/+4
| | | | | | | | This fixes: dEQP-VK.pipeline.render_to_image.3d.huge.depth.r8g8b8a8_unorm Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: move fast clear before resolve into own loop.Dave Airlie2017-03-071-8/+15
| | | | | | | | | Don't fast clear inside the meta loop as things get confused, fixes a crash in: dEQP-VK.api.copy_and_blit.resolve_image.whole_array_image.2_bit Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Disable HTILE for textures with multiple layers/levels.Bas Nieuwenhuizen2017-03-061-0/+3
| | | | | | | | | It has issues and the fix I'm working on is too complicated for stable, so disable for now. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]> CC: 13.0 17.0 <[email protected]>
* radv: Properly handle destroying NULL devices and instancesDave Airlie2017-03-071-0/+6
| | | | | | | | Ported from anv: 3d33a23e anv: Properly handle destroying NULL devices and instances Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: introduce i1true/i1false to context.Dave Airlie2017-03-071-32/+33
| | | | | | | | This uses these in a few places, and fixes one or two cases which were using da as 32-bit instead of bool. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: handle Z export using new builder.Dave Airlie2017-03-071-22/+19
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: move to using common ac_get_image_intr_name.Dave Airlie2017-03-071-40/+15
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeonsi/ac: move get_image_intr_name to commonDave Airlie2017-03-072-0/+31
| | | | | | | | This code is used in radv, so move to common build code. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Emit pending flushes before executing a secondary command bufferAlex Smith2017-03-061-0/+3
| | | | | | | | | | | | | | If we have any pending flushes on the primary command buffer, these must be performed before executing the secondary buffer. This fixes potential corruption when the contents of a subpass which clears any of its render targets are given in a secondary buffer: the flushes after a fast clear would not have been performed until the vkCmdEndRenderPass call. Signed-off-by: Alex Smith <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: 13.0 17.0 <[email protected]>
* radeonsi: drop support for LLVM 3.6 & 3.7Marek Olšák2017-03-063-38/+14
| | | | | | They are too old. Reviewed-by: Dave Airlie <[email protected]>
* radeonsi: set the convergent attribute where neededMarek Olšák2017-03-061-2/+6
| | | | Reviewed-by: Dave Airlie <[email protected]>
* gallivm,ac: add LP_FUNC_ATTR_CONVERGENTMarek Olšák2017-03-062-0/+2
| | | | Reviewed-by: Dave Airlie <[email protected]>
* radeonsi: fix LLVM 3.9 - don't use non-matching attributes on declarationsMarek Olšák2017-03-061-3/+3
| | | | | | | | | Call site attributes are used since LLVM 4.0. This also reverts commit b19caecbd6f310c1663b0cfe483d113ae3bd5fe2 "radeon/ac: fix intrinsic version check", because this is the correct fix. Reviewed-by: Dave Airlie <[email protected]>
* radv: Use the new L2 writeback flag.Bas Nieuwenhuizen2017-03-062-6/+6
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>