summaryrefslogtreecommitdiffstats
path: root/src/amd
Commit message (Collapse)AuthorAgeFilesLines
* ac/nir: handle old-style shadow tex instructions correctlyNicolai Hähnle2017-07-311-1/+3
| | | | | | The first element is only extracted for new-style shadow tex. Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: whitespace fixesNicolai Hähnle2017-07-311-1/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: use shader_info pass to determine whether instance_id is usedNicolai Hähnle2017-07-313-2/+9
| | | | | | This improves the separation of ABI and NIR translation. Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: move setting shader_info->fs.writes_memory to radv-specific codeNicolai Hähnle2017-07-311-6/+3
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: add image and write parameter to ac_shader_abi::load_sampler_descNicolai Hähnle2017-07-312-19/+28
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: add support for arrays-of-arrays to get_sampler_descNicolai Hähnle2017-07-311-5/+20
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: pass ac_nir_context to tex_fetch_ptrs and related functionsNicolai Hähnle2017-07-311-75/+83
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: add and use ac_shader_abi::load_sampler_descNicolai Hähnle2017-07-312-48/+84
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: pass ac_nir_context to visit_tex and various related functionsNicolai Hähnle2017-07-311-117/+118
| | | | | | | Get most of the churn out of the way before actually loading samplers via the ABI. Reviewed-by: Marek Olšák <[email protected]>
* ac/nir,radeonsi: add ac_shader_abi::chip_classNicolai Hähnle2017-07-312-0/+3
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir,radeonsi: add ac_shader_abi::load_uboNicolai Hähnle2017-07-312-0/+5
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: pass ac_nir_context to visit_load_ubo_bufferNicolai Hähnle2017-07-311-8/+8
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: pass ac_nir_context to visit_{load,store}_var and get_deref_offset ↵Nicolai Hähnle2017-07-311-75/+75
| | | | | | helper Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: pass ac_llvm_context to some helper functionsNicolai Hähnle2017-07-311-20/+20
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: pass ac_nir_context to visit_intrinsicNicolai Hähnle2017-07-311-52/+52
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: add ac_nir_context::main_functionNicolai Hähnle2017-07-311-0/+3
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: split scanning outputs from setting up output allocasNicolai Hähnle2017-07-311-8/+43
| | | | | | | The scanning phase sets the driver_location, because it is part of the ABI: radeonsi does the assignment differently. Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: pass ac_llvm_context to *build_alloca* helpersNicolai Hähnle2017-07-311-9/+9
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: use ac_shader_abi::emit_outputsNicolai Hähnle2017-07-311-2/+14
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac,radeonsi: add ac_shader_abi::emit_outputs for hardware VS shadersNicolai Hähnle2017-07-311-0/+4
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: translate NIR to LLVMNicolai Hähnle2017-07-311-1/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: add ac_shader_abi::inputsNicolai Hähnle2017-07-312-0/+9
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: begin splitting off ac_nir_contextNicolai Hähnle2017-07-312-234/+290
| | | | | | | | | | | | | The eventual goal is to hide all radv-specific details behind ac_nir_context::abi, so that the NIR->LLVM code can be re-used by radeonsi. During development, we live with a partial split, where some of the NIR->LLVM code still relies on linking back to the nir_to_llvm_context (which should ultimately be renamed to reflect that it's radv-specific). The idea is to get rid of these backlinks over time. Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: start using ac_shader_abiNicolai Hähnle2017-07-311-20/+18
| | | | | | v2: update for LLVMValueRefs in ac_shader_abi Reviewed-by: Marek Olšák <[email protected]>
* ac,radeonsi: move some VS input descriptions to ac_shader_abiNicolai Hähnle2017-07-311-0/+40
| | | | | | v2: use LLVM values instead of function parameter indices Reviewed-by: Marek Olšák <[email protected]>
* radv: for stencil only set Z tile mode index to same valueDave Airlie2017-07-281-0/+2
| | | | | | | | | | | | On SI this was causing a hang in dEQP-VK.pipeline.render_to_image.core.2d_array.mipmap.r16g16_sint_s8_uint This was due to not handling the tile mode index for depth like I fixed previously for new GPUs. Fixes: 01d0c5a9 (radv: fix stencil regression since new addrlib import) Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: port SI TC L1 write corruption fix.Dave Airlie2017-07-261-3/+5
| | | | | | | | | This ports 72e46c988 to radv. radeonsi: apply a TC L1 write corruption workaround for SI Fixes: f4e499ec7 (radv: add initial non-conformant radv vulkan driver) Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/winsys: fix padding command stream for SIDave Airlie2017-07-261-4/+6
| | | | | | | | We were adding pad to size after creating the object, so we could submit a CS bigger than the bo created for it. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: realign SI workaround with radeonsi.Dave Airlie2017-07-261-2/+3
| | | | | | | | | | | | This ports: da7453666ae radeonsi: don't apply the Z export bug workaround to Hainan to radv. Just noticed in passing. Fixes: f4e499ec7 (radv: add initial non-conformant radv vulkan driver) Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac/surface: fix hybrid graphics where APU=GFX9, dGPU=olderMarek Olšák2017-07-261-0/+12
| | | | | | | | v2: don't do it for compressed textures (bpp = 0) Cc: 17.2 <[email protected]> Reviewed-by: Alex Deucher <[email protected]> (v1) Reviewed-by: Nicolai Hähnle <[email protected]> (v1)
* radv: rename physical_device->uuid[] to cache_uuid[]Andres Rodriguez2017-07-263-5/+5
| | | | | | | We have a few UUIDs, so lets be more specific. Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* radv: only report external semaphore info for opaque fd.Dave Airlie2017-07-251-5/+10
| | | | | | | | | | Until we support sync fd, don't report the info. Fixes CTS dEQP-VK.api.external.semaphore.sync_fd.* from crashing. Fixes: eaa56eab6 (radv: initial support for shared semaphores (v2)) Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: fix buffer views on SI/CIK.Dave Airlie2017-07-241-0/+5
| | | | | | | | | Fixes CTS dEQP-VK.memory.pipeline_barrier.host_write_uniform_texel_buffer.1024 on SI/CIK with radv. Fixes: f4e499ec (radv: add initial non-conformant radv vulkan driver) Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: enable sample shadingDave Airlie2017-07-242-2/+4
| | | | | | | This calculates ps_iter_samples from the minSampleShading input Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: don't set dedicated bit for buffer external memory.Dave Airlie2017-07-241-2/+1
| | | | | | | | | | This is an alternate fix for the buffer export dedicated interaction. Fixes CTS dEQP-VK.api.external.memory.opaque_fd.dedicated.buffer.info Fixes: b70829708a (radv: Implement VK_KHR_external_memory) Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: fix non-0 based layer clears.Dave Airlie2017-07-241-4/+9
| | | | | | | | | | | If the layer base was > 0, it wasn't getting passed as the start instance or getting added in the shaders. Fixes CTS dEQP-VK.api.image_clearing.core.clear_color_attachment.2d_r8_uint_multiple_layers Fixes: 7e0382fb (radv: add support for layered clears (v2)) Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: check enabled device features.Dave Airlie2017-07-241-0/+13
| | | | | | | | | | | The spec says we should return VK_ERROR_FEATURE_NOT_PRESENT. Ported from anv. Fixes CTS test dEQP-VK.api.device_init.create_device_unsupported_features Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: for external memory imports close the fd on import successDave Airlie2017-07-241-1/+3
| | | | | | | | | | If we get an fd, we need to close it before returning. Fixes CTS test dEQP-VK.api.external.memory.opaque_fd.dedicated.device_only.import_multiple_times Fixes: b70829708a (radv: Implement VK_KHR_external_memory) Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Don't segfault when exporting an image which hasn't been bound yet.Bas Nieuwenhuizen2017-07-241-1/+1
| | | | | | | | | | | | | The image is set on Memory allocation already, but the image doesn't have to have the BindImageMemory called yet. Luckily, we know offset within a BO has to be 0 for dedicated allocations, so we can just use the dummy 0 in the address calaculations. Fixes CTS test dEQP-VK.api.external.memory.opaque_fd.dedicated.image.export_bind_import_bind Signed-off-by: Bas Nieuwenhuizen <[email protected]> Fixes: b70829708ac "radv: Implement VK_KHR_external_memory" Reviewed-by: Dave Airlie <[email protected]>
* radv: Handle VK_ATTACHMENT_UNUSED in color attachments.Bas Nieuwenhuizen2017-07-246-20/+45
| | | | | | | | | | | | This just sets them to INVALID COLOR, instead of shifting the attachments together. This also fixes a number of cases where we use it first and only then check if it is VK_ATTACHMENT_UNUSED. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver" Reviewed-by: Dave Airlie <[email protected]>
* radv: reset non-syncobj semaphore context after wait.Dave Airlie2017-07-221-0/+2
| | | | | | | | | | | When I ported from libdrm, I forgot to add the line to reset the sem, we just need to reset the context. This fixes a regression in DOOM. Fixes: 9ac1432a571 ("radv: port to new libdrm API.") Reported-by: Grazvydas Ignotas <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: rebase radv_entrypoints_gen.py on anv_entrypoints_gen.pyDylan Baker2017-07-212-275/+287
| | | | | | | | | | | | | The two generators forked from each other, and they remain basically the same. This rebases the radv version on the anv version, but with the radv changes ported over. The result is that we get rid of the "cat |" madness and gain mako, correct "generated by" attributions, and write files out directly. The only differences between the output is whitespace and comments. Signed-off-by: Dylan Baker <[email protected]> Acked-by: Dave Airlie <[email protected]>
* radv: Generate storage image descriptors unconditionallyAlex Smith2017-07-221-4/+1
| | | | | | | | | | | | | We can also use storage images internally for resolves, which don't require TRANSFER_DST usage on the image, so currently we may not create the needed descriptors. Just create these descriptors unconditionally. Fixes: 0e1886efb9e ("radv: Fix descriptors for cube images with VK_IMAGE_USAGE_STORAGE_BIT") Reported-by: Grazvydas Ignotas <[email protected]> Signed-off-by: Alex Smith <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: initial support for shared semaphores (v2)Dave Airlie2017-07-216-71/+359
| | | | | | | | | | | | | | | | | | | This adds support for sharing semaphores using kernel syncobjects. Syncobj backed semaphores are used for any semaphore which is created with external flags, and when a semaphore is imported, otherwise we use the current non-kernel semaphores. Temporary imports from syncobj fd are also available, these just override the current user until the next wait, when the temp syncobj is dropped. v2: allocate more chunks upfront, fix off by one after previous refactor of syncobj setup, remove unnecessary null check. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/winsys: add syncobj hooksDave Airlie2017-07-212-0/+44
| | | | | | | | This just adds syncobj create/destroy/export/import paths into the winsys interface. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac/gpu: add code to detect if kernel supports sync objects.Dave Airlie2017-07-212-0/+10
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Add support for VK_KHR_variable_pointers.Bas Nieuwenhuizen2017-07-203-0/+18
| | | | | | | | Just a trivial enable. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Connor Abbott <[email protected]> Acked-by: Dave Airlie <[email protected]>
* radv: Add VK_KHR_storage_buffer_storage_class support.Bas Nieuwenhuizen2017-07-202-0/+5
| | | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Connor Abbott <[email protected]> Acked-by: Dave Airlie <[email protected]>
* radv: port to new libdrm API.Dave Airlie2017-07-201-29/+92
| | | | | | | This bumps the libdrm requirement for amdgpu to the 2.4.82. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: introduce some wrapper in cs code to make porting off libdrm_amdgpu ↵Dave Airlie2017-07-201-18/+70
| | | | | | | | | | easier. This just introduces a central semaphore info struct, and passes it around, and introduces some wrappers that will make porting off libdrm_amdgpu easier. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>