aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_device.c
Commit message (Collapse)AuthorAgeFilesLines
...
* radv: Add VkPhysicalDeviceIDProperties support.Bas Nieuwenhuizen2017-06-051-2/+22
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Don't use a separate can_expclear.Bas Nieuwenhuizen2017-05-221-18/+3
| | | | | | | We never use EXPCLEAR clears. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: enable POLARIS12 support.Dave Airlie2017-05-051-0/+1
| | | | | | | | | | | This just adds the chip in the right places. We don't set the partial_vs_wave workaround, as radeonsi doesn't, but have to confirm it's not required. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.1" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: don't leak DRM devicesGrazvydas Ignotas2017-05-031-1/+3
| | | | | | | | After successful drmGetDevices2() call, drmFreeDevices() needs to be called. Fixes: 743315f2 "radv: do not open random render node(s)" Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: fix possible stack corruptionGrazvydas Ignotas2017-05-031-1/+1
| | | | | | | | | | drmGetDevices2 takes count and not size. Probably hasn't caused problems yet in practice and was missed as setups with more than 8 DRM devices are not very common. Fixes: 743315f2 "radv: do not open random render node(s)" Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: flush more stages when semaphore are waiting.Dave Airlie2017-05-031-2/+22
| | | | | | | | | | | | | | | This still doesn't give us complete pWaitDstStageMask support, but it should provide enough to be correct if not as efficent as possible. If we have wait semaphores we must flush between submits and flush the shaders as well. This fixes the remaining fails in: dEQP-VK.synchronization.op.single_queue.semaphore.*ssbo* Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: move some image info into a separate struct.Dave Airlie2017-05-031-7/+7
| | | | | | | This is to rework the surface code like radeonsi. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: enable timestampComputeAndGraphicsGrazvydas Ignotas2017-04-171-1/+1
| | | | | | | | | | | | Commit bfee9866 "radv: Use RELEASE_MEM packet for MEC timestamp query." added WriteTimestamp handling for compute queues but forgot to flip the flag. Tested with DOOM (by me) and CTS (by Bas), but without verification that these tests actually use timestamps on compute queues. Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: remove irrelevant commentGrazvydas Ignotas2017-04-141-1/+1
| | | | | | | A leftover from anv. Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: report timestampPeriod correctlyGrazvydas Ignotas2017-04-141-1/+1
| | | | | | | | | | | | The kernel returns frequency in kHz, so to convert to nanosecond interval that Vulkan uses the dividend should be 1000000.0 and not 100000.0. This fixes the GPU graph in DOOM and matches the amdgpu-pro blob. Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver" Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Set descriptor set limits.Bas Nieuwenhuizen2017-04-131-15/+29
| | | | | | | Properly and with comments this time. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: bump maxGeometryShaderInvocations.Dave Airlie2017-04-141-1/+1
| | | | | | | | | This bumps it to the same level as amdgpu-pro, it also moves a bunch of dEQP-VK.geometry.instanced.* from NotSupported to Pass. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Enable query inheritance.Bas Nieuwenhuizen2017-04-131-1/+1
| | | | | | | | | | | | | | timestamp and pipeline_statistics only do something on begin & end, so they don't need any action. Occlusion queries only do something to enable/disable and that register is set nowhere else so that doesn't need extra support either. (We technically should fix it to update the reg with the number of samples, but that hasn't happened yet, so we only change it to enable/disable counting) Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: enable variableMultisampleRate.Bas Nieuwenhuizen2017-04-131-1/+1
| | | | | | | | | This is only relevant with 0 attachments. In that case we do nothing on subpass switch already, and the pipeline is the authoritative source of the number of samples, so this shouldn't change anything. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: fix stencil regression since new addrlib importDave Airlie2017-04-131-0/+8
| | | | | | | | | | The addrlib import meant we'd return after we attempted to setup the no stencil bits for an S8_UINT, now we break and use the stencil level info when creating stencil DB info. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Implement pipeline statistics queries.Bas Nieuwenhuizen2017-04-111-1/+1
| | | | | | | | | | | The devil is in the shader again, otherwise this is fairly straightforward. The CTS contains no pipeline statistics copy to buffer testcases, so I did a basic smoketest. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: implement VK_KHR_descriptor_update_templateFredrik Höglund2017-04-071-0/+4
| | | | | | | | | | | All offsets and strides are precomputed by radv_CreateDescriptorUpdateTemplateKHR and stored in the template. v2: Move the new struct declarations from radv_descriptor_set.h to radv_private.h (Bas) Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: implement VK_KHR_push_descriptorFredrik Höglund2017-04-071-1/+18
| | | | | Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Increase descriptor limits.Bas Nieuwenhuizen2017-04-041-14/+14
| | | | | | | | We supported more generally. Decreased the dynamic buffers though, as we only support 16 for uniform+storage. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Dave Airlie <[email protected]>
* radv: Enable VK_KHR_incremental_present.Bas Nieuwenhuizen2017-04-031-0/+4
| | | | | | | Just enabling the driver-independent implementation that Jason did. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* radv: overhaul fragment shader sample positions.Dave Airlie2017-04-041-6/+34
| | | | | | | | | | | | | | | | | | The current code was broken, and I decided to redesign it instead. This puts the sample positions for all samples into the queue constant descriptor buffer after all the spill/ring descriptors. It then uses a single offset register to point how far into the samples the samples for num_samples are. This saves one user sgpr and means we only generate the sample position data in the rare single case where we need it currently. This doesn't fix the failing CTS tests without the followup fix. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: enable tessellation shaders.Dave Airlie2017-04-011-9/+9
| | | | | | | | This enables tessellation shaders and sets some values for the maximums. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add tessellation ring allocation support. (v2)Dave Airlie2017-04-011-13/+193
| | | | | | | | | | | | This patch adds support for the offchip rings for storing tessellation factors and attribute data. It includes the register setup for the TF ring v2: always do tess ring size calcs (Bas) Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add support for some device specific tess information.Dave Airlie2017-04-011-0/+6
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Enable sparseBinding feature.Bas Nieuwenhuizen2017-03-291-4/+8
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Implement sparse memory binding.Bas Nieuwenhuizen2017-03-291-4/+80
| | | | | | | v2: Only submit when semaphores are specified. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Implement sparse buffer creation.Bas Nieuwenhuizen2017-03-291-2/+20
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: move KHR_get_physical_device_properties2 to instance props.Dave Airlie2017-03-211-4/+4
| | | | | | | | | This is an instance property not a device one. Fixes: dEQP-VK.api.info.device.extensions Signed-off-by: Dave Airlie <[email protected]>
* radv: drop illegal DB format error.Dave Airlie2017-03-211-3/+0
| | | | | | We'll get this if we have a stencil only setup. Signed-off-by: Dave Airlie <[email protected]>
* radv: fix logic for when to flush on multiple CS emissionDave Airlie2017-03-201-8/+8
| | | | | | | | | The current code evaluated to always true, we only want to flush on the first submit. Rename the variable to do_flush, and only emit on the first iteration. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: always create an fallback pipeline cacheTimothy Arceri2017-03-171-0/+17
| | | | | | | This will be used as an in-memory cache when a pipeline cache is not provided by the app. Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: do not open random render node(s)Emil Velikov2017-03-151-12/+36
| | | | | | | | | | | | | | | | drmGetDevices2() provides us with enough flexibility to build heuristics upon. Opening a random node on the other hand will wake up the device, regardless if it's the one we're interested or not. v2: Rebase. v3: Return VK_ERROR_INCOMPATIBLE_DRIVER for no devices (Ilia) Cc: Michel Dänzer <[email protected]> Cc: Dave Airlie <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> (v1) Reviewed-by: Eric Engestrom <[email protected]> (v1) Tested-by: Mike Lothian <[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: 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: Use winsys HTILE info.Bas Nieuwenhuizen2017-03-071-2/+2
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[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: avoid casting warnings on 32bitGrazvydas Ignotas2017-03-061-3/+2
| | | | | | | Use the same helpers as for other handle<->pointer conversions. Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/amdgpu: Add some debug flags.Bas Nieuwenhuizen2017-03-061-1/+3
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: add support for NV_dedicated_allocationDave Airlie2017-02-271-1/+39
| | | | | | | | | This adds initial support for NV_dedicated_allocation, then uses it for the wsi image/memory allocation paths internally in the driver. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* util/radv: move *_get_function_timestamp() to utilsTimothy Arceri2017-02-221-19/+3
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radv: remove unused radv_dispatch_table dtableEmil Velikov2017-02-211-1/+0
| | | | | | Fixes: 12301c54186 ("radv: drop the RADV_CALL macro.") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eduardo Lima Mitev <[email protected]>
* radv: Flush in the initial preamble CS.Bas Nieuwenhuizen2017-02-211-88/+136
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Special case the initial preamble.Bas Nieuwenhuizen2017-02-211-3/+3
| | | | | | | For flushing we don't want to flush every third IB. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Free empty_cs on device destruction.Bas Nieuwenhuizen2017-02-211-0/+2
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* vulkan/wsi/x11: add support to detect if we can support rendering (v3)Dave Airlie2017-02-201-1/+4
| | | | | | | | | | | | | | | | | This adds support to radv_GetPhysicalDeviceXlibPresentationSupportKHR and radv_GetPhysicalDeviceXcbPresentationSupportKHR to check if the local device file descriptor is compatible with the descriptor retrieved from the X server via DRI3. This will stop radv binding to an X server until we have prime support in place. Hopefully apps use this API before trying to render things. v2: drop unneeded function, don't leak memory. (jekstrand) v3: also check in surface_get_support callback. Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* Revert "radv: detect command buffers that do no work and drop them (v2)"Dave Airlie2017-02-201-20/+7
| | | | | | | | | | | | | | | | This just keeps popping up minor problems and regressions we should revisit in a more sustainable manner later. This also reverts: Revert "radv: query cmds should mark a cmd buffer as having draws." Revert "radv: also fixup event emission to not get culled." This reverts commit d1640e79328af4a63c056e3ccab299a3bffbede7. This reverts commit 8b47b97215af7157bc15676167cab73aa5a61a76. This reverts commit b4b19afebeac84ddce3f1f8b7ffe0da6474fe29a. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Clamp framebuffer dimensions to min. attachment dimensions.Bas Nieuwenhuizen2017-02-191-6/+13
| | | | | | | | Even though the preferred stance is not to fix incorrect applications via the driver, this prevents some nasty GPU hangs. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Add support for shaderStorageImageReadWithoutFormat.Bas Nieuwenhuizen2017-02-151-1/+1
| | | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Dave Airlie <[email protected]>