summaryrefslogtreecommitdiffstats
path: root/src/amd
Commit message (Collapse)AuthorAgeFilesLines
* radv/ac: handle gs->copy shader clip distances.Dave Airlie2017-02-231-13/+68
| | | | | | | | | | | This fixes up the clip distance passing between the geometry shader and the copy shader. It packs the clip and cull distances into one or two consecutive slots, and avoids wasting space and make sure the gs output and copy shader input agree on where things are stored. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: pass clips properly from vertex->geometry shader stages.Dave Airlie2017-02-231-6/+40
| | | | | | | | | | | This works out the geometry shader clip/cull inputs separately to the outputs, and uses that information to read from the ES->GS ring buffer. It stores the clip/cull distances packed into one or two slots. It fixes the es output emission and gs input reading to match. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: rename num clips/cull to output clips/cullsDave Airlie2017-02-231-10/+10
| | | | | | | | | As geom shaders can have different ones on entry and exit. also move to uint8_t as these are never that big. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* vulkan: Combine wsi and util makefilesDylan Baker2017-02-221-1/+1
| | | | Reviewed-by: Matt Turner <[email protected]>
* radv: fix typo in the subpass barrier patch.Dave Airlie2017-02-221-1/+1
| | | | | | Fixes: dbb0eaccc radv: handle subpass cache flushes 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: make radv_resolve_entrypoint staticEmil Velikov2017-02-212-2/+1
| | | | | | | | Used only within the generated source file. Fixes: 12301c54186 ("radv: drop the RADV_CALL macro.") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eduardo Lima Mitev <[email protected]>
* radv: remove unused radv_dispatch_table dtableEmil Velikov2017-02-212-3/+0
| | | | | | Fixes: 12301c54186 ("radv: drop the RADV_CALL macro.") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eduardo Lima Mitev <[email protected]>
* radv: remove unneeded extern C notationEmil Velikov2017-02-211-7/+1
| | | | | | | Header is never #include(d) by a C++ source. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* radv: Don't flush at the start of a command buffer.Bas Nieuwenhuizen2017-02-211-15/+0
| | | | | | | The preamble flushes now and the rest is the responsibility of the app. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Flush in the initial preamble CS.Bas Nieuwenhuizen2017-02-213-90/+148
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Special case the initial preamble.Bas Nieuwenhuizen2017-02-214-15/+22
| | | | | | | 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: Split emitting the cache flush out.Bas Nieuwenhuizen2017-02-211-64/+77
| | | | | | | So that we can use it without a cmd_buffer. 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]>
* radv: handle subpass cache flushesDave Airlie2017-02-211-48/+63
| | | | | | | | | | | | | | | | This splits out the cache flush bit setting code dependent on the src/dest access flags. It then calls it from the subpass barrier code. It also marks a TODO to remove the aggressive CS/PS flushes at some point. This fixes a bunch of the dEQP-VK.renderpass.attachment_allocation.input_output.* tests. Signed-off-by: Dave Airlie <[email protected]>
* vulkan/wsi/x11: add support to detect if we can support rendering (v3)Dave Airlie2017-02-204-4/+12
| | | | | | | | | | | | | | | | | 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-206-32/+8
| | | | | | | | | | | | | | | | 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: Handle VK_REMAINING_ARRAY_LAYERS in fast clear eliminate.Bas Nieuwenhuizen2017-02-191-2/+2
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: handle layered fast clears.Dave Airlie2017-02-195-29/+43
| | | | | | | | | | | | | | This iterates the fast clear flush across the layers in the specified range. It also moves the compute resolve flush into the function and builds the range in there. This fixes: dEQP-VK.geometry.layered.* regressions since fast clears. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: pass subresourceRange by pointer.Dave Airlie2017-02-191-13/+13
| | | | | | | This struct is 5 dwords, we should really just pass a pointer to it. Signed-off-by: Dave Airlie <[email protected]>
* radv: fix typo in a2b10g10r10 fast clear calculation.Dave Airlie2017-02-191-1/+1
| | | | | | | | | | | | This fixes: dEQP-VK.renderpass.formats.a2b10g10r10_unorm_pack32* regressions. Fixes: f22836dbdd radv: Add CPU color packing for VK_FORMAT_A2B10G10R10_UNORM_PACK32. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Invert ring SGPR check.Bas Nieuwenhuizen2017-02-191-1/+1
| | | | | | | | | I assume this wants to check if all pipelines use the same SGPR for the rings. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Acked-by: Edward O'Callaghan <[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]>
* ac/llvm: use min+max instead of AMDGPU.clamp on LLVM 5.0Marek Olšák2017-02-181-0/+17
| | | | | | | It selects v_med3_f32, which has the same rate & size. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: stop using TGSI_OPCODE_CLAMP by moving it amd/commonMarek Olšák2017-02-182-0/+16
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* ac/llvm: fix various findMSB bugsMarek Olšák2017-02-181-2/+3
| | | | | | sffbh needs to be suffixed with ".i32" Reviewed-by: Dave Airlie <[email protected]>
* radv: Use different allocator for descriptor set vram.Bas Nieuwenhuizen2017-02-172-71/+29
| | | | | | | | | This one only keeps allocated memory in the list, and list nodes in the descriptor sets. Thsi doesn't need messing around with max_sets, and we get automatic merging of free regions. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Never try to create more than max_sets descriptor sets.Bas Nieuwenhuizen2017-02-172-2/+6
| | | | | | | | | | | We only use the freed ones after all free space has been used. If the app only allocates small descriptor sets, we might go over max_sets before the memory is full. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]> CC: <[email protected]> Fixes: f4e499ec79147f4172f3669ae9dafd941aaeeb65
* radv/ac: use shared umsb helper.Dave Airlie2017-02-161-17/+1
| | | | | Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeon/ac: add emit umsb shared code.Dave Airlie2017-02-162-0/+29
| | | | | | | | Since we shared imsb, makes sense to share umsb. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeon/ac: use llvm.amdgcn.sffbh intrinsic instead of AMDGPU.flbit.i32Dave Airlie2017-02-161-1/+2
| | | | | | | | Use the newer intrinsic. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: use shader imsb emission code.Dave Airlie2017-02-161-17/+1
| | | | | Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeon/ac: add ac_emit_imsb helper.Dave Airlie2017-02-162-0/+28
| | | | | | | | | We want to use a different intrinsic on newer llvm, so move this code to a shared area. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add fast color clear for b10g11r11Dave Airlie2017-02-161-0/+5
| | | | | | | This is used in DOOM, so provide the fast clear path for it. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Add support for shaderStorageImageReadWithoutFormat.Bas Nieuwenhuizen2017-02-152-1/+2
| | | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Add support for shaderStorageImageWriteWithoutFormat.Bas Nieuwenhuizen2017-02-152-2/+3
| | | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: also fixup event emission to not get culled.Dave Airlie2017-02-151-0/+1
| | | | | | | This is possibly a bad idea, I might have to consider a better one. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: query cmds should mark a cmd buffer as having draws.Dave Airlie2017-02-151-0/+4
| | | | | | | | This fixes a regression with the remove non-draw cmd buffers in queries. Fixes: 8b47b97215a radv: detect command buffers that do no work and drop them (v2) Signed-off-by: Dave Airlie <[email protected]>
* radv: fixup IA_MULTI_VGT_PARAM handling.Dave Airlie2017-02-144-31/+105
| | | | | | | | | This ports the remains of the workarounds from radeonsi for the non-TESS cases. It should provide equivalent workarounds for hawaii and bonarie. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: fix warning since using common gs emit codeDave Airlie2017-02-141-1/+0
| | | | Signed-off-by: Dave Airlie <[email protected]>
* radv: adopt some init config workarounds from radeonsi.Dave Airlie2017-02-151-2/+9
| | | | | | | | | Just one bonaire fix. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "13.0 17.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: re-enable init gfx state on CIK.Dave Airlie2017-02-151-2/+1
| | | | | | | | | Once the color alignment was fixed this works fine now. Tested-by: Kai Wasserbäch <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: align the initial state command buffer.Dave Airlie2017-02-151-0/+7
| | | | | | | | | This just adds the padding to align this to an 8 dword boundary. Tested-by: Kai Wasserbäch <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: fix cik macroModeIndex.Dave Airlie2017-02-151-0/+14
| | | | | | | | | | This just a CIK fix ported from radeonsi. Tested-by: Kai Wasserbäch <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "13.0 17.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: change base aligmment for allocated memory.Dave Airlie2017-02-151-1/+1
| | | | | | | | | | | | | | | On some CIK (Hawaii) this needs to be at least 64k, I'm not 100% sure it doesn't need to be 128k. This was causing fast clear eliminate to overwrite the previous buffer, which since my gfx init code, was the indirect buffer. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=99692 Tested-by: Kai Wasserbäch <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "13.0 17.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: use sendmsg emission interface.Dave Airlie2017-02-141-26/+4
| | | | | | | This uses the common code to emit the correct intrinsic. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeon/ac/llvm: add support for sendmsg emissionDave Airlie2017-02-142-0/+25
| | | | | | | | | This lets us use the new intrinsic on the correct version of llvm. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: disable gfx init on CIK for nowDave Airlie2017-02-141-1/+2
| | | | | | | Luzipher on irc report this hangs his Hawaii, disable for now until I get time to debug. Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: use common interp code for new intrinsicsDave Airlie2017-02-141-20/+41
| | | | | | | | This uses the common fs interp code to use the new llvm intrinsics so llvm can drop the old ones. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: use indirect buffer for initial gfx state.Dave Airlie2017-02-134-1/+62
| | | | | | | | | | This puts the common gfx state for the device into an indirect buffer, and just calls out to it, on CIK and above. This is taken from what radeonsi does. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>