aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* panfrost: Isolate panfrost_bo_access_for_stage to pan_cmdstream.cAlyssa Rosenzweig2020-03-312-17/+17
| | | | | | | | We don't use it outside this file (and really shouldn't) and it has a strict Gallium dependency in pan_bo.h. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382>
* panfrost: Split panfrost_device from panfrost_screenAlyssa Rosenzweig2020-03-3114-222/+170
| | | | | | | | | | We would like to access properties of the device in a Gallium-independent way (for out-of-Gallium testing in the short-term, and would help a theoretical Vulkan implementation in the long run). Let's split up the struct. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382>
* panfrost: Add support for R3G3B2Icecream952020-03-311-1/+3
| | | | | | | Tested with texenv from mesa-demos. Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4292>
* panfrost: Mark 64-bit formats as unsupportedIcecream952020-03-311-0/+3
| | | | | | | | | | There is no hardware support for these formats, but some games use them for vertex data. This fixes a crash in Aleph One. Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4292>
* freedreno/log: avoid duplicate ts'sRob Clark2020-03-301-4/+27
| | | | | | | | | | | | | | In cases where `fd_log()`/`fd_log_stream()` are called multiple times back-to-back, just use the timestamp of the first trace. This seems to avoid some occasional GPU hangs I was seeing with logging enabled. Although not exactly sure the reason for the hangs. (Looks like GPU hangs *after* all the cmdstream is processed, according to crashdec.) Signed-off-by: Rob Clark <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366>
* freedreno/a6xx: add some more tracepointsRob Clark2020-03-303-1/+25
| | | | | Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366>
* freedreno: add some initial fd_log tracepointsRob Clark2020-03-301-4/+17
| | | | | | | Mostly convert over existing DBG traces. Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366>
* freedreno/a6xx: timestamp logging supportRob Clark2020-03-302-2/+16
| | | | | Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366>
* freedreno: add logging infrastructureRob Clark2020-03-3012-2/+378
| | | | | | | | Provides a way to log msgs timestamped at the corresponding position in the GPU cmdstream, mostly for the purposes of profiling. Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366>
* util: fix u_fifo_pop()Rob Clark2020-03-301-1/+1
| | | | | | | | | Seems like no one ever depended on it to actually return false when fifo is empty. Fixes: 6e61d062093 ("util: Add super simple fifo") Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366>
* freedreno: remove some obsolete debug optionsRob Clark2020-03-302-11/+4
| | | | | | | | | | 'fraghalf' is unused (superceeded by actually lowering output based on the precision information in nir). And glsl140 support in ir3 is long past the experimental stage, so the glsl120 option is no longer needed. So remove them and free up some bits for new things. Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366>
* freedreno: Work around UBWC flakiness.Eric Anholt2020-03-301-0/+13
| | | | | | | | | | | | | | | | | | In trying to track down the new failure in #2670, I found that I could get the flaky test set down to 4 tests, and dropping any remaining test wouldn't trigger the failure (a bad 8x4 block in the middle of dEQP-GLES3.functional.fbo.msaa.4_samples.r16f's render target). Disabling gmem or bypass didn't help, and adding lots of CCU flushing didn't help. What did help was disabling blitting, or this memset to initialize the UBWC area after we (presumably) pull a BO out of the BO cache. My guess is that the 2D blitter can't handle some rare set of state in the flags buffer and emits some garbage. I've run 8 gles3 and 7 gles31 runs with this branch now so hopefully I've got the4 right set of flakes marked for removal. Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2670 Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4290> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4290>
* freedreno: Fix detection of being in a blit for acc queries.Eric Anholt2020-03-3010-37/+30
| | | | | | | | | | | | | | | | | The batch might not have stage == FD_STAGE_BLIT set because fd_blitter_pipe_begin was sticking the stage on some random batch (or none at all) rather than the one that would be used in the meta operation. What we actually wanted to be looking at was set_active_query_state(), which is already called by util_blitter and whose state we just needed to track. Fixes piglit occlusion_query_meta_no_fragments. I haven't changed query_hw.c's stage handling to clean the rest up because I don't have a db410c/db820c at home to iterate over the piglit tests. Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356>
* freedreno: Rename "is_blit" to "is_discard_blit"Eric Anholt2020-03-305-8/+8
| | | | | | | It's about the special case of an overwrite of a level meaning we can discard old batch contents. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356>
* 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>