summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
* gallium/swr: Enable GL_ARB_gpu_shader5: multiple streamsKrzysztof Raszkowski2019-10-293-3/+8
| | | | | | | Added support for geometry shader multiple streams (part of GL_ARB_gpu_shader5 extension). Reviewed-by: Jan Zielinski <[email protected]>
* util: remove LIST_IS_EMPTY macroTimothy Arceri2019-10-284-14/+14
| | | | | | | Just use the inlined function directly. The new function was introduced in addcf410. Reviewed-by: Eric Engestrom <[email protected]>
* util: rename list_empty() to list_is_empty()Timothy Arceri2019-10-282-3/+3
| | | | | | | This makes it clear that it's a boolean test and not an action (eg. "empty the list"). Reviewed-by: Eric Engestrom <[email protected]>
* util: remove LIST_DEL macroTimothy Arceri2019-10-288-18/+18
| | | | | | | Just use the inlined function directly. The macro was replaced with the function in ebe304fa540f. Reviewed-by: Eric Engestrom <[email protected]>
* util: remove LIST_DELINIT macroTimothy Arceri2019-10-282-4/+4
| | | | | | | Just use the inlined function directly. The macro was replaced with the function in ebe304fa540f. Reviewed-by: Eric Engestrom <[email protected]>
* util: remove LIST_REPLACE macroTimothy Arceri2019-10-281-1/+1
| | | | | | | Just use the inlined function directly. The macro was replaced with the function in ebe304fa540f. Reviewed-by: Eric Engestrom <[email protected]>
* util: remove LIST_ADD macroTimothy Arceri2019-10-283-4/+4
| | | | | | | Just use the inlined function directly. The macro was replaced with the function in ebe304fa540f. Reviewed-by: Eric Engestrom <[email protected]>
* util: remove LIST_ADDTAIL macroTimothy Arceri2019-10-288-17/+17
| | | | | | | Just use the inlined function directly. The macro was replaced with the function in ebe304fa540f. Reviewed-by: Eric Engestrom <[email protected]>
* util: remove LIST_INITHEAD macroTimothy Arceri2019-10-288-14/+14
| | | | | | | Just use the inlined function directly. The macro was replaced with the function in ebe304fa540f. Reviewed-by: Eric Engestrom <[email protected]>
* zink: add dri loaderDave Airlie2019-10-283-0/+30
| | | | | | | export MESA_LOADER_DRIVER_OVERRIDE=zink should now work without using swrast paths Acked-by: Jordan Justen <[email protected]>
* zink: introduce opengl over vulkanErik Faye-Lund2019-10-282-0/+18
| | | | | | | | | | Here's zink, a so far pretty simple vulkan-gallium driver that is able to translate some applications from OpenGL to Vulkan. The compiler is quite limited for now, this will be improved on later. Signed-off-by: Erik Faye-Lund <[email protected]> Acked-by: Jordan Justen <[email protected]>
* pipe-loader: Default to kmsro if probe failsAlyssa Rosenzweig2019-10-261-0/+5
| | | | | | | | | | | A device supported by kmsro will not automatically probe kmsro since the driver name will be panfrost/lima/v3d/..., not "kmsro". Since kmsro is a bit of a catch-all for generic (mostly embedded) GPUs, add a fallback on kmsro for the dynamic loader. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Acked-by: Karol Herbst <[email protected]>
* rbug: Fix use of alloca() without #include "c99_alloca.h"Jon Turney2019-10-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | [12/60] Compiling C object 'src/gallium/auxiliary/eb820e8@@gallium@sta/rbug_rbug_texture.c.o'. FAILED: src/gallium/auxiliary/eb820e8@@gallium@sta/rbug_rbug_texture.c.o [...] ../src/gallium/auxiliary/rbug/rbug_texture.c: In function 'rbug_send_texture_info_reply': ../src/gallium/auxiliary/rbug/rbug_texture.c:302:21: error: implicit declaration of function 'alloca'; did you mean 'malloc'? [-Werror=implicit-function-declaration] uint32_t *height = alloca(sizeof(uint32_t) * height_len); ^~~~~~ malloc ../src/gallium/auxiliary/rbug/rbug_texture.c:302:21: warning: initialization makes pointer from integer without a cast [-Wint-conversion] ../src/gallium/auxiliary/rbug/rbug_texture.c:303:20: warning: initialization makes pointer from integer without a cast [-Wint-conversion] uint32_t *depth = alloca(sizeof(uint32_t) * height_len); ^~~~~~ cc1: some warnings being treated as errors Include c99_alloca.h to portably make the alloca() prototype available. See also: 498d9d0f, adfb9c5c, fc8139b1 Fixes: 6174cba7 ("rbug: fix transmitted texture sizes") Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* gallium: Fix a bunch of undefined left-shifts in u_format_*Adam Jackson2019-10-243-56/+56
| | | | | Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* gallium/util: Cast to target type before shifting leftMichel Dänzer2019-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise a smaller type may be promoted to int, which can hit undefined behaviour: ../src/gallium/auxiliary/util/u_half.h:126:29: runtime error: left shift of 32768 by 16 places cannot be represented in type 'int' #0 0x5646ff63d488 in util_half_to_float ../src/gallium/auxiliary/util/u_half.h:126 #1 0x5646ff63d749 in _mesa_half_to_float ../src/util/half_float.c:145 #2 0x5646ff54d557 in nir_const_value_negative_equal ../src/compiler/nir/nir_instr_set.c:372 #3 0x5646ff44d29a in const_value_negative_equal_test_nir_type_float16_trivially_true_Test::TestBody() ../src/compiler/nir/tests/negative_equal_tests.cpp:121 #4 0x5646ff505c05 in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) ../src/gtest/src/gtest.cc:2402 #5 0x5646ff4f1513 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) ../src/gtest/src/gtest.cc:2438 #6 0x5646ff4979b5 in testing::Test::Run() ../src/gtest/src/gtest.cc:2474 #7 0x5646ff49a08e in testing::TestInfo::Run() ../src/gtest/src/gtest.cc:2656 #8 0x5646ff49c81c in testing::TestCase::Run() ../src/gtest/src/gtest.cc:2774 #9 0x5646ff4b81f6 in testing::internal::UnitTestImpl::RunAllTests() ../src/gtest/src/gtest.cc:4649 #10 0x5646ff50981e in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) ../src/gtest/src/gtest.cc:2402 #11 0x5646ff4f4eeb in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) ../src/gtest/src/gtest.cc:2438 #12 0x5646ff4af818 in testing::UnitTest::Run() ../src/gtest/src/gtest.cc:4257 #13 0x5646ff52e639 in RUN_ALL_TESTS() ../src/gtest/include/gtest/gtest.h:2233 #14 0x5646ff52e4f9 in main ../src/gtest/src/gtest_main.cc:37 #15 0x7f6bacb78bba in __libc_start_main ../csu/libc-start.c:308 #16 0x5646ff448019 in _start (/home/daenzer/src/mesa-git/mesa/build-amd64-sanitize/src/compiler/nir/negative_equal+0x17c019) Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Adam Jackson <[email protected]>
* tgsi_to_nir: use pipe_screen::finalize_nirMarek Olšák2019-10-231-4/+9
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* gallium: add pipe_screen::finalize_nirMarek Olšák2019-10-234-0/+32
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* gallium/noop: implement get_disk_shader_cache and get_compiler_optionsMarek Olšák2019-10-231-0/+18
| | | | trivial
* gallium: Drop the unused PIPE_FORMAT_A*L* formats.Eric Anholt2019-10-202-8/+0
| | | | | | | Now that Mesa is also using an array format for LA, nothing was using these. (And, clearly, no HW driver had exposed them). Reviewed-by: Marek Olšák <[email protected]>
* rbug: remove superfluous NULL checkLucas Stach2019-10-181-2/+1
| | | | | | | | The SCR_INIT macro used to install the rbug resource_changed method will only do so when the driver below rbug exposes this method, so the check will always evaluate to true. Signed-off-by: Lucas Stach <[email protected]>
* rbug: implement resource creation with modifierLucas Stach2019-10-181-0/+38
| | | | Signed-off-by: Lucas Stach <[email protected]>
* rbug: forward can_create_resource to pipe driverLucas Stach2019-10-181-0/+12
| | | | Signed-off-by: Lucas Stach <[email protected]>
* rbug: forward texture_barrier to pipe driverLucas Stach2019-10-181-0/+12
| | | | Signed-off-by: Lucas Stach <[email protected]>
* rbug: implement missing explicit sync related fence functionsLucas Stach2019-10-182-0/+38
| | | | Signed-off-by: Lucas Stach <[email protected]>
* rbug: move flush_resource initializationLucas Stach2019-10-181-1/+1
| | | | | | | | All the other context method initialzation follow the order of the pipe_context structure definition making it easy to find unimplemented methods in rbug. Move the flush_resource init to follow the same order. Signed-off-by: Lucas Stach <[email protected]>
* rbug: unwrap index buffer resourceLucas Stach2019-10-181-2/+7
| | | | | | | | | All resources passed to the drivers below rbug need to be unwrapped before being passed down. We missed to do this for the index buffer resource when this was made part of the draw_info structure. Fixes: 330d0607ed60 (gallium: remove pipe_index_buffer and set_index_buffer) Signed-off-by: Lucas Stach <[email protected]>
* rbug: fix transmitted texture sizesLucas Stach2019-10-181-2/+9
| | | | | | | | | | | | The rbug wire format defines the texture size parameters to be uint32_t sized and uses memcpy to move the function parameters to the message structure. This caused totally wrong transmitted texture sizes since the height and depth paramterds have been changed to uint16_t in the gallium API. Fix this by doing an explicit conversion to the correct representation before packing into the wire message. Fixes: e6428092f5e1 (gallium: decrease the size of pipe_resource - 64 -> 48 bytes) Signed-off-by: Lucas Stach <[email protected]>
* gallium/util: don't depend on implementation defined behavior in listen()Lucas Stach2019-10-181-1/+1
| | | | | | | | | | | | | | Using 0 as the backlog argument to listen() is exploiting implementation defined behavior and will lead to no connections being accepted on some libc implementations. Quote of the listen manpage: "A backlog argument of 0 may allow the socket to accept connections, in which case the length of the listen queue may be set to an implementation-defined minimum value." Fix this by using a more sensible backlog value. Signed-off-by: Lucas Stach <[email protected]>
* gallium/u_blitter: remove an unused variableMarek Olšák2019-10-171-2/+0
| | | | trivial
* gallivm: Fix saturated signed psub/padd intrinsics on llvm 8Roland Scheidegger2019-10-171-18/+10
| | | | | | | | | | | LLVM 8 did remove both the signed and unsigned sse2/avx intrinsics in the end, and provide arch-independent llvm intrinsics instead. Fixes a crash when using snorm framebuffers (tested with piglit arb_color_buffer_float-render GL_RGBA8_SNORM -auto). Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Dave Airlie <[email protected]> CC: <[email protected]>
* mesa/st: support lowering user-clip-planes automaticallyErik Faye-Lund2019-10-171-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa/gallium: automatically lower two-sided lightingErik Faye-Lund2019-10-171-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa/gallium: automatically lower point-sizeErik Faye-Lund2019-10-171-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa/gallium: automatically lower alpha-testingErik Faye-Lund2019-10-171-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium: add flatshade lowering capabilityDave Airlie2019-10-171-0/+3
| | | | | | | This allows the driver to request flatshade lowering. (NIR drivers only so far). Reviewed-by: Marek Olšák <[email protected]>
* gallium/u_blitter: set a more sane viewport-stateErik Faye-Lund2019-10-171-6/+5
| | | | | | | This actually corresponds to legal GL depth-ranges, because depth-clear values are always in the 0..1 range in OpenGL. Reviewed-by: Marek Olšák <[email protected]>
* gallivm/draw/swr: make the gs_iface not depend on tgsi.Dave Airlie2019-10-153-38/+41
| | | | | | | | | | | | | This gs_iface doesn't seem to require a dependence on the tgsi context, except for the swr end prim code. This refactors the API to include all the info that the swr code needs in the interface rather than having to dig it out of the struct inheritance. This is a precursor to adding NIR support to llvmpipe. Reviewed-by: Jan Zielinski <[email protected]>
* gallium: rename PIPE_CAP_MAX_FRAMES_IN_FLIGHT to PIPE_CAP_THROTTLEJames Xiong2019-10-141-1/+1
| | | | | | | | | v2: [ Michel Dänzer ] * Update src/gallium/docs/source/screen.rst accordingly Signed-off-by: James Xiong <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> # v1 Reviewed-by: Marek Olšák <[email protected]> # v1
* gallivm: fix coroutines on aarch64 with llvm 8Dave Airlie2019-10-111-0/+6
| | | | | | | | | | | | | | | The coroutine split pass is missing a dependency before LLVM 9.0, and fails to initialise properly if the CallGraphWrapperPass hasn't be initialised earlier (x86 does it due to some of it's passes requiring it). This is a workaround for llvm 8 (coroutines are only supported in 8 and higher). It adds another pass that has a dependency on the pass the coroutines split requires. This pass shouldn't have any raal effects. Fixes: d32690b43c9 (gallivm: add coroutine pass manager support) Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe: add support for tg4 component selection.Dave Airlie2019-10-111-0/+4
| | | | | | | This is needed as part of GLES3.1 and helps for ARB_gpu_shader5. Fixes: KHR-GLES31.core.texture_gather.* cases Reviewed-by: Roland Scheidegger <[email protected]>
* gallium: add a a new cap for changing the TGSI TG4 instruction encodingDave Airlie2019-10-111-0/+1
| | | | | | | | | | | | | Accessing the TG4 component via immediates in the llvmpipe backend is quite messy (like really messy). Roland suggested we change the instruction encoding, so introduce a cap to allow the component to be selected to be store in the sampler swizzle, which should be otherwise unused. I could probably switch all drivers over, but virgl would need some work that I'd prefer not to rush it. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* gallivm/sample: add gather component selection to the key.Dave Airlie2019-10-112-1/+16
| | | | | | This allows for component selection to work as per ARB_gpu_shader5/GLES3.1 Reviewed-by: Roland Scheidegger <[email protected]>
* meson: fix pipe-loader compilation for windowsDylan Baker2019-10-101-1/+6
| | | | | | | | v2: - Add missing D to pound define - Simply define the variable rather than set it to 1 (mirrors android.mk not scons) Acked-by: Kristian H. Kristensen <[email protected]>
* llvmpipe/draw: handle UBOs that are < 16 bytes.Dave Airlie2019-10-101-2/+7
| | | | | | | | | Not sure if this is a bug in the user or not, but some CTS tests fail due to using an 8 byte constant buffer. Fixes: KHR-GLES31.core.layout_binding.block_layout_binding_block_VertexShader Reviewed-by: Roland Scheidegger <[email protected]>
* gallium: remove PIPE_SHADER_CAP_SCALAR_ISAMarek Olšák2019-10-102-4/+0
| | | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* tgsi_to_nir: use nir_shader_compiler_options::lower_to_scalarMarek Olšák2019-10-101-5/+3
| | | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* tgsi_to_nir: add #ifdef header guardsMarek Olšák2019-10-101-0/+5
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* tgsi/scan: add tgsi_shader_info::msaa_images_declaredMarek Olšák2019-10-092-0/+19
| | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi: remove si_vid_join_surfaces and use combined planar allocationsMarek Olšák2019-10-092-0/+45
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* vl: use u_format in vl_video_buffer_formatsMarek Olšák2019-10-093-100/+25
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>