summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* drirc: whitelist glthread for a few gamesMarek Olšák2017-06-261-0/+16
| | | | | | | | | | Performance deltas: Alien Isolation: +17% (it varies depending on the location) Borderlands 2: +50% (it varies depending on the location) BioShock Infinite: +76% (benchmark) Civilization 6: +20% (benchmark) Reviewed-by: Timothy Arceri <[email protected]>
* mesa/glthread: decrease the batch size for better perf scalingMarek Olšák2017-06-261-3/+11
| | | | | | This is the key to better performance. Reviewed-by: Timothy Arceri <[email protected]>
* gallium/hud: add glthread countersMarek Olšák2017-06-263-0/+91
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* gallium/hud: add API-thread-busy for monitoring the thread loadMarek Olšák2017-06-263-4/+22
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* gallium/hud: add hud_pane::hud pointerMarek Olšák2017-06-262-3/+6
| | | | | | for later use Reviewed-by: Timothy Arceri <[email protected]>
* mesa/glthread: add glthread "perf" counters and pass them to gallium HUDMarek Olšák2017-06-2610-7/+65
| | | | | | | | | | | for HUD integration in following commits. This valuable profiling data will allow us to see on the HUD how well glthread is able to utilize parallelism. This is better than benchmarking, because you can see exactly what's happening and you don't have to be CPU-bound. u_threaded_context has the same counters. Reviewed-by: Timothy Arceri <[email protected]>
* gallium/hud: move struct hud_context to hud_private.hMarek Olšák2017-06-262-46/+48
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* gallium/hud: rename API-thread-busy to main-thread-busyMarek Olšák2017-06-263-5/+5
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* mesa/glthread: switch to u_queue and redesign the batch managementMarek Olšák2017-06-263-198/+91
| | | | | | | This mirrors exactly how u_threaded_context works. If you understand this, you also understand u_threaded_context. Reviewed-by: Timothy Arceri <[email protected]>
* mesa/glthread: remove HAVE_PTHREAD guardsMarek Olšák2017-06-265-69/+1
| | | | | | we are switching to util_queue. Reviewed-by: Timothy Arceri <[email protected]>
* util: move pipe_thread_is_self from gallium to src/utilMarek Olšák2017-06-263-12/+13
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* radv: Remove unused args of radv_image_view_init.Bas Nieuwenhuizen2017-06-2611-55/+23
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Use correct image layout for blit based copies.Bas Nieuwenhuizen2017-06-261-10/+10
| | | | | | | | v2: Don't pass layout to image view usage mask. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Fixes: 0628580eff6 "radv: Specify semantics of HTILE layout helpers."
* mesa/marshal: add custom marshalling for glNamedBuffer(Sub)DataGrigori Goronzy2017-06-263-2/+128
| | | | | | | | | | | | | These entry points are used by Alien Isolation and caused synchronization with glthread. The async marshalling implementation is similar to glBuffer(Sub)Data. However unlike Buffer(Sub)Data we don't need to worry about EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD, as this isn't applicable to these DSA variants. Results in an approximately 6x drop in glthread synchronizations and a ~30% FPS jump in Alien Isolation (Medium preset, Athlon 860K, RX 480). Reviewed-by: Timothy Arceri <[email protected]>
* radv: handle primitive id input into fragment shader with no geom shaderDave Airlie2017-06-266-13/+65
| | | | | | | | | | Fixes: dEQP-VK.pipeline.framebuffer_attachment.no_attachments dEQP-VK.pipeline.framebuffer_attachment.no_attachments_ms Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: compile fragment shader first.Dave Airlie2017-06-261-27/+27
| | | | | | | | This reorders things as we need something from the fs for the vs key. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: set prim_id for geometry shadersDave Airlie2017-06-263-2/+9
| | | | | | | | Noticed in passing. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: set use_prim_id for tess shaders correctly.Dave Airlie2017-06-261-3/+5
| | | | | | | | Just noticed in passing. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* nv50/ir: Properly fold constants in SPLIT operationPierre Moreau2017-06-251-3/+4
| | | | | | | Fixes: b7d9677d ("nv50/ir: constant fold OP_SPLIT") Cc: [email protected] Signed-off-by: Pierre Moreau <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* radeonsi/gfx9: don't overallocate shader binariesMarek Olšák2017-06-241-6/+0
| | | | | | It's not needed. The hw doesn't fetch ahead over page boundaries. Reviewed-by: Nicolai Hähnle <[email protected]>
* st/dri2: implement image offset queryLucas Stach2017-06-241-0/+6
| | | | | | | | This trivially adds support for the image offset query, which is needed for the zwp_linux_dmabuf based EGL platform wayland implementation. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* mesa: only flush vertices when the viewport is differentSamuel Pitoiset2017-06-241-3/+3
| | | | | | | | This prevents glViewport() and friends to always flush and trigger _NEW_VIEWPORT. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: remove useless comments in the viewport code pathSamuel Pitoiset2017-06-241-10/+2
| | | | | | | No need to explain why calling a driver callback is needed. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* llvmpipe: initialize default fb correctly in setupRoland Scheidegger2017-06-241-0/+4
| | | | | | | | | | | | | | | | If lp_setup_bind_framebuffer() is never called, then setup fb x1/y1 was not correctly initialized. This can happen if there's never a fb set - both cso and llvmpipe would consider setting this with no cbufs and no zsbuf a redundant change and therefore it would never get set. We rely on this setup fb rect being initialized correctly for the tri intersect tests, throwing away tris which don't intersect. Not initializing it meant we'd then say it intersected, and we'd try to bin that despite that we have no actual tiles to bin it to, leading to assertion failures (pretty harmless since tile 0/0 always exists nevertheless as tiles are statically allocated, albeit that should change at some point). (Note probably not an issue with gl state tracker) Reviewed-by: Jose Fonseca <[email protected]>
* i965/miptree: Rework aux enablingJason Ekstrand2017-06-234-122/+120
| | | | | | | | | | | | | | | | | | This commit replaces the complex and confusing set of disable flags with two fairly straightforward fields which describe the intended auxiliary surface usage and whether or not the miptree supports fast clears. Right now, supports_fast_clear can be entirely derived from aux_usage but that will not always be the case. This commit makes functional changes. One of these changes is that it re-enables multisampled fast-clears which were accidentally disabled in cec30a666930ddb8476a9452a89364a24979ff62 around a year ago. Fixing this improves the SynMark v7 DeferredAA test by around ~3% on some gen9 hardware. This commit also gets us closer to enabling CCS_E for window-system buffers which are Y-tiled. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Clamp clear colors to the representable rangeJason Ekstrand2017-06-231-0/+40
| | | | | | | | | | | | Starting with Sky Lake, we can clear to arbitrary floats or integers. Unfortunately, the hardware isn't particularly smart when it comes sampling from that clear color. If the clear color is out of range for the surface format, it will happily return whatever we put in the surface state packet unmodified. In order to avoid returning bogus values for surfaces with a limited range, we need to do some clamping. Cc: "17.1" <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Don't bother with HiZ in renderbuffer_move_to_tempJason Ekstrand2017-06-231-4/+0
| | | | | | This function is only used on gen4-5 which don't support HiZ. Reviewed-by: Chad Versace <[email protected]>
* i965/miptree: Rename the non_msrt_mcs functions to _ccsJason Ekstrand2017-06-233-40/+25
| | | | | | | While we're here, we also make the two support checks static since there are no users outside intel_mipmap_tree.c. Reviewed-by: Chad Versace <[email protected]>
* i965/miptree: Delete the layered rendering resolveJason Ekstrand2017-06-231-14/+0
| | | | | | | | | We never fast-clear more than the base slice (LOD 0, layer 0) anyway, so layered rendering without a resolve is always perfectly safe. Should this ever change in the future, we'll have to put some sort of resolve back in but we can cross that bridge when we come to it. Reviewed-by: Chad Versace <[email protected]>
* anv/cnl: Don't write to Cache Mode Register 1 on gen10+Anuj Phogat2017-06-231-3/+1
| | | | | | | | | For PartialResolveDisableInVC field recommendation is to always set this to 0 and that's the default value of the bit. So, we have nothing left to write to CACHE_MODE_1. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/cnl: Don't write to Cache Mode Register 1 on gen10+Anuj Phogat2017-06-231-2/+4
| | | | | | | | | | | With below optimizations gone in gen10+ we have nothing left out to write to CACHE_MODE_1: Float Blend Optimization Enable: This bit have been removed in gen10+ Partial Resolve Disable in VC: Recommendation is to always set this field to 0 in gen10+ and that's the default value of the bit. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* radeonsi: unreference vertex buffers when destroying the contextMarek Olšák2017-06-231-0/+2
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* drirc: Add glsl_correct_derivatives_after_discard for The Witcher 2Edmondo Tommasina2017-06-231-0/+4
| | | | | | | | This fixes the long-standing problem with black transitions in The Wicher 2. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98238 Signed-off-by: Marek Olšák <[email protected]>
* radeonsi: implement the workaround for Rocket League - postponed TGSI killMarek Olšák2017-06-235-0/+37
| | | | | | | | Do KILL at the end of shaders so as not to break WQM. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100070 Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: pass create_screen flags to r600_common_screen_initMarek Olšák2017-06-2316-26/+34
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* st/dri: add a drirc workaround for Rocket LeagueMarek Olšák2017-06-234-0/+19
| | | | | | | | | | | | | | This needs to be passed to gallium drivers. No game fix is planned at this time. The addition of glsl_correct_derivatives_after_discard is generally a good thing for mesa compatibility with the broader GL driver ecosystem. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100070 Reviewed-by: Nicolai Hähnle <[email protected]>
* st/dri: get drirc options before creating pipe_screenMarek Olšák2017-06-234-20/+38
| | | | | | dri_init_options_get_screen_flags will return the flags for create_screen(). Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: allow passing 'unsigned flags' to create_screen()Marek Olšák2017-06-2325-64/+65
| | | | | | for drirc options Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: don't flush vertices in glClientActiveTextureMarek Olšák2017-06-231-1/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: don't flag _NEW_ARRAY for GL_PRIMITIVE_RESTART_NVMarek Olšák2017-06-231-1/+3
| | | | Reviewed-by: Brian Paul <[email protected]>
* llvmpipe:fix using 32bit rasterization mistakenly, causing overflowsRoland Scheidegger2017-06-234-31/+43
| | | | | | | | | | | | | We use the bounding box (triangle extents) to figure out if 32bit rasterization could potentially overflow. However, we used the bounding box which already got rounded up to 0 for negative coords for this, which is incorrect, leading to overflows and hence bogus rendering in some of our private use. It might be possible to simplify this somehow (we're now using 3 different boxes for binning) but I don't quite see how. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: fill in debug vertex info for tri rasterizationRoland Scheidegger2017-06-231-1/+1
| | | | | | | | | This is pretty useful for debugging rasterization issues, so turn it on based on DEBUG (the actual existence of the fields is also conditionalized on DEBUG, lines fill it out the same too). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* Revert "radeonsi: don't emit partial flushes at the end of IBs (v2)"Marek Olšák2017-06-231-9/+5
| | | | | | | This reverts commit c9040dc9e75c81024f88f3f1bab821ad2bc73db3. People have reported it causes corruption on VI, and I see GPU hangs on GFX9.
* mesa: remove spurious flush in _mesa_Viewport()Samuel Pitoiset2017-06-231-1/+0
| | | | | | | | | | I don't think this is actually required, if the viewport values are different from the ones stored in the context, we already flush and trigger _NEW_VIEWPORT in set_viewport_no_notify(). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove spurious flush in _mesa_DepthRange()Samuel Pitoiset2017-06-231-2/+0
| | | | | | | | | | I don't think this is actually required, if the depth range values are different from the ones stored in the context, we already flush and trigger _NEW_VIEWPORT in set_depth_range_no_notify(). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: do not trigger _NEW_TEXTURE_STATE in glActiveTexture()Samuel Pitoiset2017-06-231-2/+0
| | | | | | | | This looks like useless because gl_context::Texture::CurrentUnit is not used by _mesa_update_texture_state() and friends. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: add KHR_no_error support for glViewport()Samuel Pitoiset2017-06-233-1/+11
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add viewport() helperSamuel Pitoiset2017-06-231-21/+27
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add KHR_no_error support for glViewportArrayv()Samuel Pitoiset2017-06-233-1/+13
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: add viewport_array() helperSamuel Pitoiset2017-06-231-7/+14
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>