summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* anv: Move nir_lower_wpos_center after dead variable elimination.Kenneth Graunke2017-01-131-3/+3
| | | | | | | | | | | | | | | | When multiple shader stages exist in the same SPIR-V module, we compile all entry points and their inputs/outputs, then dead code eliminate the ones not related to the specific entry point later. nir_lower_wpos_center was being run prior to eliminating those random other variables, which made it trip up, thinking it found gl_FragCoord when it actually found something else like gl_PerVertex[3]. Fixes dEQP-VK.spirv_assembly.instruction.graphics.module.same_module. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Fix textureGather with RG32I/UI on Gen7.Kenneth Graunke2017-01-132-8/+37
| | | | | | | | | | | | | | | | | | | According to the "Gather4 R32G32_FLOAT Bug" internal documentation page, the R32G32_UINT and R32G32_SINT formats are affected by the same bug as R32G32_FLOAT. Applying the same workarounds should be viable - apparently the R32G32_FLOAT_LD format shouldn't corrupt integer data which is NaN or other sketchy floating point values. One irritating caveat is that, because it's a FLOAT format, the alpha channel or any set to SCS_ONE return 0x3f8 (1.0) rather than integer 1. So we need shader code to whack those channels to 1. Fixes GL45-CTS.texture_gather.plain-gather-int-cube-rg on Haswell. v2: Fix swizzle component zeroing (caught by Jordan Justen). Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* radv: Support loader interface version 3.Bas Nieuwenhuizen2017-01-131-0/+45
| | | | | | | | | Port of 1e41d7f7b0855934744fe578ba4eae9209ee69f7: "anv: Support loader interface version 3 (patch v2)" Signed-off-by: Bas Nieuwenhuizen <[email protected]> Cc: [email protected] Reviewed-by: Emil Velikov <[email protected]>
* mesa/get: Remove unused extra_ARB_viewport_arrayBoyan Ding2017-01-131-1/+0
| | | | | | | | Unused since 0a7691ee (mesa: Enable enums for OES_viewport_array). Silence a warning of unused variable. Signed-off-by: Boyan Ding <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* xlib: Unify the style of function pointer calls in structsBoyan Ding2017-01-131-74/+74
| | | | | | Signed-off-by: Boyan Ding <[email protected]> [Emil Velikov: handle the final case in glXCreateContextAttribsARB] Signed-off-by: Emil Velikov <[email protected]>
* radeon: Unify the style of function pointer calls in structsBoyan Ding2017-01-133-17/+17
| | | | | | Signed-off-by: Boyan Ding <[email protected]> [Emil Velikov: handle the all cases] Signed-off-by: Emil Velikov <[email protected]>
* nouveau: Unify the style of function pointer calls in structsBoyan Ding2017-01-131-3/+3
| | | | Signed-off-by: Boyan Ding <[email protected]>
* glX_proto_send.py: Unify the style of function pointer calls in structsBoyan Ding2017-01-131-1/+1
| | | | Signed-off-by: Boyan Ding <[email protected]>
* loader/dri3: Unify the style of function pointer calls in structsBoyan Ding2017-01-131-39/+39
| | | | Signed-off-by: Boyan Ding <[email protected]>
* egl/dri2: Unify the style of function pointer calls in structsBoyan Ding2017-01-136-35/+34
| | | | | | | Signed-off-by: Boyan Ding <[email protected]> Acked-by: Alex Deucher <[email protected]> [Emil Velikov: address platform_surfaceless] Signed-off-by: Emil Velikov <[email protected]>
* i915: Add XRGB8888 format to intel_screen_make_configsDerek Foreman2017-01-131-1/+2
| | | | | | | | | | | | | | | | | | This is a copy of commit 536003c11e4cb1172c540932ce3cce06f03bf44e except for i915. Original log for the i965 commit follows: Some application, such as drm backend of weston, uses XRGB8888 config as default. i965 doesn't provide this format, but before commit 65c8965d, the drm platform of EGL takes ARGB8888 as XRGB8888. Now that commit 65c8965d makes EGL recognize format correctly so weston won't start because it can't find XRGB8888. Add XRGB8888 format to i965 just as other drivers do. Signed-off-by: Derek Foreman <[email protected]> Acked-by: Boyan Ding <[email protected]> Tested-by: Mark Janes <[email protected]>
* gbm/drm: Pick the oldest available buffer in get_back_boDerek Foreman2017-01-131-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applications may query the back buffer age to efficiently perform partial updates. Generally the application will keep a fixed length damage history, and use this to calculate what needs to be redrawn based on the age of the back buffer it's about to render to. If presented with a buffer that has an age greater than the length of the damage history, the application will likely have to completely repaint the buffer. Our current buffer selection strategy is to pick the first available buffer without considering its age. If an application frequently manages to fit within two buffers but occasionally requires a third, this extra buffer will almost always be old enough to fall outside of a reasonably long damage history, and require a full repaint. This patch changes the buffer selection behaviour to prefer the oldest available buffer. By selecting the oldest available buffer, the application will likely always be able to use its damage history, at a cost of having to perform slightly more work every frame. This is an improvement if the cost of a full repaint is heavy, and the surface damage between frames is relatively small. It should be noted that since we don't currently trim our queue in any way, an application that briefly needs a large number of buffers will continue to receive older buffers than it would if it only ever needed two buffers. Reviewed-by: Daniel Stone <[email protected]> Signed-off-by: Derek Foreman <[email protected]> Reviewed-by: Pekka Paalanen <[email protected]>
* egl/wayland: Avoid race conditions when on non-main threadJonas Ådahl2017-01-133-14/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | When EGL is used on some other thread than the thread that drives the main wl_display queue, the Wayland EGL dri2 implementation is vulnerable to a race condition related to display round trips and global object advertisements. The race that may happen is that after after a proxy is created, but before the queue is set, events meant to be emitted via the yet to be set queue may already have been queued on the wrong queue. In order to make it possible to avoid this race, wayland 1.11 introduced new API that allows creating a proxy wrapper that may be used as the factory proxy when creating new proxies via Wayland requests. The queue of a proxy wrapper can be changed without effecting what queue events emitted by the actual proxy will be queued on, while still effecting what default queue proxies created from it will have. By introducing a wl_display proxy wrapper and using this when performing round trips (via wl_display_sync()) and retrieving the global objects (via wl_display_get_registry()), the mentioned race condition is avoided. Signed-off-by: Jonas Ådahl <[email protected]> Cc: [email protected] Reviewed-by: Daniel Stone <[email protected]>
* egl/wayland: Cleanup private display connection when init failsJonas Ådahl2017-01-131-0/+4
| | | | | | | | | | When failing to initializing the Wayland EGL driver, don't leak the display server connection if it was us who created it. Signed-off-by: Jonas Ådahl <[email protected]> Cc: [email protected] Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* st/va: flush pipeline after post processingsguttula2017-01-131-0/+1
| | | | | | | | This will flush the pipeline,which will allow to share dma-buf based buffers. Signed-off-by: Suresh Guttula <[email protected]> Reviewed-by: Christian König <[email protected]>
* main/fbobject: throw invalid operation when get_attachment fails if neededAlejandro Piñeiro2017-01-131-7/+42
| | | | | | | | | | | | | | | | In most cases, if a call to get_attachment fails is because attachment is a INVALID_ENUM. But for some specific cases, if COLOR_ATTACHMENTm (where m >= MAX_COLOR_ATTACHMENTS) is used, it should raise an INVALID_OPERATION exception instead. Fixes: GL45-CTS.direct_state_access.framebuffers_get_attachment_parameter_errors GL45-CTS.direct_state_access.framebuffers_renderbuffer_attachment_errors v2: extra new line before quote block. Include "color attachment" on both new message errors (Nicolai). Reviewed-by: Nicolai Hähnle <[email protected]>
* main/fboject: return if it is color_attachment on get_attachmentAlejandro Piñeiro2017-01-131-11/+19
| | | | | | | | | Some callers would need that info to know if they should raise INVALID_ENUM or INVALID_OPERATION. An alternative would be the caller to check if the attachment is a GL_COLOR_ATTACHMENTm, but that seems redundant as get_attachment is already doing that. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/main: fix version/extension checks in _mesa_ClampColorNicolai Hähnle2017-01-131-6/+10
| | | | | | | | | | | | | Add a proper check for feature support, and raise an invalid enum for GL_CLAMP_VERTEX/FRAGMENT_COLOR unconditionally in core profiles, since those enums were explicitly removed after the extension was promoted to core functionality (not in the profile sense) with OpenGL 3.0. This matches the behavior of the AMD closed source driver and fixes GL45-CTS.gtf30.GL3Tests.half_float.half_float_textures. Cc: "12.0 13.0" <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* radeonsi: replace si_shader_context::soa by bld_baseSamuel Pitoiset2017-01-133-82/+78
| | | | | | | | | | We no longer need to use lp_build_tgsi_soa_context. No regressions founds with full piglit run. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: replace ctx->soa.outputs by ctx->outputsSamuel Pitoiset2017-01-132-23/+26
| | | | | | | | | The plan is to replace si_shader_context::soa with its parent structure (ie. bld_base). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: move si_shader_context::soa::addr to si_shader_contextSamuel Pitoiset2017-01-133-11/+12
| | | | | | | | | The plan is to replace si_shader_context::soa with its parent structure (ie. bld_base). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: allocate the array of immediates dynamicallySamuel Pitoiset2017-01-133-13/+24
| | | | | | | | | | | | | | | Currently, we can store up to 256 immediates in a static array, but this is not always enough. Instead, allocate a dynamic array like what we currently do for temps. This fixes a segfault with dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.23 No regressions found with full piglit run. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radv: remove some unused macros and functionsGrazvydas Ignotas2017-01-132-33/+1
| | | | | | | | | These seem unlikely to be used. Also remove irrelevant comment about SKL. v2: forgot to rebase on master Signed-off-by: Grazvydas Ignotas <[email protected]>
* anv: Avoid some resolves for samplable HiZ buffersNanley Chery2017-01-121-18/+49
| | | | | | | v2: Simplify nested ifs (Jason Ekstrand) Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Enable sampling from HiZNanley Chery2017-01-122-4/+17
| | | | | | | v2: Restrict ISL_AUX_USAGE_HIZ to depth aspects Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/blorp: Don't fast depth clear samplable HiZ buffers on BDWNanley Chery2017-01-121-0/+9
| | | | | | | | Avoid the resolves that would be required if fast depth clears were allowed for such buffers. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Add a helper to determine sampling with HiZNanley Chery2017-01-121-0/+7
| | | | | Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* isl/surface_state: Handle ISL_AUX_USAGE_HIZNanley Chery2017-01-121-0/+29
| | | | | | | v2: Remove redundant x/y offset asserts (Jason Ekstrand) Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Perform HiZ resolves only on layout transitionsNanley Chery2017-01-122-56/+42
| | | | | | | | | | This is a better mapping to the Vulkan API and improves performance in all tested workloads. v2: Remove unnecessary image view aspect checks (Jason Ekstrand) Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Disable HiZ for input attachmentsNanley Chery2017-01-122-16/+24
| | | | | | | | | v2 (Jason Ekstrand): - Add spec citation - Drop conditional Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Avoid resolves incurred by fast depth clearsNanley Chery2017-01-123-6/+23
| | | | | Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Prepare for transitioning to the requested final layoutNanley Chery2017-01-122-0/+6
| | | | | Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Store depth stencil layoutsNanley Chery2017-01-123-0/+17
| | | | | | | | | Store the current and requested depth stencil layouts so that we can perform the appropriate HiZ resolves for a given transition while recording a render pass. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Add helpers to handle depth buffer layout transitionsNanley Chery2017-01-121-0/+50
| | | | | Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Delete anv's HiZ op emit functionNanley Chery2017-01-123-233/+0
| | | | | | | This is no longer used. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Use the gen8 BLORP HiZ resolving functionNanley Chery2017-01-121-3/+24
| | | | | Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/blorp: Add a gen8 HiZ op resolve functionNanley Chery2017-01-122-0/+88
| | | | | | | | | Add an entry point for resolving using BLORP's gen8 HiZ op function. v2: Manually add the aux info Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Use gen8 BLORP HiZ clearing functionsNanley Chery2017-01-122-5/+50
| | | | | Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* intel/blorp_clear: Add gen8 HiZ clearing functionsNanley Chery2017-01-122-0/+93
| | | | | | | | | | | | | Add an entry point for the optimized gen8 BLORP HiZ sequence. commit c9eaf12de20ac4143fe79d42018bdbb5a391356f fixed a bug that was unknowingly worked around by forcing additional clear rectangle alignment restrictions not specified in the PRMs. Now that the bug is no longer present, omit the additional alignment restrictions. v2: Adjust code comment about padding Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Enable HiZ support for multiple subpassesNanley Chery2017-01-123-13/+8
| | | | | | | | | We'll be using layout transitions later on in the series which can occur within and between subpasses. Turn this on now to simplify the change later. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Use ::anv_attachment_state for toggling HiZ per subpassNanley Chery2017-01-121-2/+4
| | | | | | | | | We're about to enable HiZ support for multiple subpasses. Use this field to keep track of whether or not subpass operations should treat the depth buffer as having an auxiliary HiZ buffer. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Replace anv_image_has_hiz() with ISL_AUX_USAGE_HIZNanley Chery2017-01-125-16/+18
| | | | | | | | | | | The helper doesn't provide additional functionality over the current infrastructure. v2: Add comment to anv_image::aux_usage (Jason Ekstrand) v3: Clarify comment for aux_usage (Jason Ekstrand) Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/blorp: Handle ISL_AUX_USAGE_HIZNanley Chery2017-01-121-1/+2
| | | | | | | | | Prevent assert failures that would occur in the next patch. v2: Don't remove asserts from blorp/blit (Jason Ekstrand) Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* intel/blorp: Add the BDW+ optimized HZ_OP sequence to BLORPNanley Chery2017-01-121-0/+87
| | | | | | | | | | | We'll be switching to layout-transition based resolves which can occur outside of a render pass. Add this sequence to BLORP, as using BLORP will enable emitting depth stencil state outside of a render pass (among other benefits). The depth buffer extent is ignored to enable eventual usage in VkCmdClearAttachments(). Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* ac: automake: ensure that ./common is generatedEmil Velikov2017-01-131-0/+1
| | | | | | | | | | | Depending on the autoconf (or friends) version one may or may not have the ./common folder created. Thus in the latter case we'll fail to generate the file. Reviewed-by: Thierry Reding <[email protected]> Tested-by: Darren Salt <[email protected]> Reported-by: Darren Salt <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* nvc0/ir: only try to check for zero LOD if we aren't already forcing itIlia Mirkin2017-01-121-1/+1
| | | | | | | | | | There's a levelZero flag which forces texturing to pick level zero (and not consume an explicit LOD argument). This is set for MS targets, but could also be set for any other incoming instruction. As that is what determines whether a LOD argument is present, check that rather than the more indirect isMS logic. Signed-off-by: Ilia Mirkin <[email protected]>
* nouveau: take extra push space into account for pushbuf_space callsIlia Mirkin2017-01-1215-56/+26
| | | | | | | | | | | | | | | | | | | | | | Ever since a long time ago when I messed around with fences, I ensure that after a PUSH_SPACE call there is enough space to write a fence out into the pushbuf. However the PUSH_SPACE macro is not all-knowing, and so sometimes we have to invoke nouveau_pushbuf_space manually with the relocs/pushes args set. If we don't take the extra allocation from PUSH_SPACE into account, then we will end up accidentally flushing when the code was not expecting a flush. This can lead to various runtime and rendering failures. The amount of extra allocation isn't that important - it has to be at least 8 based on the current nouveau_winsys.h setting, but even more won't hurt. I just rounded up to powers of 2. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99354 Cc: "12.0 13.0" <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Ben Skeggs <[email protected]>
* mapi: update the asm code to support x32Grazvydas Ignotas2017-01-131-3/+28
| | | | | | | | | | | Fixes crashes when both glx-tls and asm are enabled on x32. Cc: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94512 Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=575458 Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
* ac/nir: use ac_emit_fdiv throughoutNicolai Hähnle2017-01-131-22/+6
| | | | | | | | ... and eliminate emit_fdiv and nir_to_llvm_context::fpmath_md_*, which are now unused. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* ac/nir: use ac_build_gather_values[_extended] throughoutNicolai Hähnle2017-01-131-65/+24
| | | | | | | | ... and eliminate the non-ac copies. Mostly straight-forward search & replace. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Marek Olšák <[email protected]>