summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2017-07-24swrast: add dri2ConfigQueryExtension to the correct extension listEmil Velikov1-0/+1
The extension should be in the list as returned by getExtensions(). Seems to have gone unnoticed since close to nobody wants to change the vblank mode for the software driver. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2017-07-24wayland-egl: update the SHA1 of the commit introducing v3Emil Velikov1-1/+1
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2017-07-24wayland-egl: Update ABI checkerMiguel A. Vico1-15/+75
This change updates wayland-egl-abi-check.c with the latest changes to wl_egl_window. Signed-off-by: Miguel A. Vico <mvicomoya@nvidia.com> Reviewed-by: James Jones <jajones@nvidia.com> Acked-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-07-24wayland-egl: Make wl_egl_window a versioned structMiguel A. Vico3-2/+24
We need wl_egl_window to be a versioned struct in order to keep track of ABI changes. This change makes the first member of wl_egl_window the version number. An heuristic in the wayland driver is added so that we don't break backwards compatibility: - If the first field (version) is an actual pointer, it is an old implementation of wl_egl_window, and version points to the wl_surface proxy. - Else, the first field is the version number, and we have wl_egl_window::surface pointing to the wl_surface proxy. Signed-off-by: Miguel A. Vico <mvicomoya@nvidia.com> Reviewed-by: James Jones <jajones@nvidia.com> Acked-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-07-24egl: Fix _eglPointerIsDereferencable() to ignore page residencyMiguel A. Vico1-1/+12
mincore() returns 0 on success, and -1 on failure. The last parameter is a vector of bytes with one entry for each page queried. mincore returns page residency information in the first bit of each byte in the vector. Residency doesn't actually matter when determining whether a pointer is dereferenceable, so the output vector can be ignored. What matters is whether mincore succeeds. See: http://man7.org/linux/man-pages/man2/mincore.2.html Signed-off-by: Miguel A. Vico <mvicomoya@nvidia.com> Acked-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-07-24egl: Move _eglPointerIsDereferencable() to eglglobals.[ch]Miguel A. Vico3-33/+37
Move _eglPointerIsDereferencable() to eglglobals.[ch] and make it a non-static function so it can be used out of egldisplay.c Signed-off-by: Miguel A. Vico <mvicomoya@nvidia.com> Reviewed-by: James Jones <jajones@nvidia.com> Acked-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-07-24wayland-egl: Add wl_egl_window ABI checkerMiguel A. Vico2-1/+180
Add a small ABI checker for wl_egl_window so that we can check for backwards incompatible changes at 'make check' time. Signed-off-by: Miguel A. Vico <mvicomoya@nvidia.com> Reviewed-by: James Jones <jajones@nvidia.com> Acked-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-07-24swr: use the correct variable for no undefined symbolsEmil Velikov1-1/+1
The variable name was missing a leading LD_, which resulted in a missing check for unresolved symbols in the backend binaries. With the link addressed with earlier patches, we can correct the typo. Thanks to Laurent for the help spotting this. v2: Split from a larger patch. Cc: mesa-stable@lists.freedesktop.org Cc: Bruce Cherniak <bruce.cherniak@intel.com> Cc: Tim Rowley <timothy.o.rowley@intel.com> Cc: Laurent Carlier <lordheavym@gmail.com> Fixes: 9475251145174882b532 "swr: standardize linkage and check for unresolved symbols" Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reported-by: Laurent Carlier <lordheavym@gmail.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2017-07-24swr: don't forget to link KNL/SKX against pthreadsEmil Velikov1-0/+8
Analogous to previous commit but for the KNL/SKX backends. Cc: Bruce Cherniak <bruce.cherniak@intel.com> Cc: Tim Rowley <timothy.o.rowley@intel.com> Cc: Laurent Carlier <lordheavym@gmail.com> Fixes: 1cb5a6061ce ("configure/swr: add KNL and SKX architecture targets") Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2017-07-24swr: don't forget to link AVX/AVX2 against pthreadsEmil Velikov1-0/+8
Seems like the backends have been using pthreads since day one, yet we've been missing the link. With later commit we'll fix a typo, hence the libraries will be build with -Wl,no-undefined, aka failing the build on unresolved symbols. v2: Split from a larger patch. Cc: mesa-stable@lists.freedesktop.org Cc: Bruce Cherniak <bruce.cherniak@intel.com> Cc: Tim Rowley <timothy.o.rowley@intel.com> Cc: Laurent Carlier <lordheavym@gmail.com> Fixes: c6e67f5a9373e916a8d2 "gallium/swr: add OpenSWR rasterizer" Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2017-07-24configure.ac: rework wayland-protocols handlingEmil Velikov1-6/+7
At dist/distcheck time we need to ensure that all the files and their respective dependencies are handled. At the moment we'll bail out as the linux-dmabuf rules are guarded in a conditional. Move them outside of it and drop the sources from BUILT_SOURCES. Thus the files will be generated only as needed, which will happen only after the wayland-protocols dependency is enforced in configure.ac. v2: add dependency tracking for the header Cc: Andres Gomez <agomez@igalia.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Andres Gomez <agomez@igalia.com>
2017-07-24radv: enable sample shadingDave Airlie2-2/+4
This calculates ps_iter_samples from the minSampleShading input Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-07-24radv: don't set dedicated bit for buffer external memory.Dave Airlie1-2/+1
This is an alternate fix for the buffer export dedicated interaction. Fixes CTS dEQP-VK.api.external.memory.opaque_fd.dedicated.buffer.info Fixes: b70829708a (radv: Implement VK_KHR_external_memory) Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-07-24radv: fix non-0 based layer clears.Dave Airlie1-4/+9
If the layer base was > 0, it wasn't getting passed as the start instance or getting added in the shaders. Fixes CTS dEQP-VK.api.image_clearing.core.clear_color_attachment.2d_r8_uint_multiple_layers Fixes: 7e0382fb (radv: add support for layered clears (v2)) Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-07-24radv: check enabled device features.Dave Airlie1-0/+13
The spec says we should return VK_ERROR_FEATURE_NOT_PRESENT. Ported from anv. Fixes CTS test dEQP-VK.api.device_init.create_device_unsupported_features Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-07-24radv: for external memory imports close the fd on import successDave Airlie1-1/+3
If we get an fd, we need to close it before returning. Fixes CTS test dEQP-VK.api.external.memory.opaque_fd.dedicated.device_only.import_multiple_times Fixes: b70829708a (radv: Implement VK_KHR_external_memory) Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-07-24radv: Don't segfault when exporting an image which hasn't been bound yet.Bas Nieuwenhuizen1-1/+1
The image is set on Memory allocation already, but the image doesn't have to have the BindImageMemory called yet. Luckily, we know offset within a BO has to be 0 for dedicated allocations, so we can just use the dummy 0 in the address calaculations. Fixes CTS test dEQP-VK.api.external.memory.opaque_fd.dedicated.image.export_bind_import_bind Signed-off-by: Bas Nieuwenhuizen <basni@google.com> Fixes: b70829708ac "radv: Implement VK_KHR_external_memory" Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-07-24radv: Handle VK_ATTACHMENT_UNUSED in color attachments.Bas Nieuwenhuizen6-20/+45
This just sets them to INVALID COLOR, instead of shifting the attachments together. This also fixes a number of cases where we use it first and only then check if it is VK_ATTACHMENT_UNUSED. Signed-off-by: Bas Nieuwenhuizen <basni@google.com> Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver" Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-07-24broadcom: correct header file in BROADCOM_FILESAndres Gomez1-1/+1
This fixes `make distcheck` > make[3]: *** No rule to make target 'common/v3d_devinfo.h', needed by 'distdir'. Stop. > make[3]: Leaving directory '/home/local/mesa/src/broadcom' > Makefile:945: recipe for target 'distdir' failed > make[2]: Leaving directory '/home/local/mesa/src' > make[2]: *** [distdir] Error 1 > make[1]: *** [distdir] Error 1 Fixes: 427bbbb99c ("broadcom: Introduce a header for talking about chip revisions.") Cc: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Andres Gomez <agomez@igalia.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-07-23etnaviv: Clear lbl_usage array correctlyWladimir J. van der Laan1-1/+1
Fill the entire array instead of just a quarter. This avoids crashes with large shaders. (currently this never causes a problem because shaders larger than 2048/4 instructions are not supported by this driver on any hardware, but it will cause problems in the future) Fixes: ec436051899 ("etnaviv: fix shader miscompilation with more than 16 labels") Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2017-07-22anv/image: zalloc image viewsJason Ekstrand1-7/+1
This allows us to avoid some extra zeroing. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-07-22anv/image: Use vk_zalloc instead of an explicit memsetJason Ekstrand1-3/+2
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-07-22anv: Separate surface states by layout instead of aux_usageJason Ekstrand4-53/+58
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-07-22intel/isl: Add some sanity checks for compressed surfacesJason Ekstrand1-0/+18
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-07-22intel/isl: Add a helper to get a subimage surfaceJason Ekstrand3-30/+76
We already have a helper for doing this in BLORP, this just moves the logic into ISL where we can share it with other components. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-07-22anv: Get rid of some unused function declarationsJason Ekstrand1-7/+0
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-07-22i965: Enable regular fast-clears (CCS_D) on gen9+Jason Ekstrand6-59/+45
The set of formats which supports CCS_E is actually fairly small on gen9. However, everything that supports fast-clears on gen8 also supports fast-clears on gen9+. The one very annoying exception is that blending is broken for non-0/1 clear colors with sRGB formats. In order to solve that problem, we do a resolve to get rid of the clear color. Another option would be to just not fast-clear with non-0/1 clear colors however non-0/1 + blending + sRGB is uncommon enough that this shouldn't be a significant performance problem. This appears to help gl_manhattan31_off by about 2%. Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-07-22intel/isl: Add a helper for determining if a color is 0/1Jason Ekstrand2-0/+30
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-07-22intel/blorp: Allow blorp_copy on sRGB formatsJason Ekstrand1-2/+16
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-07-22i965: Weaken the texture view rules for formats slightlyJason Ekstrand1-1/+18
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-07-22intel/isl/format: Add an srgb_to_linear helperJason Ekstrand2-1/+53
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-07-22intel/isl/format: Dedent the template in gen_format_layout.pyJason Ekstrand1-58/+57
This makes it much easier to edit the template and doesn't really dirty the python all that much. Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-07-22i965/surface_state: Get the aux usage from the miptree codeJason Ekstrand1-95/+13
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-07-22i965/surface_state: Take an isl_aux_usage in emit_surface_stateJason Ekstrand1-26/+47
This commit replaces the generic "flags" parameter with a more explicit aux usage parameter. This leads to a lot of duplicated code at the moment but this will all get cleaned up directly. Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-07-22i965/miptree: Take an isl_format in prepare_textureJason Ekstrand3-12/+13
This will be a bit more convenient momentarily. It's also more correct because it makes prepare_texture take sRGB into account.
2017-07-22i965/miptree: Use miptree range helpers in has_color_unresolvedJason Ekstrand1-43/+38
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-07-22i965/miptree: Allow for accessing a CCS_E image as CCS_DJason Ekstrand1-9/+27
This requires us to start using the partial clear state. It makes things quite a bit more complicated but it's still a fairly straightforward exercise in diagram following. Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-07-22i965/miptree: Use ISL_AUX_STATE_PARTIAL_CLEAR for CCS_DJason Ekstrand1-5/+5
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-07-22intel/isl: Add an aux state for "partial clear"Jason Ekstrand2-35/+65
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-07-22i965/miptree: Take an aux_usage in prepare/finishJason Ekstrand4-60/+80
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-07-22i965/miptree: Refactor some things to use mt->aux_usageJason Ekstrand1-37/+56
Now that we have this field, it's much easier to switch on it than to walk an if ladder that checks different things. Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-07-22i965/blorp: Use prepare/finish_depth for depth clearsJason Ekstrand1-36/+21
We also simplify the way we handle stencil since we know a priori that it will have ISL_AUX_USAGE_NONE. Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-07-22i965/blorp: Use render_aux_usage for color clearsJason Ekstrand1-12/+6
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-07-22i965/blorp: Be more accurate about aux usage in blorp_copyJason Ekstrand1-13/+42
The only real change here is that we now reject clear colors for MCS with certain formats on gen < 9 because we can't trust that the reinterpretation will work. This may cause some MCS partial resolves. Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-07-22i965/blorp: Use texture/render_aux_usage for blitsJason Ekstrand1-16/+16
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-07-22i965/blorp: Do prepare/finish manuallyJason Ekstrand1-38/+92
Our attempts to do it automatically are problematic at best. In order to really be precise, we need to know both the desired aux usage and whether or not clear is supported. The current automatic mechanism doesn't cover this. This commit itself is not a functional change since it just reworks everything to be in terms of a silly helper. Later commits will switch things over to more sensible ways of choosing usage. Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-07-22i965/miptree: Rework prepare/finish_render to be in terms of aux_usageJason Ekstrand3-20/+59
We keep the old and possibly broken method of determining aux usage intact for now. Therefore, the only functional change here is that we may call finish_render a bit more accurately. Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-07-22i965/miptree: Add a helper for getting the aux usage for texturingJason Ekstrand2-20/+43
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-07-22i965/miptree: Partially resolve MCS for texture viewsJason Ekstrand1-7/+7
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-07-22i965/miptree: Add support for partially resolving MCSJason Ekstrand3-3/+67
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>