summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* anv: Get rid of metaJason Ekstrand2016-10-147-765/+2
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* anv: Use blorp for subpass clearsJason Ekstrand2016-10-142-298/+81
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* anv: Use blorp for ClearAttachmentsJason Ekstrand2016-10-142-24/+113
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* anv/hiz: Perform HiZ resolves for all partial rendersJason Ekstrand2016-10-141-1/+11
| | | | | | | | | | | | | | If we don't, we can end up with corruption in the portion of the depth buffer that lies outside the render area when we do a HiZ resolve at the end. The only reason we weren't seeing this before was that all of the meta-based clears such as VkCmdClearDepthStencilImage were internally using HiZ so the HiZ buffer never truly got out-of-sync. If the CTS ever tested a depth upload (which doesn't care about HiZ) and then a partial render we would have seen problems. Soon, we will be using blorp to do depth clears and it won't bother with HiZ so we would get CTS regressions without this. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
* anv: Use blorp for ClearDepthStencilImageJason Ekstrand2016-10-142-141/+59
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* anv/image: Add an isl_view to anv_image_viewJason Ekstrand2016-10-145-26/+26
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* anv/image: Rework our handling of 3-D image array rangesJason Ekstrand2016-10-141-4/+12
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* anv/blorp: Don't hand-roll flush_pipeline_select_3dJason Ekstrand2016-10-141-38/+1
| | | | | | | | When I initially brought up Vulkan blorp, I completely missed that this was already factored out. There's no good reason for us to hand-roll it. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* intel/blorp: Add a flag to make blorp not re-emit dept/stencil buffersJason Ekstrand2016-10-145-18/+32
| | | | | | | | | | | In Vulkan, we want to be able to use blorp to perform clears inside of a render pass. If blorp stomps the depth/stencil buffers packets then we'll have to re-emit them. This gets tricky when secondary command buffers get involved. Instead, we'll simply guarantee that the depth and stencil buffers we pass to blorp (if any) match those already set in the hardware. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* intel/blorp: Add an entrypoint for clearing depth and stencilJason Ekstrand2016-10-142-0/+79
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* intel/blorp: Emit a NULL render target for depth/stencil-only operationsJason Ekstrand2016-10-141-5/+44
| | | | | | | | | | This never mattered before because the only time we used blorp depth/stencil only was to do HiZ operations on gen6-7. It may have worked in that case (and maybe it didn't) but slow depth clears actually do depth rendering so they need a valid render target. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* intel/blorp: Allow for running without a PS on gen8+Jason Ekstrand2016-10-141-18/+24
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* intel/blorp: Add an "enabled" bit to surface_infoJason Ekstrand2016-10-143-15/+19
| | | | | | | | This gives a slightly smarter way to check whether or not a particular surface exists than looking at the address. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* intel/blorp: Emit more complete DEPTH_STENCIL stateJason Ekstrand2016-10-142-11/+47
| | | | | | | | | | This should now set the pipeline up properly for doing depth and/or stencil clears by plumbing through depth/stencil test values. We are now also emitting color calculator state for blorp operations without an actual shader because that is where the stencil reference value goes pre-SKL. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* intel/blorp: Unify the DEPTH_STENCIL emit code across gensJason Ekstrand2016-10-141-12/+15
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* intel/blorp: Simplify depth/stencil configJason Ekstrand2016-10-141-15/+5
| | | | | | | | | The newly reworked depth/stencil config code can properly handle having depth, stencil, both, or neither. We no longer need to predicate it on having depth or stencil. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* intel/blorp: Set QPitch for depth and HiZ on gen8+Jason Ekstrand2016-10-141-0/+9
|
* intel/blorp: Add support for binding an actual stencil bufferJason Ekstrand2016-10-142-34/+79
| | | | | | | | | | | While we're here, we also make depth without HiZ work. v2: - Use the correct surface type for 1-D on SKL+ - Set QPitch on BDW+ Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* intel/blorp: Move CLEAR_PARAMS setup into emit_depth_stencil_configJason Ekstrand2016-10-141-11/+12
| | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* intel/genxml: Add a uint MOCS field to 3DSTATE_STENCIL_BUFFERJason Ekstrand2016-10-145-0/+5
| | | | | | Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
* intel/blorp: Make the Z component of the primitive adjustableJason Ekstrand2016-10-142-6/+7
| | | | | | | | We want to be able to start doing slow depth clears with blorp. This allows us to adjust the depth we're clearing to. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
* i915: workaround multiple intelFenceExtension definitionsEmil Velikov2016-10-141-0/+1
| | | | | | | | | | | | | Due to conflicting symbol names (between i915 and i965) in the megadriver, we use a set of defines in i915/intel_screen.h. With a recent commit we've introduced a symbol intelFenceExtension which has different implementation for each driver, yet we forgot to add the define. Fixes: d11515ff1b3 ("i915/sync: Implement DRI2_Fence extension") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98264 Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
* egl: Move old EGL_MESA_screen_surface specChad Versace2016-10-141-564/+0
| | | | | | | It was the lone file in src/egl/docs. Move it to where the other specs live, in $MESA_TOP/docs/specs. Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* egl: Implement EGL_MESA_platform_surfacelessChad Versace2016-10-144-1/+70
| | | | Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* egl: Don't advertise unsupported platform extensionsChad Versace2016-10-141-2/+8
| | | | | | | | | | | | | Mesa's set of supported platform extensions depends on the autoconf option --with-egl-platforms=foo,bar,baz. If --with-egl-platforms lacks foo, then eglGetPlatformDisplay(EGL_PLATFORM_FOO, ...) unconditonally fails. So, if --with-egl-platforms lacks foo, then remove EGL_VENDOR_platform_foo from the EGL client extension string. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* i965: Sort some extension namesIan Romanick2016-10-141-3/+3
| | | | | | | Trivial. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
* pipe_loader_sw: Don't invoke Unix close() on Windows.Jose Fonseca2016-10-141-0/+2
| | | | Trivial.
* Revert "egl/dri2: rework dri2_make_current code flow"Emil Velikov2016-10-141-36/+36
| | | | This reverts commit 675719817e7bf7c5b9da22c02252aca77a41338d.
* i915: store reference to the context within struct intel_fence (v2)Mauro Rossi2016-10-141-11/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Porting of the corresponding patch for i965. Here follows the original commit message by Tomasz Figa: "As the spec allows for {server,client}_wait_sync to be called without currently bound context, while our implementation requires context pointer. v2: Add a mutex and acquire it for the duration of brw_fence_client_wait() and brw_fence_is_completed() as suggested by Chad." NOTE: in i915 all references to 'brw' are replaced by 'intel' Marshmallow-x86 boots ok with the following results of Android CTS. Android CTS 6.0_r7 build:2906653 Session Pass Fail Not Executed 0(EGL) 1410 24 0 1(GLES2) 13832 82 0 I get the same results as per i965GM. [Emil Velikov: Include Mauro's test results] Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
* i915/sync: Implement DRI2_Fence extensionMauro Rossi2016-10-143-30/+152
| | | | | | | | | | | Here is the porting of corresponding patch for i965, i.e. commit c636284 i965/sync: Implement DRI2_Fence extension Here follows part of original commit message by Chad Versace: "This enables EGL_KHR_fence_sync and EGL_KHR_wait_sync." Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
* i915/sync: Replace prefix 'intel_sync' -> 'intel_gl_sync'Mauro Rossi2016-10-142-26/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | This is the porting of corresponding patch for i965, i.e. commit 2516d83 i965/sync: Replace prefix 'intel_sync' -> 'intel_gl_sync' The only difference compared to i965 one is that intel_check_sync() was renamed to intel_gl_check_sync() here, as it is more appropriate. Here follows original commit message by Chad Versace: "I'm about to implement DRI2_Fenc in intel_syncobj.c. To prevent madness, we need to prefix functions for GL_ARB_sync with 'gl' and functions for DRI2_Fence with 'dri'. Otherwise, the file will become a jumble of similiarly named functions. For example: old-name: intel_client_wait_sync() new-name: intel_gl_client_wait_sync() soon-to-come: intel_dri_client_wait_sync() I wrote this renaming commit separately from the commit that implements DRI2_Fence because I wanted the latter diff to be reviewable." [Emil Velikov: rename the outstanding intel_sync instances] Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
* egl/drm: set eglError and provide an error message on failureEmil Velikov2016-10-141-6/+15
| | | | | | | v2: Remove gratuitous newline/semicolon (Eric) Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/x11: attribute for dri2_add_config failureEmil Velikov2016-10-141-7/+14
| | | | | | | | | | | | | | ... in dri2_x11_add_configs_for_visuals(). Currently the latter does not consider that, thus in such cases it adds "empty" configs in the list. Properly account for things and as we do that we can reuse count, instead of calling _eglGetArraySize to determine if we've added any configs. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/wayland: introduce dri2_wl_add_configs_for_visuals() helperEmil Velikov2016-10-141-32/+51
| | | | | | | | | | | | | | | | | | Analogous to previous commits - with an extra bonus. Current code, apart from not attributing the lack of 'per visual' and overall configs also overwrites the newly added config. Namely if the dpy supports two or more of the supported formats (XRGB8888, ARGB8888 and RGB565) earlier configs will be overwritten and the the final one will be stored, since the we use the same index for all three in our dri2_add_config call. v2: Use correct comparison in loop conditional (Eric) Use valid C initializer (Gurchetan) Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/surfaceless: tweak surfaceless_add_configs_for_visuals()Emil Velikov2016-10-141-7/+8
| | | | | | | | | | | Analogous to previous commit. v2: Use correct comparison in loop conditional (Eric) Use valid C initializer (Gurchetan) Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/android: tweak droid_add_configs_for_visuals()Emil Velikov2016-10-141-19/+21
| | | | | | | | | | | | | | Iterate over the driver_configs first in order to cut down the number of getConfigAttrib() calls by a factor of 5. While we're here, also drop the sentinel of the visuals array. We already know its size so we can use that and save a few bytes. v2: Use correct comparison in loop conditional (Eric) Use valid C initializer (Gurchetan) Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/drm: introduce drm_add_configs_for_visuals() helperEmil Velikov2016-10-141-28/+61
| | | | | | | | | | | | | | Factor out and rework the existing code so that it prints a debug message if we have zero configs for any visual. As a nice side effect we now provide a correct (sequential ID) when creating a config (via dri2_add_config). v2: Use correct comparison in loop conditional (Eric) Use valid C initializer (Gurchetan) Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/surfaceless: print out a message on zero configs for given formatEmil Velikov2016-10-141-9/+18
| | | | | | | | | | | | Currently we print a debug message if the total configs is non-zero only to do the same (at an error level) as we return from the function. Rework the message to print if we're missing a config for the given format. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/dri2: set WL_bind_wayland_display in a consistent wayEmil Velikov2016-10-144-22/+29
| | | | | | | | | | | | | | Introduce a helper and use it throughout the platform code. This allows us to reduce the amount of ifdef(s) and (potentially) use kms_swrast_dri.so for !drm platforms (namely wayland and x11). Note: in the future as other platforms (android, surfaceless) support the extension they can reuse the helper. v2: Rebase, check for device_name. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/android: remove duplicate KHR_image_base setEmil Velikov2016-10-141-1/+0
| | | | | | | The core egl/dri2 already sets the extension bit _only_ when possible - which in Android's case is always. Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
* loader/dri3: constify the loader_dri3_vtableEmil Velikov2016-10-144-5/+5
| | | | | Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/dri2: micro optimise dri2_bind_extensions()Emil Velikov2016-10-141-0/+1
| | | | | | | Do not loop over all matches if we've already found one. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/dri2: annotate dri2_extension_match instances as const dataEmil Velikov2016-10-141-7/+7
| | | | | | | v2: Rebase. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/dri2: use dri2_bind_extensions to manage the optional extensionsEmil Velikov2016-10-141-18/+10
| | | | | | | v2: dri2_bind_extensions() now takes optional as an argument. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* gbm: rename gbm_dri_device::{,loader_}extensionsEmil Velikov2016-10-142-7/+7
| | | | | | | To align with the name used in the EGL and GLX loaders. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/dri2: add support for optional extensions in dri2_bind_extensions()Emil Velikov2016-10-141-9/+15
| | | | | | | | | | | Will allow us to reuse the function for optional extensions and fold a bit of code. v2: Make dri2_bind_extensions::optional flag an argument to dri2_bind_extensions (Kristian). Cc: Rob Clark <robdclark@gmail.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
* egl/dri2: coding style cleanupEmil Velikov2016-10-142-153/+153
| | | | | | | | | Consistently indent with space rather than a mix of tab and spaces. v2: Keep the structs properly aligned (Eric). Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
* egl/x11: don't crash if dri2_dpy->conn is NULLEmil Velikov2016-10-141-9/+5
| | | | | | | | | | | The dri3 version of commits 60e9c35b3a0 and 6de9a03bed4. While using xcb_connect() guarantees that we always get a non NULL return value, XGetXCBConnection() does/can not. CC: <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/dri2: rework dri2_egl_display::extensions storageEmil Velikov2016-10-146-41/+85
| | | | | | | | | | | Remove the error prone fixed size array. While we're here also rename to loader_extensions like in the GLX code. v2: Rebase. Keep image_loader_extension within the wayland_drm dri2_loader_extensions list. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* egl/dri2: remove unused dri2_egl_display::{dri2,swrast}_loader_extensionEmil Velikov2016-10-141-2/+0
| | | | | Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>