summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* broadcom/vc5: Split transform feedback specs update from buffers.Eric Anholt2018-03-261-27/+32
| | | | | The specs update will be changing based on additional state flags in the next commit, and this unindents the buffer update code.
* broadcom/vc5: Limit each transform feedback data spec to 16 dwords.Eric Anholt2018-03-262-14/+31
| | | | | | | | | The length-1 field only has 4 bits, so we need to generate separate specs when there's too much TF output per buffer. Fixes GTF-GLES3.gtf.GL3Tests.transform_feedback.transform_feedback_builtin_type and transform_feedback_max_interleaved.
* gallium/u_vbuf: Protect against overflow with large instance divisors.Eric Anholt2018-03-261-1/+10
| | | | | | | | | | | | GTF-GLES3.gtf.GL3Tests.instanced_arrays.instanced_arrays_divisor uses -1 as a divisor, so we would overflow to count=0 and upload no data, triggering the assert below. We want to upload 1 element in this case, fixing the test on VC5. v2: Use some more obvious logic, and explain why we don't use the normal round_up(). Reviewed-by: Brian Paul <[email protected]>
* winsys/amdgpu: always allow GTT placements on APUsMarek Olšák2018-03-261-7/+5
| | | | Reviewed-by: Christian König <[email protected]>
* radeonsi: don't reallocate on DMABUF export if local BOs are disabledMarek Olšák2018-03-262-5/+6
|
* gallium: Do not add -Wframe-address option for gcc <= 4.4.Vinson Lee2018-03-261-1/+1
| | | | | | | | | | | | | | | | This patch fixes these build errors with GCC 4.4. Compiling src/gallium/auxiliary/util/u_debug_stack.c ... src/gallium/auxiliary/util/u_debug_stack.c: In function ‘debug_backtrace_capture’: src/gallium/auxiliary/util/u_debug_stack.c:268: error: #pragma GCC diagnostic not allowed inside functions src/gallium/auxiliary/util/u_debug_stack.c:269: error: #pragma GCC diagnostic not allowed inside functions src/gallium/auxiliary/util/u_debug_stack.c:271: error: #pragma GCC diagnostic not allowed inside functions Fixes: 370e356ebab4 ("gallium: silence __builtin_frame_address nonzero argument is unsafe warning") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105529 Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallium: Correct minor typo in header commentsAlyssa Rosenzweig2018-03-261-1/+1
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* svga: simplify uses_flat_interp expression in emit_input_declarations()Brian Paul2018-03-231-1/+1
| | | | Reviewed-by: Neha Bhende <[email protected]>
* svga: replace unsigned with proper enum namesBrian Paul2018-03-232-15/+16
| | | | Reviewed-by: Neha Bhende <[email protected]>
* tgsi,softpipe: use enum tgsi_opcodeBrian Paul2018-03-233-8/+8
| | | | Reviewed-by: Eric Anholt <[email protected]>
* st/mesa,tgsi: use enum tgsi_opcodeBrian Paul2018-03-234-29/+29
| | | | | | | | | | | Need to update the tgsi code and st_glsl_to_tgsi code at the same time to prevent compile break since C++ is much pickier about implicit enum/unsigned casting. Bump size of glsl_to_tgsi_instruction::op to 10 bits to be sure to avoid MSVC signed enum overflow issue. No change in class size. Reviewed-by: Eric Anholt <[email protected]>
* tgsi/nir: use enum tgsi_opcodeBrian Paul2018-03-231-2/+2
| | | | Reviewed-by: Eric Anholt <[email protected]>
* tgsi: use enum tgsi_opcodeBrian Paul2018-03-235-14/+14
| | | | Reviewed-by: Eric Anholt <[email protected]>
* gallivm: use enum tgis_opcodeBrian Paul2018-03-232-8/+12
| | | | Reviewed-by: Eric Anholt <[email protected]>
* svga: use enum tgsi_opcodeBrian Paul2018-03-232-5/+5
| | | | Reviewed-by: Eric Anholt <[email protected]>
* tgsi: convert opcode macros to enumsBrian Paul2018-03-231-273/+275
| | | | | | Enums are nicer in gdb. Reviewed-by: Eric Anholt <[email protected]>
* nir: Rename image intrinsics to image_varJason Ekstrand2018-03-233-29/+29
| | | | | | | | | | | Generated with git grep -l nir_intrinsic_image | xargs \ sed -i 's/nir_intrinsic_image/nir_intrinsic_image_var/g' and some manual fixing in nir_intrinsics.h Reviewed-by: Timothy Arceri <[email protected]>
* virgl: add ARB_cull_distance support.Dave Airlie2018-03-234-5/+13
| | | | | | | This just allows the properties through to the host if we have cull dist support. Signed-off-by: Dave Airlie <[email protected]>
* broadcom/vc5: Allow FBOs with mixed color formats.Eric Anholt2018-03-221-1/+1
| | | | | This is required by GLES3, fixing GTF-GLES3.gtf.GL3Tests.framebuffer_srgb.framebuffer_srgb_draw
* broadcom/vc5: Add missing support for 2101010_REV vertex attributes.Eric Anholt2018-03-221-0/+8
| | | | | | | Fixes GTF-GLES3.gtf.GL3Tests.vertex_type_2_10_10_10_rev.vertex_type_2_10_10_10_rev_invalid2, where we hadn't thrown a GL error as needed in the extension-disabled case. We want to be exposing the extension anyway.
* gallium/winsys/kms: Add support for multi-planesLepton Wu2018-03-221-40/+112
| | | | | | | | | | | | | | | | | | | | | | | Add a new struct kms_sw_plane which delegate a plane and use it in place of sw_displaytarget. Multiple planes share same underlying kms_sw_displaytarget. v2: - add more check for plane size (Tomasz) v3: - split from larger patch (Emil) v4: - no change from v3 v5: - remove mapped field (Tomasz) v6: - remove change-id in commit message (Tomasz) v7: - add revision history in commit message (Emil) Reviewed-by: Tomasz Figa <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Lepton Wu <[email protected]>
* gallium/winsys/kms: Fix possible leak in map/unmap.Lepton Wu2018-03-221-7/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If user calls map twice for kms_sw_displaytarget, the first mapped buffer could get leaked. Instead of calling mmap every time, just reuse previous mapping. Since user could map same displaytarget with different flags, we have to keep two different pointers, one for rw mapping and one for ro mapping. Also introduce reference count for mapped buffer so we can unmap them at right time. v2: - avoid duplicated mapping and leaked mapping (Tomasz) v3: - split from larger patch (Emil) v4: - remove munmap from dt_destory (Emil) v5: - introduce reference count for mapping (Tomasz) - add back munmap in dt_destory v6: - remove change-id in commit message (Tomasz) v7: - remove munmap from dt_destory again (Emil) - add revision history in commit message (Emil) Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Tomasz Figa <[email protected]> Signed-off-by: Lepton Wu <[email protected]>
* broadcom/vc4: add path to nir_builder.hJuan A. Suarez Romero2018-03-221-1/+1
| | | | | | | | As the other VC4 files do. Otherwise, it won't find nir_builder.h v2: add path in source code rather changing autotools (Emil) Reviewed-by: Emil Velikov <[email protected]>
* autotools: add tegra header filesJuan A. Suarez Romero2018-03-221-0/+1
| | | | Reviewed-by: Emil Velikov <[email protected]>
* swr/rast: autotools: add events_private.proto in dist tarball.Juan A. Suarez Romero2018-03-221-0/+1
| | | | Reviewed-by: Emil Velikov <[email protected]>
* clover/llvm: Fix build against LLVM/Clang 4.0Aaron Watry2018-03-212-1/+3
| | | | | | | | The opencl 1.0 langstandard was renamed in 5.0+ v2: Move preprocessor check into compat.hpp Reviewed-by: Francisco Jerez <[email protected]>
* broadcom/vc5: Fix up the NIR types of FS outputs generated by NIR-to-TGSI.Eric Anholt2018-03-212-0/+16
| | | | | | | | | | Unfortunately TGSI doesn't record the type of the FS output like GLSL does, but VC5's TLB writes depend on the output's base type. Just record the type in the key at variant compile time when we've got a TGSI input and then fix it up. Fixes KHR-GLES3.packed_pixels.pbo_rectangle.rgba32i/ui and apparently a GPU hang that breaks most tests that come after it.
* radeonsi: fix a snprintf warning on gcc 7.3.0Marek Olšák2018-03-211-1/+1
|
* radeonsi/gfx9: print the swizzle mode for testdmaMarek Olšák2018-03-211-2/+16
| | | | Tested-by: Dieter Nützel <[email protected]>
* ac/surface: compute tile swizzle for GFX9Marek Olšák2018-03-212-0/+3
| | | | Tested-by: Dieter Nützel <[email protected]>
* broadcom/vc5: Don't skip job submit just because everything is scissored.Eric Anholt2018-03-212-10/+7
| | | | | | | | The coordinate shaders may now have side effects in the form of transform feedback. Part of fixing GTF-GLES3.gtf.GL3Tests.transform_feedback.transform_feedback_misc
* broadcom/vc5: Handle sparsely populated SO target array.Eric Anholt2018-03-211-7/+14
| | | | | Fixes GTF-GLES3.gtf.GL3Tests.transform_feedback.transform_feedback_state_variables
* broadcom/vc5: Fix 3D miplevel limit to match other texture targets.Eric Anholt2018-03-211-2/+1
| | | | | | Fixes segfault in GTF-GLES3.gtf.GL3Tests.texture_storage.texture_storage_texture_levels on level 13.
* broadcom/vc5: Clamp the instance divisor to 16 bits.Eric Anholt2018-03-211-1/+2
| | | | | | | Fixes debug assert on GTF-GLES3.gtf.GL3Tests.instanced_arrays.instanced_arrays_divisor Signed-off-by: Eric Anholt <[email protected]>
* radeon/vce: move feedback command inside of destroy functionLeo Liu2018-03-213-9/+12
| | | | | | | | | | | | | | | | | On the CI family, firmware requires the destory command have to be the last command in the IB, moving feedback command after destroy is causing issues on CI cards, so we have to keep the previous logic that moves destroy back to the last command. But as the original issue fixed previously, with the newer family like Vega10, feedback command have to be included inside of the task info command along with destroy command. Fixes: 6d74cb25("radeon/vce: move destroy command before feedback command") Signed-off-by: Leo Liu <[email protected]> Acked-by: Christian König <[email protected]> Cc: [email protected]
* clover: Dynamically calculate __OPENCL_VERSION__ and CLC language versionAaron Watry2018-03-211-2/+5
| | | | | | | | | | | | | | | | Use get_language_version to calculate default cl standard based on device capabilities and -cl-std specified in build options. v5; move dev_clc_version declaration from an earlier patch v4: Squash the __OPENCL_VERSION__ and CLC language version patches v3: (Jan) Allow device_version up to 2.2 while device_clc_version only goes to 2.0 Use get_cl_version to calculate version instead v2: Split out from the previous patch (Pierre) Signed-off-by: Aaron Watry <[email protected]> Reviewed-by: Pierre Moreau <[email protected]> CC: Jan Vesely <[email protected]>
* clover/llvm: Add get_[cl|language]_version, validation and some helpersAaron Watry2018-03-211-0/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Used to calculate the default CLC language version based on the --cl-std in build args and the device capabilities. According to section 5.8.4.5 of the 2.0 spec, the CL C version is chosen by: 1) If you have -cl-std=CL1.1+ use the version specified 2) If not, use the highest 1.x version that the device supports Curiously, there is no valid value for -cl-std=CL1.0 Validates requested cl-std against device_clc_version Signed-off-by: Aaron Watry <[email protected]> Reviewed-by: Pierre Moreau <[email protected]> v7: (Pierre) Split cl/clc versions into separate lists and make more references const. v6: (Pierre) Add more const and fix some whitespace v5: (Aaron) Use a collection of cl versions instead of switch cases Consolidates the string, numeric version, and clc langstandard::kind v4: (Pierre) Split get_language_version addition and use into separate patches Squash patches that add the helpers and validate the language standard v3: Change device_version to device_clc_version v2: (Pierre) Move create_compiler_instance changes to correct patch to prevent temporary build breakage. Convert version_str into unsigned and use it to find language version Add build_error for unknown language version string Whitespace fixes
* virgl: Implement seamless cube mapsStéphane Marchesin2018-03-212-1/+3
| | | | | | | | | | This was previously ignored. Along with the virglrenderer patch, this fixes ~100 dEQP tests: dEQP-GLES3.functional.texture.filtering.cube.* Signed-off-by: Stéphane Marchesin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* st/radeonsi: enable uniform packing in NIR backendTimothy Arceri2018-03-201-1/+5
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium: add packed uniform CAPTimothy Arceri2018-03-2018-0/+19
| | | | Reviewed-by: Marek Olšák <[email protected]>
* st/nir/radeonsi: move nir_lower_uniforms_to_ubo() to the state trackerTimothy Arceri2018-03-201-10/+0
| | | | | | | | | | | | | This will only ever be used by gallium drivers so it probably doesn't belong in the nir toolkit. Also we want to pass it some non NIR things in the following patch. To avoid regressions we wrap the lowering calls that have been moved to st_glsl_to_nir with a quick hack so that they are only called for radeonsi, we will replace the hack with a check for uniform packing in a following patch. Reviewed-by: Marek Olšák <[email protected]>
* broadcom/vc5: Add support for register spilling.Eric Anholt2018-03-193-0/+30
| | | | | | | | | | | | | | | Our register spilling support is nice to have since vc4 couldn't at all, but we're still very restricted due to needing to not spill during a TMU operation, or during the last segment of the program (which would be nice to spill a value of, when there's a long-lived value being passed through with little modification from the start to the end). We could do better by emitting unspills for the last-segment values just before the last thrsw, since the last segment is probably not the maximum interference area. Fixes GTF uniform_buffer_object_arrays_of_all_valid_basic_types and 3 others.
* st/nine: Fix non inversible matrix checkAxel Davy2018-03-181-1/+1
| | | | | | | | | | | | | There was a missing absolute value when checking if the determinant was big enough. Fixes: https://github.com/iXit/Mesa-3D/issues/292 Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]> Tested-by: Dieter Nützel <[email protected]> CC: "17.3 18.0" <[email protected]>
* st/nine: Fixes warning about implicit conversionAxel Davy2018-03-181-1/+1
| | | | | | | | | | | | Makes the conversion explicit. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=102542 Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]> Tested-by: Dieter Nützel <[email protected]> CC: "17.3 18.0" <[email protected]>
* st/nine: Fix bad tracking of vs textures for NINESBT_ALLAxel Davy2018-03-181-1/+1
| | | | | | | | | | | | | | | | Stateblocks with NINESBT_ALL should track all textures. For better performance they have a faster path which copies all the required. This path was only tracking ps textures. Fixes: https://github.com/iXit/Mesa-3D/issues/303 Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]> Tested-by: Dieter Nützel <[email protected]> CC: "17.3 18.0" <[email protected]>
* st/nine: Fix bad tracking of bound vs texturesAxel Davy2018-03-181-1/+1
| | | | | | | | | | | | An incorrect formula was used to compute bound_samplers_mask_vs. Since s is above always 8 for vs and the variable is encoded on 8 bits, it was always 0. This resulted in commiting the samplers every call when there was at least one texture read in the vs shader. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* r600: consolidate PIPE_BIND_SHARED/SCANOUT handlingMarek Olšák2018-03-162-14/+4
| | | | | | | | | | (Ported from radeonsi commit f70f6baaa3bb0f8b280ac2eaea69bbffaf7de840) Allows cached BOs to be reused in more cases. Bugzilla: https://bugs.freedesktop.org/105171 Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Michel Dänzer <[email protected]>
* tgsi: move tgsi_processor_to_shader_stage() to a headerEmil Velikov2018-03-162-15/+16
| | | | | | | | This way we can utilise it with later patches. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* etnaviv: remove superfluous \n from DBG(..) callersChristian Gmeiner2018-03-164-6/+6
| | | | | | | The DBG(..) macro appends a \n already so there is no need to do it twice. Signed-off-by: Christian Gmeiner <[email protected]>
* meson: fix pipe-loaders after omx changesDylan Baker2018-03-151-3/+4
| | | | | | | | | | | | with_gallium_omx used to be a boolean, but now it's a string. That means it needs to be compared to 'disabled' instead of false. CC: Rob Clark <[email protected]> Fixes: 34e852d5b50772199797ea839fc8d6b3805633ff ("meson: Re-add auto option for omx") Signed-off-by: Dylan Baker <[email protected]> Tested-by: Rob Clark <[email protected] Reviewed-by: Eric Engestrom <[email protected]>