aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* radeonsi: Count planes for imported textures.Bas Nieuwenhuizen2020-04-281-0/+9
| | | | | | | | | | | | | | | | For the DRI2 lowered YUV import separate pipe_resources get created but in the end the first resource just gets asked for NPLANES. Since 1) (Almost) everything uses the first resource + a plane index in the Gallium interface. 2) This mirrors non-imported textures. lets fix this in the driver. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4779>
* r600: Enable tesselation for NIRGert Wollny2020-04-281-3/+2
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4714>
* r600/sfn: Add tesselation shadersGert Wollny2020-04-288-4/+419
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4714>
* r600/sfn: Add lowering passes for Tesselation IOGert Wollny2020-04-285-0/+487
| | | | | | | Lower the input and output intrinsics to r600 specific LDS intrinsics Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4714>
* r600/sfn: Move removing of unused variablesGert Wollny2020-04-281-3/+4
| | | | | | | It doesn't make sense to do this in the optimization loop Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4714>
* r600/sfn: Handle LDS output in VSGert Wollny2020-04-282-1/+17
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4714>
* r600/sfn: derive the GS from the vertex stage for a common interfaceGert Wollny2020-04-282-4/+5
| | | | | | | The GS can also provide the primid Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4714>
* r600/sfn: extract class to handle the VS export to different stagesGert Wollny2020-04-288-467/+617
| | | | | | | This code can be shared with the TESS_EVAL shader Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4714>
* r600/sfn: Move some shader base methods to the public interfaceGert Wollny2020-04-281-5/+7
| | | | | | | This will be needed for handling the VS stage export better. Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4714>
* r600/sfn: Add methods to valuepool to get a vector of valuesGert Wollny2020-04-282-0/+22
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4714>
* r600/sfn: Move emission of barrier from compute shader to shader baseGert Wollny2020-04-284-11/+14
| | | | | | | Tess shaders also use these barriers. Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4714>
* r600/sfn: Emit some LDS instructionsGert Wollny2020-04-282-0/+53
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4714>
* r600/sfn: Handle umul24 and umad24Gert Wollny2020-04-282-1/+5
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4714>
* r600/sfn: Add IR instruction to fetch the TESS parametersGert Wollny2020-04-282-0/+31
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4714>
* r600/sfn: Add TF write instructionGert Wollny2020-04-284-0/+83
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4714>
* r600/sfn: Add LDS instruction to assembly conversionGert Wollny2020-04-281-0/+78
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4714>
* r600/sfn: Add LDS IO instructions to r600 IRGert Wollny2020-04-285-0/+166
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4714>
* r600/sfn: Don't emit inline constants in the r600 IRGert Wollny2020-04-281-23/+2
| | | | | | | | This can be handled when lowering to assembly, and it makes testing for indirect buffer and sampler access easier. Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4714>
* r600/sfn: simplify UBO lowering passGert Wollny2020-04-281-20/+15
| | | | | Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4714>
* r600: Handle texcoord semantics in LDS index evaluationGert Wollny2020-04-283-10/+12
| | | | | | | | With NIR the texcoord semantic is enabled, and hence we have to handle index evaluation differently here. Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4714>
* panfrost: Fix GL_EXT_vertex_array_bgraIcecream952020-04-281-1/+1
| | | | | | | | | | Previously, attributes would always use an RGBA swizzle, even if the format was BGRA. Fixes piglit tests bgra-sec-color-pointer and bgra-vert-attrib-pointer. Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4752>
* gallium/swr: Fix LLVM 11 compilation issuesJan Zielinski2020-04-278-35/+156
| | | | | | | | Changes needed to adapt to LLVM API changes in vector and pointer types. Reviewed-by: Krzysztof Raszkowski <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4769>
* freedreno: Fix calculation of the const buffer cmdstream size.Eric Anholt2020-04-271-1/+1
| | | | | | | | | The HW packet requires padding the number of pointers you emit, and we would assertion fail about running out of buffer space if the number of UBOs to be uploaded was odd. Fixes: b4df115d3f3c ("freedreno/a6xx: pre-calculate userconst stateobj size") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4621>
* zink: explicitly unref old fb object when setting new oneMike Blumenkrantz2020-04-271-1/+5
| | | | | | | | | | this object has a ref from being created, and its lifetime is expected to be a single frame, so remove that initial ref when we expect to stop using it Closes: #2648 Reviewed-by: Erik Faye-Lund <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4768>
* zink: remove framebuffer cacheMike Blumenkrantz2020-04-272-33/+4
| | | | | | | | this can only match when re-rendering identical frames, which is not a typical case. the lack of cache eviction also leads to memory ballooning. Reviewed-by: Erik Faye-Lund <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4768>
* st/dri: Set next in template instead of after creation. (v2)Bas Nieuwenhuizen2020-04-274-3/+5
| | | | | | | | | | | | | | | | | This should prevent horrors like Iris has with the delayed calls to iris_resource_finish_aux_import just because info is not available at allocation time. AFAICT all drivers just copy the template except radeonsi/r600 which reset the next pointer. AFAICT there is also no other place we get a state tracker setting next ptrs on a resource. v2: Updated Gallium docs. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3792>
* freedreno: Fix derivatives without texturing on a3xx-a5xx.Eric Anholt2020-04-273-5/+5
| | | | | | The shader variant tells us if we should set the PIXLODENABLE flag. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4685>
* ac,radeonsi: fix compilations issues with LLVM 11Samuel Pitoiset2020-04-271-1/+1
| | | | | | | | | | Latest LLVM replaced LLVMVectorTypeKind. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2826 Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4755>
* gallium/gallivm: remove unused header include for newer LLVMJan Zielinski2020-04-271-0/+2
| | | | | | | | | | In the top of the trunk LLVM (11) llvm/IR/CallSite.h header has been removed. The file compiles without this include also for LLVM 8, but I'm not sure about 9, 10, and older versions so I disable it only for the latest LLVM Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4748>
* gallium/gallivm: fix compilation issues with llvm 11Jan Zielinski2020-04-278-19/+26
| | | | | | | | | | | | Top of the trunk LLVM removes old vector type and introduces two new ones - one for fixed-width and one for scalable vectors. This commit fixes compilation issues by switching from LLVMVectorTypeKind to LLVMFixedVectorTypeKind for new LLVM. Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4748>
* drm-uapi,radv,radeonsi: Add amdgpu_drm.h header.Bas Nieuwenhuizen2020-04-273-3/+3
| | | | | | | | | | | | Use it instead of the libdrm provided amdgpu_drm.h header. I used the kernel revision from the README to get the header so the header versions should be consistent. Tested by removing /usr/include/libdrm/amdgpu_drm.h from my dev-machine. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4749>
* gallium: add PIPE_CAP_MAP_UNSYNCHRONIZED_THREAD_SAFE for glthreadMarek Olšák2020-04-275-5/+23
| | | | | | | and add radeonsi support. Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4758>
* ac: update and document fast math flags used by radeonsiMarek Olšák2020-04-271-1/+1
| | | | | | | | This should have no effect, because we never use FP division, but it's safer for the future. Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4696>
* gallivm: fix stencil borderDave Airlie2020-04-271-2/+10
| | | | | | | | | Fixes: dEQP-GLES31.functional.texture.border_clamp.unused_channels.depth32f_stencil8_sample_stencil dEQP-GLES31.functional.texture.border_clamp.sampler.uint_stencil Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>
* llvmpipe: clamp color storage for integer types.Dave Airlie2020-04-271-0/+5
| | | | | | | | | | | If storing to an integer for lower bit size (i.e. 16-bit uint to 10-bit uint), we need to clamp to the maximum value not truncate. Fixes: dEQP-VK.api.copy_and_blit.core.blit_image.all_formats.color.r16_uint.a2b10g10r10_uint_pack32.optimal_optimal_nearest Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>
* llvmpipe: enable stencil only formats. (v2)Dave Airlie2020-04-273-6/+11
| | | | | | | | | | | | This fixes two bugs, one in clearing and one in sign extensions for S8 only types, and enables it for use. These are useful for vulkan support later. v2: move casting to same place as Z casting. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>
* llvmpipe/setup: add point size clampingDave Airlie2020-04-273-2/+9
| | | | | | | | | Fixes dEQP-GLES2.functional.rasterization.limits.points dEQP-VK.rasterization.primitive_size.points.point_size* Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>
* llvmpipe: fix d32 unorm depth conversions.Dave Airlie2020-04-271-1/+4
| | | | | | | | | | | | | When the depth value was 1.0 and was being converted to Z32_UNORM the conversion would scale it up to INT32_MAX + 1 which would cause FPToSI to give incorrect results, changing it to use FPToUI for the unsigned 32-bit case only fixes it. Fixes: GTF-GL45.gtf30.GL3Tests.depth_texture.depth_texture_fbo_clear Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>
* draw/tess: fix TES patch vertices in.Dave Airlie2020-04-273-5/+11
| | | | | | | Fixes CTS KHR-GL45.tessellation_shader.single.max_patch_vertices Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>
* llvmpipe: fix ssbo alignmentDave Airlie2020-04-271-1/+1
| | | | | | | KHR-GL45.geometry_shader.api.max_shader_storage_blocks Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>
* llvmpipe: bump max images to 16Dave Airlie2020-04-271-1/+1
| | | | | | | This is needed to make some tests run, and helps for vulkan later. Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>
* util/indirect: handle stride less than number of parameters.Dave Airlie2020-04-271-1/+3
| | | | | | | | | | | It's legal to have a stride less than the num of parameters, in this case no need to try and over map the buffer which asserts Fixes: GTF-GL45.gtf43.GL3Tests.multi_draw_indirect.multi_draw_indirect_stride Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>
* gallivm/nir: add helper invocation supportDave Airlie2020-04-273-0/+13
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>
* gallivm/nir: fix image store conversionsDave Airlie2020-04-271-7/+13
| | | | | | | | | | | | This fixes a few of the image store paths, to do the correct clamping of unsigned/signed values Fixes: KHR-GLES31.core.layout_binding.block_layout_binding_block_ComputeShader KHR-GL45.shader_image_load_store.basic-allFormats-store KHR-GL46.shader_image_load_store.multiple-uniforms Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4574>
* freedreno/a6xx: Implement PrimID passthroughConnor Abbott2020-04-252-3/+9
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4704>
* ir3: Skip missing VS outputs in VS out map when linkingConnor Abbott2020-04-254-26/+12
| | | | | | | | | | | | | The hardware is capable of automatically filling in certain values in the VPC without writing them from the last geometry stage, like gl_PointCoord or gl_PrimitiveID when there is no GS. However, we *do* have to enable these outputs (i.e. set the VPC_VAR_DISABLE bit to 0) as VPC_VAR_DISABLE is really about FS inputs rather than VS outputs. To do this, we move the computation of the enable bits to ir3_link_add(), which is also a nice refactor anyway. In addition we detect the PrimID case specifically so that the driver can program the location. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4704>
* freedreno/a6xx: Document PrimID passthrough registersConnor Abbott2020-04-251-1/+1
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4704>
* etnaviv: Fix depth stencil ops on GC880/GC2000Marek Vasut2020-04-241-2/+2
| | | | | | | | | | | | | | | | | | | This patch fixes depth stencil ops on MX6S GC880 and MX6Q GC2000. The following dEQPs now pass: dEQP-GLES2.functional.fragment_ops.depth_stencil.stencil_depth_funcs.* dEQP-GLES2.functional.fragment_ops.depth_stencil.stencil_ops.* which is roughly 600 fixed dEQP tests. The problem is that if the front-facing stencil has a value mask 0x00 and the back-facing stencil has some non-zero value mask, then the stencil part of the depth stencil buffer is written with 0x00 unconditionally. The blob replicates the value mask of the back-facing stencil to the value mask of the front-facing stencil to achieve correct rendering, replicate the same behavior here. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4275>
* zink: set UBO alignments in nir_intrinsic_load_uniform loweringMike Blumenkrantz2020-04-241-0/+2
| | | | | | | | | | | | resolves this error error: nir_intrinsic_align_offset(instr) < nir_intrinsic_align_mul(instr) (../src/compiler/nir/nir_validate.c:582) in ext_packed_depth_stencil-readdrawpixels piglit test port of f5b14d983e5afa1b8f75e6f3692830a1ee46d1df Fixes: fb64954d9dd ("nir: Validate that memory load/store ops work on whole bytes") Reviewed-by: Erik Faye-Lund <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4711>
* freedreno: allow FMT6_8_UNORM as a UBWC formatFritz Koenig2020-04-241-0/+1
| | | | | | FMT6_8_UNORM is necessary for NV12 textures. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4722>