aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_meta_resolve_cs.c
Commit message (Collapse)AuthorAgeFilesLines
* nir: Embed the shader_info in the nir_shader againJason Ekstrand2017-05-091-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit e1af20f18a86f52a9640faf2d4ff8a71b0a4fa9b changed the shader_info from being embedded into being just a pointer. The idea was that sharing the shader_info between NIR and GLSL would be easier if it were a pointer pointing to the same shader_info struct. This, however, has caused a few problems: 1) There are many things which generate NIR without GLSL. This means we have to support both NIR shaders which come from GLSL and ones that don't and need to have an info elsewhere. 2) The solution to (1) raises all sorts of ownership issues which have to be resolved with ralloc_parent checks. 3) Ever since 00620782c92100d77c660f9783504c6d80fa1d58, we've been using nir_gather_info to fill out the final shader_info. Thanks to cloning and the above ownership issues, the nir_shader::info may not point back to the gl_shader anymore and so we have to do a copy of the shader_info from NIR back to GLSL anyway. All of these issues go away if we just embed the shader_info in the nir_shader. There's a little downside of having to copy it back after calling nir_gather_info but, as explained above, we have to do that anyway. Acked-by: Timothy Arceri <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* radv: set base/ranges for push constant loads.Dave Airlie2017-05-081-0/+4
| | | | | | | | | This isn't necessary yet but I'd like to use the range in some future patches. [airlied: add new resolve pass] Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add subpass resolve compute pathDave Airlie2017-05-071-0/+93
| | | | | | | | | | This adds a path to allow compute resolves to be used for subpass resolves. This isn't used yet, but will be later. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/resolve: split resolve emission out for computeDave Airlie2017-05-071-63/+78
| | | | | | | This will allow to add a subpass compute resolve path. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: split out core part of resolve shaderDave Airlie2017-05-071-113/+5
| | | | | | | | I want to reuse the same code for the fragment shader version of the resolve shaders. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/meta: add srgb conversion to end of resolve shader.Dave Airlie2017-05-071-5/+53
| | | | | | | | | | | If we are resolving into an srgb dest, we need to convert to linear so the store does the conversion back. This should fix some wierdness seen when we subresolves hit the compute path. 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-1/+1
| | | | | | | This is to rework the surface code like radeonsi. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: use push descriptors in metaFredrik Höglund2017-04-141-45/+36
| | | | | | | Use push descriptors instead of temp descriptor sets. Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/ac: fixup texture coord to have right number of channels.Dave Airlie2017-03-091-1/+1
| | | | | | | | 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: 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: handle layered fast clears.Dave Airlie2017-02-191-0/+8
| | | | | | | | | | | | | | 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/meta: use VK_NULL_HANDLE for handlesGrazvydas Ignotas2016-12-101-2/+2
| | | | | | | | Otherwise we get 32bit warnings because handle is plain uint64_t there and NULL is not suited to initialize that. Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* nir/i965/anv/radv/gallium: make shader info a pointerTimothy Arceri2016-10-261-7/+7
| | | | | | | | | | When restoring something from shader cache we won't have and don't want to create a nir_shader this change detaches the two. There are other advantages such as being able to reuse the shader info populated by GLSL IR. Reviewed-by: Jason Ekstrand <[email protected]>
* radv: add initial non-conformant radv vulkan driverDave Airlie2016-10-071-0/+461
This squashes all the radv development up until now into one for merging. History can be found: https://github.com/airlied/mesa/tree/semi-interesting This requires llvm 3.9 and is in no way considered a conformant vulkan implementation. It can run a number of vulkan applications, and supports all GPUs using the amdgpu kernel driver. Thanks to Intel for providing anv and spirv->nir, and Emil Velikov for reviewing build integration. Parts of this are: Reviewed-by: Nicolai Hähnle <[email protected]> Acked-by: Edward O'Callaghan <[email protected]> Authors: Bas Nieuwenhuizen and Dave Airlie Signed-off-by: Dave Airlie <[email protected]>