aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* freedreno/a6xx: Fix timestamp queries.Eric Anholt2020-03-301-4/+10
| | | | | | | | | | | | | | | We were returning the same kind of result as time_elapsed (an end - start time in ns), which on a timestamp query is approximately zero since begin/end are at the same point in time. What we're supposed to return is a converted-to-ns timestamp based on the GPU clock. Remove the _pause() function for time_elapsed to reduce the command stream overhead, and just capture start (which is, unfortunately, going to happen on each tile and thus the final start value we ready will be the last tile of the frame, not the first). Fixes piglit spec/arb_timer_query/query gl_timestamp Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356>
* freedreno: Count blits in GL_TIME_ELAPSED and perf counter queries.Eric Anholt2020-03-305-6/+8
| | | | | | Fixes 0 gpu time reported for glBlitFramebuffer in apitrace replay --pgpu. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356>
* freedreno: Associate the acc query bo with the batch.Eric Anholt2020-03-301-0/+2
| | | | | | | Otherwise, a result query with wait won't trigger flushing the batch, and we can end up with zeroed results. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356>
* freedreno: Fix acc query handling in the presence of batch reordering.Eric Anholt2020-03-304-25/+62
| | | | | | | | | | When we switch batches and start a new draw, we need to cap the queries in the previous batch and start queries again in the new one. FD_STAGE_NULL got renamed to 0 so that it would naturally return !is_active and end the queries at the end of the batch. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356>
* freedreno: Remove the "active" member of queries.Eric Anholt2020-03-304-21/+9
| | | | | | | The state tracker only gets to begin/query/destroy when !active and end when active, so we have no need to try to track this ourselves. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356>
* freedreno: Remove always-true return from per-gen begin_query.Eric Anholt2020-03-305-13/+7
| | | | | | You should do failure-prone allocation in create_query, not begin, anyway. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356>
* etnaviv: compiled_framebuffer_state: get rid of SE_SCISSOR_*Christian Gmeiner2020-03-302-18/+5
| | | | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4278> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4278>
* etnaviv: s/scissor_s/scissorChristian Gmeiner2020-03-303-7/+7
| | | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4278>
* etnaviv: get rid of struct compiled_scissor_stateChristian Gmeiner2020-03-304-31/+15
| | | | | | | | We can reuse pipe_scissor_state. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4278>
* etnaviv: do the left shift by 16 at emit timeChristian Gmeiner2020-03-302-16/+16
| | | | | | | | Also round up the max bounds. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4278>
* etnaviv: rework clippling calculation to be a derived stateChristian Gmeiner2020-03-303-43/+48
| | | | | | | | This moves the whole clipping calculation out of the emit function. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4278>
* etnaviv: get rid of SE_CLIP_*Christian Gmeiner2020-03-303-28/+14
| | | | | | | | | | The only difference between e.g. SE_SCISSOR_RIGHT and SE_CLIP_RIGHT is the used margin value. With that information we can remove SE_CLIP_* and apply the different margins during emit time. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4278>
* scons: Prune out unnecessary targets.Jose Fonseca2020-03-3017-799/+0
| | | | | | | | | | | | | | | | This prunes out all targets except libgl-gdi, libgl-xlib, and svga, as suggested by Marek Olšák. libgl-xlib will be remove once I have had time to confirm no automated tests we have rely upon it. There are also a bunch of Makefile.sources which become orphaned as result, that are not taken care of in this change. v2: Prune remainders of swr support. Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4348> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4348>
* radeon: switch to 3-spaces stylePierre-Eric Pelloux-Prayer2020-03-3021-9286/+8970
| | | | | | | | For clang-format config see the previous commit. Reviewed-by: Marek Olšák <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4319> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4319>
* radeonsi: switch to 3-spaces stylePierre-Eric Pelloux-Prayer2020-03-3052-46736/+42975
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generated automatically using clang-format and the following config: AlignAfterOpenBracket: true AlignConsecutiveMacros: true AllowAllArgumentsOnNextLine: false AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: false AlwaysBreakAfterReturnType: None BasedOnStyle: LLVM BraceWrapping: AfterControlStatement: false AfterEnum: true AfterFunction: true AfterStruct: false BeforeElse: false SplitEmptyFunction: true BinPackArguments: true BinPackParameters: true BreakBeforeBraces: Custom ColumnLimit: 100 ContinuationIndentWidth: 3 Cpp11BracedListStyle: false Cpp11BracedListStyle: true ForEachMacros: - LIST_FOR_EACH_ENTRY - LIST_FOR_EACH_ENTRY_SAFE - util_dynarray_foreach - nir_foreach_variable - nir_foreach_variable_safe - nir_foreach_register - nir_foreach_register_safe - nir_foreach_use - nir_foreach_use_safe - nir_foreach_if_use - nir_foreach_if_use_safe - nir_foreach_def - nir_foreach_def_safe - nir_foreach_phi_src - nir_foreach_phi_src_safe - nir_foreach_parallel_copy_entry - nir_foreach_instr - nir_foreach_instr_reverse - nir_foreach_instr_safe - nir_foreach_instr_reverse_safe - nir_foreach_function - nir_foreach_block - nir_foreach_block_safe - nir_foreach_block_reverse - nir_foreach_block_reverse_safe - nir_foreach_block_in_cf_node IncludeBlocks: Regroup IncludeCategories: - Regex: '<[[:alnum:].]+>' Priority: 2 - Regex: '.*' Priority: 1 IndentWidth: 3 PenaltyBreakBeforeFirstCallParameter: 1 PenaltyExcessCharacter: 100 SpaceAfterCStyleCast: false SpaceBeforeCpp11BracedList: false SpaceBeforeCtorInitializerColon: false SpacesInContainerLiterals: false Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4319>
* radeon: fix includesPierre-Eric Pelloux-Prayer2020-03-304-0/+9
| | | | | | | And add required forward declarations. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4319>
* ddebug: add missing forward declarationPierre-Eric Pelloux-Prayer2020-03-301-0/+1
| | | | | Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4319>
* meson: inline `inc_common`Eric Engestrom2020-03-2832-33/+34
| | | | | | | | | Let's make it clear what includes are being added everywhere, so that they can be cleaned up. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4360>
* radeonsi/gfx10: fix descriptors and compute registers for compute-based cullingMarek Olšák2020-03-281-14/+39
| | | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4269> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4269>
* radeonsi/gfx10: fix the wave size for compute-based cullingMarek Olšák2020-03-285-6/+19
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4269>
* radeonsi/gfx10: user correct ACQUIRE_MEM packet for compute-based cullingMarek Olšák2020-03-281-8/+23
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4269>
* radeonsi/gfx10: fix ds.ordered.add intrinsic for compute-based cullingMarek Olšák2020-03-281-0/+3
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4269>
* radeonsi/gfx10: don't use NGG culling if compute-based culling is usedMarek Olšák2020-03-281-0/+1
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4269>
* radeonsi: add num_vbos_in_user_sgprs into the shader cache keyMarek Olšák2020-03-281-0/+3
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4269>
* radeonsi: always create wait_mem_scratch for compute-based cullingMarek Olšák2020-03-281-1/+2
| | | | | | | used by the primitive restart emulation Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4269>
* radeonsi: set amdgpu-gds-size for mode == 2 of compute-based cullingMarek Olšák2020-03-281-1/+4
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4269>
* radeonsi: fix incorrect ordered_wave_id initilization for compute-based cullingMarek Olšák2020-03-281-1/+2
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4269>
* radeonsi: remove obsolete TODO comment related to compute-based cullingMarek Olšák2020-03-281-1/+0
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4269>
* lima: Implement lima_texture_subdataVasily Khoruzhick2020-03-281-13/+65
| | | | | | | | | | We can avoid intermediate copy if we implement it ourselves. Improves x11perf -shmput500 from 199.0/s to 283.0/s Reviewed-by: Erico Nunes <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4281> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4281>
* util: don't include p_defines.h and u_pointer.h from galliumMarek Olšák2020-03-2713-15/+12
| | | | | | | It's a mess, but this is what I arrived at. Reviewed-by: Timothy Arceri <[email protected] Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4324>
* Move compiler.h and imports.h/c from src/mesa/main into src/utilMarek Olšák2020-03-272-2/+2
| | | | | Reviewed-by: Timothy Arceri <[email protected] Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4324>
* wgl: use gldrv.h instead of stw_icd.hJesse Natalie2020-03-2710-647/+33
| | | | | | | | | Now that we have the official header, let's use that instead of stw_icd.h. Reviewed-by: Jose Fonseca <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4305> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4305>
* wgl: add official gldrv.h header-fileJesse Natalie2020-03-271-0/+589
| | | | | | | | This is the official, Microsoft-provided gldrv.h that describes the driver-interface for OpenGL drivers on Windows. Reviewed-by: Jose Fonseca <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4305>
* nv50, nvc0: fix must_check warning of util_dynarray_resize_bytesKarol Herbst2020-03-272-6/+14
| | | | | | | Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Erik Faye-Lund <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4330> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4330>
* nv50: remove unused variableErik Faye-Lund2020-03-271-2/+0
| | | | | | | | This isn't used anymore, so let's get rid of it to silence a warning. Fixes: c574cda3c6a ("util: Make helper functions for pack/unpacking pixel rows.") Reviewed-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4330>
* intel/perf: break GL query stuff awayLionel Landwerlin2020-03-274-5/+1
| | | | | | | | | | | | | | This stuff is somewhat specific to the GL extension & drivers. On Vulkan we won't use this, it also made a rather large file. v2: Fix Android build (Lionel) Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Jason Ekstrand <[email protected]> Acked-by: Tapani Pälli <[email protected]> Reviewed-by: Rafael Antognolli <[email protected]> Reviewed-by: Mark Janes <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4344>
* x86_init_func_common: Add ENDBR at function entryH.J. Lu2020-03-261-0/+5
| | | | | | | | | | | | | | | | Intel Control-flow Enforcement Technology (CET): https://software.intel.com/en-us/articles/intel-sdm when IBT is enabled, all indirect branch targets must start with ENDBR instruction which is a NOP on non-CET processors. Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2575 Acked-by: Matt Turner <[email protected]> Reviewed-by: Ben Widawsky <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3985> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3985>
* radeonsi: enable full out-of-order drawing when allow_draw_out_of_order is setMarek Olšák2020-03-261-2/+4
| | | | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4152> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4152>
* mesa: allow out-of-order drawing to optimize immediate mode if it's safeMarek Olšák2020-03-263-0/+4
| | | | | | | | | This increases performance by 11-13% in Viewperf11/Catia - first scene. Set allow_draw_out_of_order=true to enable this. Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4152>
* radeonsi: Stop exposing PIPE_SHADER_CAP_FP16Kristian H. Kristensen2020-03-251-1/+1
| | | | | | | Not fully supported. Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4321> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4321>
* freedreno: ssbo: mark resource read or written depending on usageChristian Gmeiner2020-03-251-10/+15
| | | | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Rob Clark <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1963> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1963>
* freedreno: ssbo: keep track if a buffer gets writtenChristian Gmeiner2020-03-252-0/+3
| | | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1963>
* freedreno: simplify fd_set_shader_buffers(..)Christian Gmeiner2020-03-251-16/+8
| | | | | | | | | Clear the modified bits for enabled_mask and then iterate over the whole range and set the specific bit where there is a buffer. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1963>
* freedreno: calculate modified bit mask only onceChristian Gmeiner2020-03-251-6/+2
| | | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1963>
* gallium/util: Add back (and rename) util_float_to_half implementationRoland Scheidegger2020-03-251-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | This implementation was removed by 8b8af6d3 ("gallium/util: Switch util_float_to_half to _mesa_float_to_half()'s impl.") It was not actually broken, but _mesa_float_to_half() implements round-to-nearest-even, whereas util_float_to_half() implemented round-to-zero. So rename it appropriately. GL actually never cares about rounding (except a broken piglit test), however d3d10 very much does and requires RTZ for float to half conversion. Moreover, apparently at least radeon gpus actually always do RTZ when doing RT writes (and I'd suspect for shader image writes as well). Hence it seems appropriate to hook up this rtz function to the format instead. This will cause llvmpipe and softpipe to use rtz rounding for clears with half float formats, and softpipe would use rtz behavior for rt writes as well (llvmpipe has that hardcoded), not sure if "real" hw drivers hit this function for much. (For shader opcodes would still need to figure out what rounding to use appropriately, but this is a question for another day.) Note should probably unify with _mesa_float_to_float16_rtz. Unclear at this point which one is better, so just restore previous function here. Reviewed-by: Marek Olšák <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4312> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4312>
* etnaviv: Emit PE.ALPHA_COLOR_EXT* on GPUs with half-float supportMarek Vasut2020-03-251-1/+2
| | | | | | | | | | | | | | | | | | | | At least GC880 (iMX6S), GC2000 (iMX6Q) blobs do not emit the PE.ALPHA_COLOR_EXT0 and PE.ALPHA_COLOR_EXT1 into the command stream. The GCnano (STM32MP1) is not affected by this change either. This is because neither of these GPUs support the half-float feature. Emit PE.ALPHA_COLOR_EXT* in etnaviv only if half-float support is present in the GPU. This fixes all of the currently failing dEQPs in this group: dEQP-GLES2.functional.fragment_ops.blend.* Fixes: 76adf041f25 ("etnaviv: fix blend color on newer GPUs") Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Jonathan Marek <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4277> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4277>
* gallivm: disable rgtc/latc SNORM accellerated fetchesRoland Scheidegger2020-03-251-13/+19
| | | | | | | | | | | Unfortunately this appears to be bugged (it seems the piglit tests aren't quite exhaustive enough). I'm almost certain it's the lerp (lp_build_lerpdxta()) which doesn't handle signed numbers correctly, let's disable for now. Reviewed-by: Dave Airlie <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4311> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4311>
* rbug: do not return void-valueErik Faye-Lund2020-03-251-1/+1
| | | | | | | | | | | | Returning a void-value is nonsensical, and in this case it seems like a mistake. This eliminates a warning when building on MSVC. Fixes: fb04e5da97d ("gallium: add pipe_screen::finalize_nir") Reviewed-by: Brian Paul <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4297> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4297>
* rbug: clean up cast-warningsErik Faye-Lund2020-03-251-2/+2
| | | | | | | | | Similarly to the previous cast; on 64-bit Windows, unsigned long is 32-bit, and casting a pointer to a non-matchin bit-width integer produce warnings. So let's use uintpre_t for this purpose instead. Reviewed-by: Brian Paul <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4297>
* pipebuffer: clean up cast-warningsErik Faye-Lund2020-03-251-2/+2
| | | | | | | | | | | | | | | | | This code produces warnings, so let's fix that. The problem is that casting a pointer to an integer of non-pointer-size triggers warnings on MSVC, and on 64-bit Windows unsigned long is 32-bit large. So let's instead use uintptr_t, which is exactly for these kinds of things. While we're at it, let's make the resulting index a plain "unsigned", which is the type this originated from before we started with this cast-dance. Fixes: 1a66ead1c75 ("pipebuffer, winsys/svga: Add functionality to update pb_validate_entry flags") Reviewed-by: Brian Paul <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4297>