summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/zink
Commit message (Collapse)AuthorAgeFilesLines
* zink: support arrays of samplersErik Faye-Lund2020-01-182-22/+60
| | | | | Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3275> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3275>
* zink: support sampling non-float texturesErik Faye-Lund2020-01-181-6/+7
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3275>
* zink: store image-type per textureErik Faye-Lund2020-01-181-7/+6
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3275>
* zink: avoid incorrect vector-constructionErik Faye-Lund2020-01-181-2/+2
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3275>
* zink: support offset-variants of texturingErik Faye-Lund2020-01-183-5/+17
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3275>
* zink: implement nir_texop_txsErik Faye-Lund2020-01-183-4/+50
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3275>
* zink: fixup initialization of operand_mask / num_extra_operandsErik Faye-Lund2020-01-141-2/+2
| | | | | | This doesn't change behavior, but makes the code a bit easier to read. Both values are zero, but I somehow swapped the logical meaning of them when initializing.
* nir/zink: move clip_halfz-lowering to common codeErik Faye-Lund2020-01-031-54/+1
| | | | | | | | Etnaviv also does the same thing, so let's try to avoid repetition here, and use the same for it code as well. Reviewed-by: Jonathan Marek <[email protected]> Tested-by: Paul Cercueil <[email protected]>
* zink: remove unused code-path in lower_pos_writeErik Faye-Lund2020-01-031-14/+8
| | | | | This code is never reached, because we don't call nir_lower_io before lowering this. So let's get rid of it.
* zink: use nir_fmul_immErik Faye-Lund2020-01-031-5/+5
| | | | | Reviewed-by: Jonathan Marek <[email protected]> Tested-by: Paul Cercueil <[email protected]>
* zink: implement load_vertex_idErik Faye-Lund2020-01-031-1/+21
| | | | | | | Not 100% sure if this matches the semantics, but it seems to pass the tests, so it seems like an improvement. Reviewed-by: Alyssa Rosenzweig <[email protected]>
* zink: factor out builtin-var creationErik Faye-Lund2020-01-031-15/+23
| | | | | | This is useful so we can reuse it for the next patch Reviewed-by: Alyssa Rosenzweig <[email protected]>
* zink: simplify front-face typeErik Faye-Lund2020-01-031-1/+1
| | | | Reviewed-by: Alyssa Rosenzweig <[email protected]>
* zink: implement some more trivial opcodesErik Faye-Lund2020-01-031-0/+3
| | | | Reviewed-by: Alyssa Rosenzweig <[email protected]>
* zink: implement txfErik Faye-Lund2020-01-033-8/+85
| | | | | | | texelFetch is a requirement for OpenGL 3.0, so this gets us a step closer to GL 3.0 support. Reviewed-by: Alyssa Rosenzweig <[email protected]>
* zink: implement nir_texop_txdErik Faye-Lund2019-12-194-11/+26
| | | | | | | | | | | | | This lets us enable PIPE_CAP_FRAGMENT_SHADER_TEXTURE_LOD, which in turns gives us ARB_shader_texture_lod. Still fails one piglit test on ANV, namely spec@arb_shader_texture_lod@execution@arb_shader_texture_lod-texgradcube, but with 33 new passing tests, I think this is worth it. Reviewed-by: Dave Airlie <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3140> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3140>
* zink: enable PIPE_CAP_MIXED_COLORBUFFER_FORMATSErik Faye-Lund2019-12-191-2/+0
| | | | | | | | This just works in Vulkan, there's no work neeed to enable it. Reviewed-by: Dave Airlie <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3148> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3148>
* gallium/util: add alignment parameter to util_upload_index_bufferErico Nunes2019-12-141-1/+1
| | | | | | | | | | At least on Mali Utgard, index buffers need to be aligned on 0x40. To avoid duplicating this, add an alignment parameter. Keep the previous default for the other existing users. Signed-off-by: Erico Nunes <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2445>
* zink: silence coverity errorErik Faye-Lund2019-11-291-1/+1
| | | | | | | | Coverity doesn't know that we always have coordinates if we have lod. To avoid annoying errors, let's just zero-initialize this. CoverityID: 1455202 Reviewed-by: Dave Airlie <[email protected]>
* zink: error-check right variableErik Faye-Lund2019-11-291-1/+1
| | | | | | | That's not the value we just allocated... CoverityID: 1455177 Reviewed-by: Dave Airlie <[email protected]>
* zink: avoid NULL-derefErik Faye-Lund2019-11-291-2/+1
| | | | | | | | Same story as the previous two commits; these functions dereference the memory they are pointed at. We can't do that. CoverityID: 1455180 Reviewed-by: Dave Airlie <[email protected]>
* zink: avoid NULL-derefErik Faye-Lund2019-11-291-2/+1
| | | | | | | | Similar to the previous commit, pipe_resource_reference also dereference the memory pointed at. Let's avoid it. CoverityID: 1455198 Reviewed-by: Dave Airlie <[email protected]>
* zink: avoid NULL-derefErik Faye-Lund2019-11-291-2/+1
| | | | | | | | | zink_render_pass_reference will dereference the memory 'dst' points at, which can't really go well. All we want to do here is to increase the reference-count, so let's use a different helper for that instead. CoverityID: 1455200 Reviewed-by: Dave Airlie <[email protected]>
* zink: handle calloc-failureErik Faye-Lund2019-11-291-0/+2
| | | | | | | | In case we fail to allocate the context, we should notice and fail gracefully. CoverityID: 1455193 Reviewed-by: Dave Airlie <[email protected]>
* zink: do not try to destroy NULL-fenceErik Faye-Lund2019-11-291-1/+1
| | | | | | | | destroy_fence doesn't handle NULL-pointers gracefully. So let's avoid hitting that code-path, by simply returning NULL early here instead. CoverityID: 1455179 Reviewed-by: Dave Airlie <[email protected]>
* zink: delete query rather than allocating a new oneErik Faye-Lund2019-11-291-1/+1
| | | | | | | | | | It seems I had some fat fingers when writing this function, and I accidentally ended up allocating a new query and immediately trying to delete an uninitialized pool instead of just deleting the pool of the query that was passed. CoverityID: 1455196 Reviewed-by: Dave Airlie <[email protected]>
* zink: fix crash when restoring sampler-statesErik Faye-Lund2019-11-293-1/+3
| | | | | | | | | | | | When I changed to heap-allocated sampler-objects, I missed the code-path that restores sampler-states after the blitter; it needs an array of pointers, not an array of VkSampler objects to behave. This fixes spec@arb_texture_cube_map@copyteximage for me. Signed-off-by: Erik Faye-Lund <[email protected]> Fixes: 5ea787950f6 ("zink: heap-allocate samplers objects") Reviewed-by: Dave Airlie <[email protected]>
* zink: reject invalid sample-countsErik Faye-Lund2019-11-291-0/+2
| | | | | | | | | Vulkan only allows power-of-two sample counts. We already kinda checked for this, but forgot to validate the result in the end. Let's check the result and error properly. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* zink: use true/false instead of TRUE/FALSEErik Faye-Lund2019-11-291-16/+16
| | | | Reviewed-by: Dave Airlie <[email protected]>
* util: Move gallium's PIPE_FORMAT utils to /util/format/Eric Anholt2019-11-145-5/+5
| | | | | | | | | | | | | | | To make PIPE_FORMATs usable from non-gallium parts of Mesa, I want to move their helpers out of gallium. Since u_format used util_copy_rect(), I moved that in there, too. I've put it in a separate directory in util/ because it's a big chunk of related code, and it's not clear to me whether we might want it as a separate library from libmesa_util at some point. Closes: #1905 Acked-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* zink: move drawing separate sourceErik Faye-Lund2019-11-134-296/+312
| | | | | This code is kinda stand-alone, and it makes it a bit easier to find the right source in the source-tree.
* zink: move blitting to separate sourceErik Faye-Lund2019-11-134-176/+188
| | | | | This code is kinda stand-alone, and it makes it a bit easier to find the right source in the source-tree
* zink: move filter-helper to separate helper-headerErik Faye-Lund2019-11-132-13/+41
| | | | This will help code-reuse a bit in the next commit.
* zink: move format-checking to separate sourceErik Faye-Lund2019-11-134-155/+161
| | | | | This code is more or less stand-alone, and this keeps the formats array a bit more encapsulated.
* zink: remove no-longer-needed hackErik Faye-Lund2019-11-121-10/+0
| | | | | | | It seems whatever was causing this is no longer an issue. So let's get rid of the hack here. Signed-off-by: Erik Faye-Lund <[email protected]>
* zink: implement buffer-to-buffer copiesErik Faye-Lund2019-11-121-0/+12
|
* zink: always allow transfer to/from buffersErik Faye-Lund2019-11-121-4/+2
|
* zink: correct depth-stencil formatErik Faye-Lund2019-11-111-1/+1
| | | | | | | | | | | | | | | | | | When using packed vulkan-formats on little-endian systems, we need to swap the components for the gallium formats. And since Zink isn't big-endian safe yet, little-endian is the only endianess we care about right now. This fixes a bunch of piglit tests, amongs others: - spec@arb_depth_texture@depth-level-clamp - spec@arb_depth_texture@depthstencil-render-miplevels * d=z24 - spec@arb_depth_texture@fbo-depth-gl_depth_component24-blit - spec@arb_depth_texture@fbo-depth-gl_depth_component24-copypixels - spec@arb_depth_texture@fbo-depth-gl_depth_component24-drawpixels - spec@arb_depth_texture@fbo-depth-gl_depth_component24-readpixels Signed-off-by: Erik Faye-Lund <[email protected]> Fixes: 8d46e35d16e ("zink: introduce opengl over vulkan")
* zink/spirv: add support for nir_op_flrpErik Faye-Lund2019-11-111-0/+15
| | | | | | | | This fixes the following piglit: spec@ati_fragment_shader@ati_fragment_shader-render-fog Signed-off-by: Erik Faye-Lund <[email protected]>
* zink: do advertize integer support in shadersErik Faye-Lund2019-11-061-1/+3
| | | | | | This is supported, so let's correct this. Signed-off-by: Erik Faye-Lund <[email protected]>
* zink/spirv: implement ball_fequal[2-4]Erik Faye-Lund2019-11-061-0/+12
|
* zink/spirv: implement ball_iequal[2-4]Erik Faye-Lund2019-11-061-0/+12
|
* zink/spirv: implement bany_inequal[2-4]Erik Faye-Lund2019-11-061-0/+12
|
* zink/spirv: implement bany_fnequal[2-4]Erik Faye-Lund2019-11-061-0/+12
|
* zink/spirv: support loading bool constantsErik Faye-Lund2019-11-061-5/+21
| | | | Seems I missed this before; let's add support for this.
* zink/spirv: drop temp-array for component-countErik Faye-Lund2019-11-061-6/+3
|
* zink: use u_blitter when format-reinterpretingErik Faye-Lund2019-11-061-0/+10
|
* zink: always allow sampling of imagesErik Faye-Lund2019-11-061-4/+3
| | | | This is required if we're going to blit from/to it using u_blitter.
* zink: transition resources before resolvingErik Faye-Lund2019-11-061-0/+8
|
* zink: disable fragment-shader texture-lodErik Faye-Lund2019-11-061-0/+2
| | | | | | | | We don't support nir_texop_txd, which is required by this cap. So let's disable it for now. Signed-off-by: Erik Faye-Lund <[email protected]> Fixes: 8d46e35d16e ("zink: introduce opengl over vulkan")