summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
Commit message (Collapse)AuthorAgeFilesLines
* radv: handle layer export from vs->fs properlyDave Airlie2017-01-311-0/+14
| | | | | | | | Fixes: dEQP-VK.geometry.layered.1d_array.fragment_layer Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: emit esgs itemsize register.Dave Airlie2017-01-311-0/+2
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: handle prim id inputs to fragment shader.Dave Airlie2017-01-311-1/+15
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: emit geometry shaders to hardwareDave Airlie2017-01-311-2/+96
| | | | | | | This emits the compiled geometry shader and other state registers. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: emit geometry ring size and pointers via preamble (v2)Dave Airlie2017-01-313-11/+230
| | | | | | | | | | | | This uses the scratch infrastructure to handle the esgs and gsvs rings. (this replaces the old code that did this with patching). v2: fix correct ring sizes, reset sizes (Bas) Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add gs ring size calculations to pipeline.Dave Airlie2017-01-312-0/+34
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add pipeline creation support for geometry shaders (v2.1)Dave Airlie2017-01-313-8/+124
| | | | | | | | | | | This adds gs copy shader support to the pipeline cache, and few geometry related changes. v2: rebase for spill changes. v2.1: fix incorrect pipeline destruction. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: emit vertex shader to correct hw block.Dave Airlie2017-01-311-1/+20
| | | | | | | This emits the shader to the ES block in the correct case. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: extend shader stage code to cover geometry shaders.Dave Airlie2017-01-311-8/+22
| | | | | | | This enables the paths for setting up user ptrs to vs/es and gs. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: move hw vertex shader emit to separate functionDave Airlie2017-01-311-29/+40
| | | | | | | This is to later allow ES shaders to be emitted. Review-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: fixup ia multi vgt param code to handle geom shaders.Dave Airlie2017-01-311-11/+9
| | | | | | | This fixes up a few of the commented out blocks. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add code to set gs_table_depth.Dave Airlie2017-01-312-0/+35
| | | | | Review-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add small helper to denote when a geom shader is in the pipeline.Dave Airlie2017-01-311-0/+5
| | | | | Review-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Prevent Coverity warningRobert Foss2017-01-301-0/+2
| | | | | | | | | Prevent Coverity seeing potential errors when src is no initialized in the switch case. Coverity-Id: 1396397 Signed-off-by: Robert Foss <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: handle transfer_write as a dst flag.Dave Airlie2017-01-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It appears we can get image barriers like: srcStageMask: VkPipelineStageFlags = 4096 (VK_PIPELINE_STAGE_TRANSFER_BIT) dstStageMask: VkPipelineStageFlags = 4096 (VK_PIPELINE_STAGE_TRANSFER_BIT) dependencyFlags: VkDependencyFlags = 0 memoryBarrierCount: uint32_t = 0 pMemoryBarriers: const VkMemoryBarrier* = NULL bufferMemoryBarrierCount: uint32_t = 0 pBufferMemoryBarriers: const VkBufferMemoryBarrier* = NULL imageMemoryBarrierCount: uint32_t = 1 pImageMemoryBarriers: const VkImageMemoryBarrier* = 0x7ffc882367b0 pImageMemoryBarriers[0]: const VkImageMemoryBarrier = 0x7ffc882367b0: sType: VkStructureType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER (45) pNext: const void* = NULL srcAccessMask: VkAccessFlags = 4096 (VK_ACCESS_TRANSFER_WRITE_BIT) dstAccessMask: VkAccessFlags = 4096 (VK_ACCESS_TRANSFER_WRITE_BIT) oldLayout: VkImageLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL (7) newLayout: VkImageLayout = VK_IMAGE_LAYOUT_GENERAL (1) srcQueueFamilyIndex: uint32_t = 4294967295 dstQueueFamilyIndex: uint32_t = 4294967295 image: VkImage = 0x2df55e0 subresourceRange: VkImageSubresourceRange = 0x7ffc882367e0: aspectMask: VkImageAspectFlags = 1 (VK_IMAGE_ASPECT_COLOR_BIT) baseMipLevel: uint32_t = 0 levelCount: uint32_t = 1 baseArrayLayer: uint32_t = 0 layerCount: uint32_t = 1 This fixes all the CTS dEQP-VK.memory.pipeline_barrier.transfer_dst tests here, not sure if this is a too large hammer. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Expose VK_KHR_maintenance1Andres Rodriguez2017-01-301-0/+4
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Fix vkCmdCopyImage for 2d slices into 3d ImagesAndres Rodriguez2017-01-301-1/+4
| | | | | | | | | | | | | | | Previously the z offset of the destination image was being ignored. It should be taken into account when copying into a 3d target. Also, img_extent_el.depth was being incorrectly clamped to 1 due to the source image being VK_IMAGE_TYPE_2D. This would result in the blit failing to iterate over all the 3d slices. Instead we clamp to the destination image type. Fixes failures in CTS tests: dEQP-VK.api.copy_and_blit.image_to_image.3d_images.* Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Expose transfer format features.Bas Nieuwenhuizen2017-01-301-0/+11
| | | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
* radv: Don't allow any operations on non-supported depth/stencil formats.Bas Nieuwenhuizen2017-01-301-4/+5
| | | | | | | | We really use the depth block for the blits. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: use new error codes for AllocateDescriptorSetsAndres Rodriguez2017-01-301-1/+1
| | | | | | | | | | There is a new error code in Maintenance1 that is more specific to the situation: VK_ERROR_OUT_OF_POOL_MEMORY_KHR Fixes CTS test case: dEQP-VK.api.descriptor_pool.out_of_pool_memory Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: vkAllocateCommandBuffers should NULL all output handlesAndres Rodriguez2017-01-301-0/+3
| | | | | | | This is part of the spec and fixes CTS tests: dEQP-VK.api.object_management.alloc_callback_fail_multiple.command_buffer_* Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add trim command pool stubAndres Rodriguez2017-01-301-0/+7
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Handle command buffers that need scratch memory.Bas Nieuwenhuizen2017-01-303-6/+199
| | | | | | v2: Create the descriptor BO with CPU access. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Track scratch usage across pipelines & command buffers.Bas Nieuwenhuizen2017-01-304-8/+119
| | | | | | | Based on code written by Dave Airlie. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv/ac: Add compiler support for spilling.Bas Nieuwenhuizen2017-01-301-1/+2
| | | | | | | Based on code written by Dave Airlie. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv/amdgpu: Support a preamble CS.Bas Nieuwenhuizen2017-01-304-15/+56
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: drop support for VK_AMD_NEGATIVE_VIEWPORT_HEIGHTAndres Rodriguez2017-01-281-4/+0
| | | | | | | | This extension was not correctly supported, and it conflicts with the VK_KHR_MAINTENANCE1 spec. Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: implement VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2Dave Airlie2017-01-282-1/+73
| | | | Signed-off-by: Dave Airlie <[email protected]>
* radv: use proper maximum slice for layered viewDave Airlie2017-01-281-2/+4
| | | | | | | | | this fixes deferred shadows with geom shaders enabled. but I think this fix is fine by itself. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: automake: Don't install vk_platform.h or vulkan.h.Emil Velikov2017-01-271-3/+1
| | | | | | | | | | | | | These files belong to the vulkan loader. Identical to 045f38a5075 vulkan: Don't install vk_platform.h or vulkan.h. Cc: Dave Airlie <[email protected]> Cc: Bas Nieuwenhuizen <[email protected]> Cc: 17.0 <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* radv: add missing extension errors in vk_errorf()Eric Engestrom2017-01-271-0/+6
| | | | | | | v2(Bas): Remove the extra VK_ERROR_FRAGMENTED_POOL cases. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add missing core errors in vk_errorf()Eric Engestrom2017-01-271-0/+4
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: program a default point size.Dave Airlie2017-01-251-1/+2
| | | | | | | | | | | | Along the lines of what 3b804819 anv: Default PointSize to 1.0 if not written by the shader does for anv, program a default point size in the hw of 1.0. This preempt fixes a bunch of geom shader tests. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: don't resubmit the same cs over and over while tracingGrazvydas Ignotas2017-01-231-2/+1
| | | | | | | Fixes: 97dfff54 ("radv: Dump command buffer on hang.") Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> CC: <[email protected]>
* radv: fix include order for installed headers v2Andres Rodriguez2017-01-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | In situations where libdrm_amdgpu and mesa are installed to the same location, the mesa installed headers will take precedence over the git source headers. This is due to the AMDGPU_CFLAGS containing the install directory. This situation can cause build errors if the git version of a header is newer than the currently installed version of a header (e.g. git pull updates vulkan.h) Note: using the same install prefix for mesa and libdrm is probably a common occurrence since it is described in the radeonBuildHowTo wiki: https://www.x.org/wiki/radeonBuildHowTo/ v2: added sign-off Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* radv: disable vertex reuse when writing viewport indexDave Airlie2017-01-181-0/+2
| | | | | | | | This fixes some issues we'd hit later if using viewport indexes. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add support for layered clears (v2)Dave Airlie2017-01-181-6/+22
| | | | | | | | | | | Just always use the layer clear pipelines, the overhead of emitting the layer shouldn't be too large. v2: Bas suggested we always use it. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add support for writing layer/viewport index (v2)Dave Airlie2017-01-181-1/+5
| | | | | | | | | | | This just adds the infrastructure to allow writing layer and viewport index. It's just a first patch out of the geom shader tree, and doesn't do much on its own. v2: add missing if statement change (Bas) Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: split color renderpass creation out.Dave Airlie2017-01-171-38/+49
| | | | | | | | This is just prep work for layered clears, it doesn't change anything. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Support multiple devices.Bas Nieuwenhuizen2017-01-162-44/+19
| | | | | | | | | | | | | | Pretty straightforward. Also deleted the big comment block as it is a pretty standard pattern for filling in arrays. Also removed the error message on non-existent devices, as getting 7 errors printed to the console each time you enumerate the devices is pretty confusing. v2: Add constant for number of DRM devices. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Get physical device from radv_device instead of the instance.Bas Nieuwenhuizen2017-01-169-49/+50
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv/meta: consolidate the depth stencil clear renderpassesDave Airlie2017-01-172-41/+48
| | | | | | | | We only need one per samples (maybe not even that), reduce all the unneeded ones. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: generate entrypoints from vk.xmlLionel Landwerlin2017-01-142-60/+56
| | | | | | | | | | v2: rework entry point iteration (Jason) cleanup unused imports v3: don't drop header installation (Emil) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* radv: make device extension setup dynamicAndres Rodriguez2017-01-142-65/+130
| | | | | | | | | | | | | | Each physical device may have different extensions than one another. Furthermore, depending on the software stack, some extensions may not be accessible. If an extension is conditional, it can be registered only when necessary. v2: removed unused function and fixed indentation Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: rename global extension properties structsAndres Rodriguez2017-01-141-14/+14
| | | | | | | | | | | | All extension arrays are global, but only one of them refers to instance extensions. The device extension array refers to extensions that are common across all physical devices. This disctinction will be more imporant once we have dynamic extension support for devices. Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: use a winsys context per-queue, instead of per device v2Andres Rodriguez2017-01-143-21/+22
| | | | | | | | | | | | | | | Queues are independent execution streams. The vulkan spec provides no ordering guarantees for different queues. By using a single context for all queues, we are forcing all commands into an unecessary FIFO ordering. This change is a preparation step to allow our-of-ordering scheduling of certain work tasks. v2: Fix a rebase error with radv_QueueSubmit() and trace_bo Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Support loader interface version 3.Bas Nieuwenhuizen2017-01-131-0/+45
| | | | | | | | | Port of 1e41d7f7b0855934744fe578ba4eae9209ee69f7: "anv: Support loader interface version 3 (patch v2)" Signed-off-by: Bas Nieuwenhuizen <[email protected]> Cc: [email protected] Reviewed-by: Emil Velikov <[email protected]>
* radv: remove some unused macros and functionsGrazvydas Ignotas2017-01-132-33/+1
| | | | | | | | | These seem unlikely to be used. Also remove irrelevant comment about SKL. v2: forgot to rebase on master Signed-off-by: Grazvydas Ignotas <[email protected]>
* radv: Call NIR passes using NIR_PASS_V.Bas Nieuwenhuizen2017-01-121-17/+7
| | | | | | | | Port of faa1edeeb7bbe9321c79587e592dce812e8caa78 "anv/pipeline: Call NIR passes using NIR_PASS_V" Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* radv: Call nir_lower_constant_initializers.Bas Nieuwenhuizen2017-01-121-0/+13
| | | | | | | | | Port of c5d664f9dc2d281c74844cef36ecb9f5862a8f6a "anv/pipeline: Call nir_lower_constant_initializers" Signed-off-by: Bas Nieuwenhuizen <[email protected]> Cc: <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>