Compare commits

..

68 Commits

Author SHA1 Message Date
Juan A. Suarez Romero
5c6d266c59 docs: add release notes for 19.1.8
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
2019-10-21 13:55:11 +02:00
Juan A. Suarez Romero
6cffdfd192 Update version to 19.1.8
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
2019-10-21 11:33:41 +00:00
Alan Coopersmith
dfcde49122 intel/common: include unistd.h for ioctl() prototype on Solaris
Fixes build errors of:
In file included from ../src/intel/vulkan/anv_private.h:48,
                 from ../src/intel/vulkan/genX_blorp_exec.c:26:
../src/intel/common/gen_gem.h: In function ‘gen_ioctl’:
../src/intel/common/gen_gem.h:68:15: error: implicit declaration of function ‘ioctl’ [-Werror=implicit-function-declaration]
   68 |         ret = ioctl(fd, request, arg);
      |               ^~~~~
In file included from ../include/c11/threads_posix.h:35,
                 from ../include/c11/threads.h:66,
                 from ../src/mesa/main/mtypes.h:39,
                 from ../src/intel/compiler/brw_compiler.h:30,
                 from ../src/intel/vulkan/anv_private.h:51,
                 from ../src/intel/vulkan/genX_blorp_exec.c:26:
/usr/include/unistd.h: At top level:
/usr/include/unistd.h:471:12: error: conflicting types for ‘ioctl’
  471 | extern int ioctl(int, int, ...);
      |            ^~~~~
/usr/include/unistd.h:471:1: note: a parameter list with an ellipsis can’t match an empty parameter name list declaration
  471 | extern int ioctl(int, int, ...);
      | ^~~~~~
In file included from ../src/intel/vulkan/anv_private.h:48,
                 from ../src/intel/vulkan/genX_blorp_exec.c:26:
../src/intel/common/gen_gem.h:68:15: note: previous implicit declaration of ‘ioctl’ was here
   68 |         ret = ioctl(fd, request, arg);
      |               ^~~~~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
(cherry picked from commit 6804b8e1ff)
[Juan A. Suarez: resolve trivial conflicts]
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>

Conflicts:
	src/intel/common/gen_gem.h
2019-10-16 17:36:16 +02:00
Alan Coopersmith
9c100e31a2 meson: recognize "sunos" as the system name for Solaris
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
(cherry picked from commit d8a9420f6f)
[Juan A. Suarez: resolve trivial conflict]
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>

Conflicts:
	meson.build
2019-10-16 15:32:51 +00:00
Matt Turner
2fd001f21e util: Drop preprocessor guards for glibc-2.12
glibc-2.12 was released in 2010. No one is building new Mesa against 9
year old glibc, and removing these checks allows the code to work on
other C libraries like musl.

Acked-by: Eric Engestrom <eric.engestrom@intel.com>
(cherry picked from commit 9c411e020d)
2019-10-16 15:26:21 +00:00
Alan Coopersmith
13120904e4 util: Workaround lack of flock on Solaris
v2: Replace autoconf check for flock() with meson check

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
(cherry picked from commit b3028a9fb8)
[Juan A. Suarez: resolve trivial conflicts]
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>

Conflicts:
	meson.build
2019-10-16 14:52:59 +00:00
Alan Coopersmith
740b0e9dc7 util: Make Solaris implemention of p_atomic_add work with gcc
gcc is very particular about where you place the (void) cast
The previous placement made it error out with:

In file included from disk_cache.c:40:0:
../../src/util/u_atomic.h:203:29: error: void value not ignored as it ought to be
 #define p_atomic_add(v, i) ((void)         \
                              ^
disk_cache.c:658:4: note: in expansion of macro ‘p_atomic_add’
    p_atomic_add(cache->size, size);
    ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
(cherry picked from commit a56c3e3a47)
2019-10-16 14:49:34 +00:00
Alan Coopersmith
9eaa6998cc c99_compat.h: Don't try to use 'restrict' in C++ code
Fixes build failures on Solaris in C++ files using gcc:

../src/util/u_math.h:628:41: error: expected ‘,’ or ‘...’ before ‘dest’
  628 | util_memcpy_cpu_to_le32(void * restrict dest, const void * restrict src, size_t n)
      |                                         ^~~~
../src/util/u_math.h: In function ‘void* util_memcpy_cpu_to_le32(void*)’:
../src/util/u_math.h:641:18: error: ‘dest’ was not declared in this scope
  641 |    return memcpy(dest, src, n);
      |                  ^~~~
../src/util/u_math.h:641:24: error: ‘src’ was not declared in this scope
  641 |    return memcpy(dest, src, n);
      |                        ^~~
../src/util/u_math.h:641:29: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
  641 |    return memcpy(dest, src, n);
      |                             ^
      |                             yn

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
(cherry picked from commit ddde652e70)
2019-10-16 14:46:47 +00:00
Juan A. Suarez Romero
e56b3afd2d cherry-ignore: Revert "radv: disable viewport clamping even if FS doesn't write Z"
Revert: this commit was explicitly requested to be removed from the
branch.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
2019-10-07 14:30:05 +00:00
Lionel Landwerlin
d169d0df0e intel/isl: Set null surface format to R32_UINT
It appears we never had a test in piglit or deqp sampling from a null
surface...

It turns out this triggers a hang on IVB only. Updating the null
surface format to R32_UINT fixes the hang on ivb and doesn't affect
other platforms, so set it by default for all platforms.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/issues/1872
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit c445d6f66e)
2019-10-07 16:27:08 +02:00
Lionel Landwerlin
3d763e801c intel: fix subslice computation from topology data
We're missing the offset of the slice in the subslice mask...

This worked for most platforms that don't have first slice fused off
because we would reread the same mask from slice0 again and again...

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c1900f5b0f ("intel: devinfo: add helper functions to fill fusing masks values")
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/issues/1869
Reviewed-by: Mark Janes <mark.a.janes@intel.com>
(cherry picked from commit d36763b2a4)
2019-10-07 16:27:07 +02:00
Prodea Alexandru-Liviu
9b75c1eaef scons/MSYS2-MinGW-W64: Fix build options defaults
Signed-off-by: Prodea Alexandru-Liviu <liviuprodea@yahoo.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Cc: <mesa-stable@lists.freedesktop.org>

When building in a MSYS2 Mingw-w64 environment Mesa3D sets wrong default build options which inevitably lead to build failure.

(cherry picked from commit 6309c31fd8)
2019-10-07 16:27:07 +02:00
Dylan Baker
7e3d942403 meson: Only error building gallium video without libdrm when the platform is drm
Fixes: 3b265f61f5
       ("meson: gallium media state trackers require libdrm with x11")
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1878
Tested-by: Vinson Lee <vlee@freedesktop.org>
(cherry picked from commit 1481d05409)
2019-10-07 16:27:07 +02:00
Andres Gomez
142e51da08 egl: Remove the 565 pbuffer-only EGL config under X11.
The CTS finally has agreed to drop the requirement for a
565-no-depth-no-stencil config for ES 3.0. Hence we can now remove the
code to satisfy this requirement using a pbuffer-only visual with
whatever other buffers the driver happens to have given us.

This reverts commit 82607f8a90,
commit 6ad31c4ff3 and
commit dacb11a585.

v2:
  - Reference the VK-GL-CTS issue (Eric E.).

v3:
  - Don't revert
    fc21394bc4 ("egl: Quiet warning about front buffer rendering for pixmaps/pbuffers")
    (Kenneth).

References: VK-GL-CTS issue 1601.
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Andres Gomez <agomez@igalia.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 02c265be9d)
[Juan A. Suarez: resolve trivial conflicts]
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>

Conflicts:
	src/egl/drivers/dri2/platform_x11.c
2019-10-07 16:27:07 +02:00
Juan A. Suarez Romero
844c594837 cherry-ignore: radv: Fix condition for skipping the continue CS.
Fixes: this commit depends on commit e1dc3ab753 in order to compile,
which did not land in the branch.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
2019-10-07 16:27:07 +02:00
Lionel Landwerlin
9fc609585d mesa: don't forget to clear _Layer field on texture unit
On the Android Antutu benchmark we ran into an assert in ISL where the
(base layer + num layers) > total layers. It turns out the core of
mesa forgot to clear the _Layer variable, potentially leaving an
inconsistent value.

v2: Pull setting u->_Layer out of the conditional blocks (Jason)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit 2208d79dde)
2019-10-02 09:41:27 -04:00
Ken Mays
ab1ae12790 haiku: fix Mesa build
1. The hgl.c file is a read-only file versus read-write.
Ref: src/gallium/state_trackers/hgl/hgl.c

2.  I've included the Haiku-specific patches I used to get a successful
build of Mesa 19.1.7 on Haiku using the meson/ninja build procedure.
Shows "[764/764] linking target ... libswpipe.so" at build completion.

v2:
Remove autotools files (Eric)

v3:
Update the patch

Reported-by: Ken Mays <kmays2000@gmail.com>
Tested-by: Ken Mays <kmays2000@gmail.com>
CC: mesa-stable@lists.freedesktop.org
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
(cherry picked from commit 4943c89d6d)
2019-10-02 09:41:27 -04:00
Kenneth Graunke
9bc34d54db iris: Fix iris_rebind_buffer() for VBOs with non-zero offsets.
We can't just check for the BO base address, we need to check for the
full address including any offset we may have applied.  When updating
the address, we need to include the offset again.

Fixes: 5ad0c88dbe ("iris: Replace buffer backing storage and rebind to update addresses.")
(cherry picked from commit 309924c3c9)
2019-10-02 09:41:27 -04:00
Dylan Baker
f7338bfe1f meson: gallium media state trackers require libdrm with x11
v2: - update copyright year in all changed files
    - rebase on master

Cc: 19.1 19.2 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
(cherry picked from commit 3b265f61f5)
2019-10-02 09:41:27 -04:00
Kenneth Graunke
2d584d7386 iris: Disable CCS_E for 32-bit floating point textures.
A while back, Michael Larabel noticed that Paraview's Wavelet Volume
case runs significantly slower on iris than i965.  It turns out this
is because we enable CCS_E for 32-bit floating point formats, while
i965 disables it, with an oblique comment saying that we benchmarked
it (on what exactly?) and determined that it was a loss.

Paraview uses both R32_FLOAT and R32G32B32A32_FLOAT, and I observed
large framerate drops when enabling CCS_E for either format.  However,
several other benchmarks (Aztec Ruins, many Synmark cases) use 16-bit
floating point formats, with no apparent ill effects.

So, disable compression for 32-bit float formats for now, but leave it
enabled for 16-bit float formats as they seem to be working fine.

Improves performance in Paraview's Wavelet Volume test by 62% on a
Skylake GT4e.

Fixes: 3cfc6a207b ("iris: Fill out res->aux.possible_usages")
(cherry picked from commit a0a93763fb)
2019-10-02 09:41:27 -04:00
pal1000
2739dd9621 scons: Fix MSYS2 Mingw-w64 build.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>

This patch is based on 28e3f85e09/mingw-w64-mesa/link-ole32.patch but with tweaks to avoid MSVC build break when applied.

v2: Create Mingw platform alias pointing to windows host platform define to avoid spurious crosscompilation;

v3: Fix obviously wrong compiler flags for swr driver;

v4: Update original patch URL because it has been relocated;

v5: Don't bother patching autools stuff as it's not used by MSYS2 Mingw-w64 build and it's days are numbered anyway;

v6: After Mingw posix flag fix in 295851eb things are far simpler as we don't need more linking of uuid, ole32, version and shell32 than what is already in place.
(cherry picked from commit ffb0d3a25c)
2019-10-02 09:41:27 -04:00
pal1000
e53ca66c4a scons/windows: Support build with LLVM 9.
As X86AsmPrinter component is gone, LLVMX86AsmPrinter got replaced
with LLVMRemarks, LLVMBitstreamReader and LLVMDebugInfoDWARF.

Tests done with llvm-config on both LLVM 8 and 9 indicate that
mcjit, bitwriter and x86asmprinter fully fit inside engine component.

On other platforms and with meson build mcdisassembler was used to replace
X86AsmPrinter but mcdisassembler also fully fits inside engine component
for LLVM>=8 according to same tests.

v2: Avoid duplicating code related to Mingw pthreads.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>

Cc: 19.1 19.2 <mesa-stable@lists.freedesktop.org>

On 19.1 this patch does not apply cleanly without 88eb2a1f

(cherry picked from commit bcb4dfb14b)
2019-10-02 09:41:27 -04:00
Michel Zou
7c0ce1b35e scons: For MinGW use -posix flag.
Signed-off-by: Jose Fonseca <jfonseca@vmware.com>
(cherry picked from commit 88eb2a1f7e)
2019-10-02 09:41:27 -04:00
Michel Zou
09ba783aea scons: add py3 support
SCons 3.1 has moved to python 3, requiring this fix
to continue supporting scons builds.

Closes: #944
Cc: mesa-stable@lists.freedesktop.org
Acked-by: Eric Engestrom <eric@engestrom.ch>
Tested-by: Eric Engestrom <eric@engestrom.ch>
(cherry picked from commit 3f92d17894)
2019-10-02 09:41:27 -04:00
Andrii Simiklit
70ef5d63f7 glsl: disallow incompatible matrices multiplication
glsl 4.4 spec section '5.9 expressions':
"The operator is multiply (*), where both operands are matrices or one operand is a vector and the
 other a matrix. A right vector operand is treated as a column vector and a left vector operand as a
 row vector. In all these cases, it is required that the number of columns of the left operand is equal
 to the number of rows of the right operand. Then, the multiply (*) operation does a linear
 algebraic multiply, yielding an object that has the same number of rows as the left operand and the
 same number of columns as the right operand. Section 5.10 “Vector and Matrix Operations”
 explains in more detail how vectors and matrices are operated on."

This fix disallows a multiplication of incompatible matrices like:
mat4x3(..) * mat4x3(..)
mat4x2(..) * mat4x2(..)
mat3x2(..) * mat3x2(..)
....

CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111664
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
(cherry picked from commit b32bb888c7)
2019-10-02 09:41:27 -04:00
Jason Ekstrand
f041840367 intel/fs: Fix fs_inst::flags_read for ANY/ALL predicates
Without this, we were DCEing flag writes because we didn't think their
results were used because we didn't understand that an ANY32 predicate
actually read all the flags.

Fixes: df1aec763e "i965/fs: Define methods to calculate the flag..."
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit 6c858b9a91)
2019-10-02 09:41:27 -04:00
Dylan Baker
4a50b8add1 meson: Link xvmc with libxv
Prior to xvmc 1.0.12 libxvmc incorrectly required libxv, but that was
fixed. This results in compilation failures for the gallium xvmc tracker
and tools. This patch fixes that by explicitly linking to libxv.

Fixes: 22a817af8a
       ("meson: build gallium xvmc state tracker")
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1844
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit e456a053c3)
2019-10-02 09:41:27 -04:00
Dylan Baker
b30a0afc0c meson: Try finding libxvmcw via pkg-config before using find_library
This fixes cross compiling issues, because pkg-config is less likely to
get the wrong libs.

v2: - Fix typo in comment

Fixes: 22a817af8a
       ("meson: build gallium xvmc state tracker")
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/939
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 8c5c21d7e3)
2019-10-02 09:41:27 -04:00
Andreas Gottschling
8118131f37 drisw: Fix shared memory leak on drawable resize
XDestroyImage will mark the segment as to-be-destroyed, but it will
persist until we detach it, and we weren't doing so.

Cc: mesa-stable@lists.freedesktop.org
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/issues/121
Reviewed-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit c5a2ccec5e)
2019-10-02 09:41:27 -04:00
Michel Dänzer
950d167026 radeonsi: fix VAAPI segfault due to various bugs
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111236
(cherry picked from commit 67d930d64b)
2019-10-02 09:41:27 -04:00
Dylan Baker
e37019723f meson: fix logic for generating .pc files with old glvnd
We want to generate PC files for non-glvnd builds and for builds with
old glvnd, but the current logic doesn't do that, it builds them
unconditionally, and for GLES it builds the shared libraries, which is
also not what we want. This does not generate .pc files for gles1 or
gles2. Which it we weren't doing before either, making this not a
regression but a return to status-quo.o

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1838
Fixes: 93df862b6a
       ("meson: re-add incorrect pkg-config files with GLVND for backward compatibility")
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit fafd20f67d)
2019-10-02 09:41:27 -04:00
Lionel Landwerlin
450b808eea intel: use proper label for Comet Lake skus
Fixes: 82f6a746e8 ("intel: Add support for Comet Lake")
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 813f3460e7)
[Juan A. Suarez: resolve trivial conflicts]
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>

Conflicts:
	include/pci_ids/i965_pci_ids.h
2019-10-02 09:41:27 -04:00
Lionel Landwerlin
3b927c447f anv: gem-stubs: return a valid fd got anv_gem_userptr()
Fixes invalid close(-1) in the unit tests.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit da2d67fc3b)
2019-10-02 09:41:27 -04:00
Tapani Pälli
52dc974cd1 util: fix os_create_anonymous_file on android
Commit fixes current crashes with Vulkan applications on Android.

Fixes: c0376a1234 "util: add anon_file.h for all memfd/temp file usage"
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
(cherry picked from commit ce8fd042a5)
2019-10-02 09:41:27 -04:00
Juan A. Suarez Romero
26ab4e1614 cherry-ignore: util: added missing headers in anon-file
Fixes: The commit was reverted later.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
2019-10-02 09:41:27 -04:00
Eric Engestrom
e5e81d6530 util/anon_file: const string param
Fixes: c0376a1234 ("util: add anon_file.h for all memfd/temp file usage")
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Tested-by: Eric Anholt <eric@anholt.net>
Tested-by: Andreas Baierl <ichgeh@imkreisrum.de>
(cherry picked from commit 525a917c6c)
2019-10-02 09:41:27 -04:00
Eric Engestrom
b13396622c util/anon_file: add missing #include
Fixes: c0376a1234 ("util: add anon_file.h for all memfd/temp file usage")
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Tested-by: Eric Anholt <eric@anholt.net>
Tested-by: Andreas Baierl <ichgeh@imkreisrum.de>
(cherry picked from commit 60af7f5a81)
2019-10-02 09:41:27 -04:00
Greg V
bb22ac12d6 util: add anon_file.h for all memfd/temp file usage
Move the Weston os_create_anonymous_file code from egl/wayland into util,
add support for Linux memfd and FreeBSD SHM_ANON,
use that code in anv/aubinator instead of explicit memfd calls for portability.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
(cherry picked from commit c0376a1234)
2019-10-02 09:41:27 -04:00
Danylo Piliaiev
2963e9fa3d st/nine: Ignore D3DSIO_RET if it is the last instruction in a shader
RET as a last instruction could be safely ignored.
Remove it to prevent crashes/warnings in case underlying driver
doesn't implement arbitrary returns.

A better way would be to remove the RET after the whole shader
is parsed which will handle a possible case when the last RET is
followed by a comment.

CC: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Axel Davy <davyaxel0@gmail.com>
(cherry picked from commit 2d8f77db83)
2019-10-02 09:41:27 -04:00
Eric Engestrom
a74657d4aa meson: re-add incorrect pkg-config files with GLVND for backward compatibility
This is a bit counter-intuitive, but the issue is that GLVND is broken
in versions <= 1.1.1, so we need to keep wrongly providing these files
to cover up their mistake, otherwise the rest of the world ends up
broken.

Suggested-by: Dylan Baker <dylan@pnwbakers.com>
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
(cherry picked from commit 93df862b6a)
[Juan A. Suarez: resolve trivial conflicts]
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>

Conflicts:
	src/egl/meson.build
2019-10-02 09:41:27 -04:00
Erik Faye-Lund
3a0b77e3f7 glsl: correct bitcast-helpers
Without this, we'll incorrectly round off huge values to the nearest
representable double instead of keeping it at the exact value  as
we're supposed to.

Found by inspecting compiler-warnings.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Fixes: 85faf5082f ("glsl: Add 64-bit integer support for constant expressions")
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
(cherry picked from commit 88f909eb37)
2019-10-02 09:41:27 -04:00
Rhys Perry
ef35babd33 nir/opt_remove_phis: handle phis with no sources
This can happen with loops with unreachable exits which are later
optimized away.

Fixes assertion in dEQP-VK.graphicsfuzz.unreachable-loops with RADV.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit 12372d60ff)
2019-10-02 09:41:27 -04:00
Marek Olšák
954ace9e3e gallium/vl: don't set PIPE_HANDLE_USAGE_EXPLICIT_FLUSH
because vl doesn't call flush_resource and I wasn't able to find
all places where flush_resource needs to be called.

This fixes corrupted / unflushed surfaces with fullscreen videos on Raven.

Cc: 19.1 19.2 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit f52afdf672)
2019-10-02 09:41:27 -04:00
Juan A. Suarez Romero
4f48aaf50a cherry-ignore: nir/opt_large_constants: Handle store writemasks
Fixes: This commit does not apply cleanly on 19.1 branch, as it depends
on other commits not present in the branch.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
2019-10-02 09:41:27 -04:00
Stephen Barber
d34ae3876a nouveau: add idep_nir_headers as dep for libnouveau
Fixes a compilation error when building libnouveau:

In file included from ../src/gallium/drivers/nouveau/nv50/nv50_program.c:25:
../src/compiler/nir/nir.h:1115:10: fatal error: nir_intrinsics.h: No such file or directory
 #include "nir_intrinsics.h"
           ^~~~~~~~~~~~~~~~~~
           compilation terminated.

Fixes: f014ae3c7c ("nouveau: add support for nir")
Signed-off-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
(cherry picked from commit 8c3ace6991)
2019-10-02 09:41:27 -04:00
Juan A. Suarez Romero
895f0a2ca2 bin/get-pick-list.sh: sha1 commits can be smaller than 8 chars
The script only handles commits with "Fixes: <sha1>" where <sha1> is
equal or great than 8 chars. But <sha1> can be smaller, like 7 chars.

This commit relax the restriction to handle <sha1> 4 or more chars.

Fixes: 533fead423 ("bin/get-pick-list.sh: tweak the commit sha matching pattern")

Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
(cherry picked from commit b3c25e6f99)
2019-10-02 09:41:27 -04:00
Bas Nieuwenhuizen
9ee9251ef8 radv: Add workaround for hang in The Surge 2.
Released today and hangs on RADV. We don't have the root cause yet,
but this should unblock people playing the game.

No drirc because the radv debugflags are not usable from drirc and
I want this backported.

CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 780182f0a0)
2019-10-02 09:41:27 -04:00
Kenneth Graunke
b977c7444c intel: Increase Gen11 compute shader scratch IDs to 64.
From the MEDIA_VFE_STATE docs:

   "Starting with this configuration, the Maximum Number of Threads must
    be set to (#EU * 8) for GPGPU dispatches.

    Although there are only 7 threads per EU in the configuration, the
    FFTID is calculated as if there are 8 threads per EU, which in turn
    requires a larger amount of Scratch Space to be allocated by the
    driver."

It's pretty clear that we need to increase this for scratch address
calculations, because the FFTID has a certain bit-pattern.  The quote
above seems to indicate that we should increase the actual thread count
programmed in MEDIA_VFE_STATE as well, but we think the intention is to
only bump the scratch space.

Fixes GPU hangs in Bioshock Infinite and Synmark's CSDof on Icelake 8x8.

Fixes: 5ac804bd9a ("intel: Add a preliminary device for Ice Lake")
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit b9e93db208)
2019-10-02 09:41:27 -04:00
Jason Ekstrand
c94e5e3ee1 nir/repair_ssa: Replace the unreachable check with the phi builder
In a3268599f3, I attempted to fix nir_repair_ssa for unreachable
blocks.  However, that commit missed the possibility that the use is in
a block which, itself, is unreachable.  In this case, we can end up in
an infinite loop trying to replace a def with itself.  Even though a
no-op replacement is a fine operation, it keeps extending the end of the
uses list as we're walking it.  Instead of explicitly checking for the
group of conditions, just check if the phi builder gives us a different
def.  That's guaranteed to be 100% reliable and, while it lacks symmetry
with the is_valid checks, should be more reliable.

Fixes: a3268599 "nir/repair_ssa: Repair dominance for unreachable..."
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit d63162cff0)
2019-10-02 09:41:27 -04:00
Juan A. Suarez Romero
c140c260c1 cherry-ignore: Revert "gallium: remove PIPE_CAP_TEXTURE_SHADOW_MAP"
revert: The following commit was requested to be removed from stable
branch by original author.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
2019-10-02 09:41:27 -04:00
Juan A. Suarez Romero
34ee0eb6cc Revert "Revert "intel/fs: Move the scalar-region conversion to the generator.""
This reverts commit 667920050a.

This commit was breaking Xorg rendering in all Icelake devices.

Gitlab: https://gitlab.freedesktop.org/mesa/mesa/issues/795
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
2019-10-02 09:41:27 -04:00
Hal Gentz
db6974fa2a gallium/osmesa: Fix the inability to set no context as current.
Currently there is no way to make no context current w/gallium + osmesa.
The non-gallium version of osmesa does this if the context and buffer
passed to `OSMesaMakeCurrent` are both null. This small change makes it
so that this is also the case with the gallium version.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Hal Gentz <zegentzy@protonmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 57c894334e)
2019-10-02 09:41:27 -04:00
Andres Gomez
9e754647ba docs/features: Update VK_KHR_display_swapchain status
It was set as done by mistake.

Fixes: bc15d74529 ("docs/features: Mark some Vulkan extensions as done")
Signed-off-by: Andres Gomez <agomez@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
(cherry picked from commit bcd9224728)
[Juan A. Suarez: resolve trivial conflicts]
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>

Conflicts:
	docs/features.txt
2019-10-02 09:41:27 -04:00
Adam Jackson
0b8c7cf51c docs: Update bug report URLs for the gitlab migration
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
(cherry picked from commit 5b5c5bf833)
2019-10-02 09:41:27 -04:00
Arcady Goldmints-Orlov
7e6dd1ce7a anv: fix descriptor limits on gen8
Later generations support bindless for samplers, images, and buffers and
thus per-stage descriptors are not limited by the binding table size.
However, gen8 doesn't support bindless images and thus needs to report a
lower per-stage limit so that all combinations of descriptors that fit
within the advertised limits are reported as supported by
vkGetDescriptorSetLayoutSupport.

Fixes test dEQP-VK.api.maintenance3_check.descriptor_set
Fixes: 79fb0d27f3 ("anv: Implement SSBOs bindings with GPU addresses in the descriptor BO")

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 5ec5fecc26)
2019-10-02 09:41:27 -04:00
Tapani Pälli
1ee0add2a5 egl: check for NULL value like eglGetSyncAttribKHR does
Commit d1e1563bb6 added a NULL check for eglGetSyncAttribKHR
but eglGetSyncAttrib does not do this. Patch adds same check to
happen with eglGetSyncAttrib.

Fixes crashes in (when exposing EGL 1.5):
   dEQP-EGL.functional.fence_sync.invalid.get_invalid_value

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 99cbec0a5f)
2019-10-02 09:41:27 -04:00
Paulo Zanoni
3b0e591228 intel/fs: fix SHADER_OPCODE_CLUSTER_BROADCAST for SIMD32
The current code can create functions with a width of 32, which is not
supported by our hardware. Add some code to simplify how we express
what we want and prevent such cases.

For some unknown reason, all the tests I could run seem to work even
with these unsupported MOVs.

Fixes: b0858c1cc6 "intel/fs: Add a couple of simple helper opcodes"
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
(cherry picked from commit 8e614c7a29)
2019-10-02 09:41:27 -04:00
Eric Engestrom
5936c8f4f4 gl: drop incorrect pkg-config file for glvnd
Akin to 1a25980c46 ("egl: drop incorrect pkg-config file for
glvnd") and b01524fff0 ("meson: don't build libGLES*.so with
GLVND") , removes a pkg-config file that shouldn't have been there in
the first place, but was needed because of that GLVND bug.

Now that the glvnd bug has been fixed, it was apparent that this gl.pc
pkg-config file was forgotten to be removed, so let's do just that :)

Suggested-by: Matt Turner <mattst88@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit a1de3011f3)
2019-10-02 09:41:27 -04:00
Juan A. Suarez Romero
8748747007 cherry-ignore: add explicit 19.3 only nominations
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
2019-10-02 09:41:24 -04:00
Andres Gomez
ac31da3529 docs: Add the maximum implemented Vulkan API version in 19.1 rel notes
Currently, Vulkan 1.1.

Cc: 19.1 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
(cherry picked from commit d2db43fcad)
2019-10-02 09:40:28 -04:00
Bas Nieuwenhuizen
97af29d6da tu: Set up glsl types.
Addresses this assert:

deqp-vk: ../mesa-freedreno-9999/src/compiler/glsl_types.cpp:1244: static const glsl_type *glsl_type::get_interface_instance(const glsl_struct_field *, unsigned int, enum glsl_interface_packing, bool, const char *): Assertion `glsl_type_users > 0' failed.

running dEQP-VK.api.smoke.triangle .

Fixes: 624789e370 "compiler/glsl: handle case where we have multiple users for types"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 7999e10cab)
2019-10-02 09:40:28 -04:00
Haihao Xiang
81a4483465 i965: support AYUV/XYUV for external import only
Fixes: 89785e2d56 ("i965: add support for sampling from AYUV")
Fixes: 7cab8d3661 ("i965: Add support for sampling from XYUV images")
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
(cherry picked from commit 8a9b81ab9d)
2019-10-02 09:40:28 -04:00
Samuel Iglesias Gonsálvez
00651091fa intel/nir: do not apply the fsin and fcos trig workarounds for consts
If we have fsin or fcos trigonometric operations with constant values
as inputs, we will multiply the result by 0.99997 in
brw_nir_apply_trig_workarounds, making the result wrong.

Adjusting the rules so they do not apply to const values we let a
later constant fold to deal with it.

v2:
- Do not early constant fold but only apply the trig workaround for
  non constants (Caio).
- Add fixes tag to commit log (Caio).

Fixes: bfd17c76c1 "i965: Port INTEL_PRECISE_TRIG=1 to NIR."
Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
(cherry picked from commit 3c474f8513)
2019-10-02 09:40:28 -04:00
Tapani Pälli
d11d2c6def iris: close screen fd on iris_destroy_screen
Otherwise it never gets closed, this fixes errors seen with deqp-egl
where we end up opening 1024 files.

Fixes: 2dce0e94 ("iris: Initial commit of a new 'iris' driver for Intel Gen8+ GPUs.")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 631255387f)
[Juan A. Suarez: resolve trivial conflicts]
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>

Conflicts:
	src/gallium/drivers/iris/iris_screen.c
2019-10-02 09:40:28 -04:00
Rhys Perry
44c38ecd27 radv: always emit a position export in gs copy shaders
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: f8d0337299 ('radv: add multiple streams support for the GS copy shader')
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit ffabcbba60)
2019-10-02 09:40:28 -04:00
Juan A. Suarez Romero
3859e211db cherry-ignore: add explicit 19.2 only nominations
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
2019-10-02 09:40:26 -04:00
Kenneth Graunke
4d45999a24 iris: Initialize ice->state.prim_mode to an invalid value
It was calloc'd to 0 which is PIPE_PRIM_POINTS, which means that we
fail to notice an initial primitive of points being new, and fail at
updating the "primitive is points or lines" field.

We do not need to reset this on device loss because we're tracking
the last primitive mode sent to us on the CPU via draw_vbo, not the
last primitive mode sent to the GPU.

Fixes several tests:
- dEQP-GLES3.functional.clipping.point.wide_point_clip
- dEQP-GLES3.functional.clipping.point.wide_point_clip_viewport_center
- dEQP-GLES3.functional.clipping.point.wide_point_clip_viewport_corner

Fixes: dcfca0af7c ("iris: Set XY Clipping correctly.")
(cherry picked from commit c9fb704f72)
2019-09-19 07:55:32 +00:00
Juan A. Suarez Romero
b9d7244035 docs: add sha256 checksums for 19.1.7
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
2019-09-17 12:53:06 +02:00
76 changed files with 936 additions and 461 deletions

View File

@@ -39,7 +39,7 @@ LOCAL_CFLAGS += \
-Wno-initializer-overrides \
-Wno-mismatched-tags \
-DPACKAGE_VERSION=\"$(MESA_VERSION)\" \
-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\"
-DPACKAGE_BUGREPORT=\"https://gitlab.freedesktop.org/mesa/mesa/issues\"
# XXX: The following __STDC_*_MACROS defines should not be needed.
# It's likely due to a bug elsewhere, but let's temporarily add them

View File

@@ -73,7 +73,7 @@ with open("VERSION") as f:
mesa_version = f.read().strip()
env.Append(CPPDEFINES = [
('PACKAGE_VERSION', '\\"%s\\"' % mesa_version),
('PACKAGE_BUGREPORT', '\\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\\"'),
('PACKAGE_BUGREPORT', '\\"https://gitlab.freedesktop.org/mesa/mesa/issues\\"'),
])
# Includes

View File

@@ -1 +1 @@
19.1.7
19.1.8

View File

@@ -3,6 +3,7 @@
20b00e1ff24f974bc99e7ca9a720518da0ce5b89 panfrost: Make ctx->job useful
f6c44549ee2dd0f218deea1feba3965523609406 iris: Replace devinfo->gen with GEN_GEN
1cd13ccee7bc2733e7a56284dc02bdb1b1c40081 iris: Update fast clear colors on Gen9 with direct immediate writes.
270fe55256c78ede507d75d4665d73936ea7db31 nir/opt_large_constants: Handle store writemasks
# fixes: The following commit depends on commits 77a1070d366a and df4c2ec5e19b
# in order to compile, which did not land in the branch.
2d799250346331a93b21678dc5605cff74dfa3a1 iris: Avoid unnecessary resolves on transfer maps
@@ -15,3 +16,29 @@ a4e6e59db82e61b47ef905f28dde80ae36a67d35 radv/gfx10: do not use NGG with NAVI14
fe0ec41c4d36fd5a82e7579d89e34cce7423c4e5 radv: Change memory type order for GPUs without dedicated VRAM
28adf0d00c6b5506ed2206b950336bdc568d2247 radeonsi/gfx10: don't call gfx10_destroy_query with compute-only contexts
d95afd8b9e7f9b3880813203292257bf0ed7babf radeonsi/gfx10: fix wave occupancy computations
6d5f11ab345b05759c22acbcd2f79928311689e3 radv: store engine name
04dc6074cf7f651b720868e0ba24362b585d1b31 driconfig: add a new engine name/version parameter
0616b7ac90cf4f86bb409d34101e3a3cceac8cbe vulkan: add vk_x11_strict_image_count option
83f195414a2e89bd9f549dacc04365f67e5bd110 radeonsi: add Navi12 PCI ID
f833b4cada07b746a10ffa4d93fcd821920c3cb1 docs: Update to OpenGL 4.6 in the release notes
68820007fddbb5b79f1b2b08e66ef14092053a95 radv: fix loading 64-bit GS inputs
41b0e0d7e0f2353d337e68e8e439b5dfead880c4 docs: Add the maximum implemented Vulkan API version in 19.2 rel notes
65b698136c5ef0ef1a15cb6fbff13cbc4ceb3881 amd: add more PCI IDs for Navi14
48742de601a8afea1e5f99637f5823a97ca21915 ac/addrlib: fix chip identification for Vega10, Arcturus, Raven2, Renoir
3c0938bece83cd37365c30c35d2d54927f3fe0cd radeonsi/gfx10: fix L2 cache rinse programming
7d97013294816db46abb7d1e7c6871fe73dfac93 ac: fix incorrect vram_size reported by the kernel
8cbe83445b2ec78fab1f303918c79268713500b5 ac: add radeon_info::tcc_harvested
235ebe91633e7f47518118983e0e6f5c632b25a4 radeonsi/gfx10: fix corruption for chips with harvested TCCs
b7c2f7c5a6b21bccb7847ab03b7fba5c770e131c ac: fix num_good_cu_per_sh for harvested chips
# stable: Explicit 19.3 only nominations.
66f2aa6ccd0b226eebe2c1a46281160b0a54d522 docs: Add the maximum implemented Vulkan API version in 19.3 rel notes
# revert: The following commit was requested to be removed from stable branch by original author.
dcc0e23438f3e5929c2ef74d57e8207be25ecb41 Revert "gallium: remove PIPE_CAP_TEXTURE_SHADOW_MAP"
# fixes: The following commit was reverted later
c73988300f943e185a50aaba015f2f114ffcb262 util: added missing headers in anon-file
# fixes: The following commit depends on commit e1dc3ab75348 in order to
# compile, which did not land in the branch.
8ad3d8b178c0d8939db62ac2be9fdc98d127742d radv: Fix condition for skipping the continue CS.
# revert: The following commit was explicitly requested to be removed from the
# branch.
43041627445540afda1a05d11861935963660344 Revert "radv: disable viewport clamping even if FS doesn't write Z"

View File

@@ -32,7 +32,7 @@ is_sha_nomination()
{
fixes=`git show --pretty=medium -s $1 | tr -d "\n" | \
sed -e 's/'"$2"'/\nfixes:/Ig' | \
grep -Eo 'fixes:[a-f0-9]{8,40}'`
grep -Eo 'fixes:[a-f0-9]{4,40}'`
fixes_count=`echo "$fixes" | grep "fixes:" | wc -l`
if test $fixes_count -eq 0; then

View File

@@ -17,6 +17,9 @@ import SCons.Script.SConscript
host_platform = _platform.system().lower()
if host_platform.startswith('cygwin'):
host_platform = 'cygwin'
# MSYS2 default platform selection.
if host_platform.startswith('mingw'):
host_platform = 'windows'
# Search sys.argv[] for a "platform=foo" argument since we don't have
# an 'env' variable at this point.
@@ -49,9 +52,18 @@ if 'PROCESSOR_ARCHITECTURE' in os.environ:
else:
host_machine = _platform.machine()
host_machine = _machine_map.get(host_machine, 'generic')
# MSYS2 default machine selection.
if _platform.system().lower().startswith('mingw') and 'MSYSTEM' in os.environ:
if os.environ['MSYSTEM'] == 'MINGW32':
host_machine = 'x86'
if os.environ['MSYSTEM'] == 'MINGW64':
host_machine = 'x86_64'
default_machine = host_machine
default_toolchain = 'default'
# MSYS2 default toolchain selection.
if _platform.system().lower().startswith('mingw'):
default_toolchain = 'mingw'
if target_platform == 'windows' and host_platform != 'windows':
default_machine = 'x86'

View File

@@ -24,8 +24,8 @@ The old bug database on SourceForge is no longer used.
<p>
To file a Mesa bug, go to
<a href="https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa">
Bugzilla on freedesktop.org</a>
<a href="https://gitlab.freedesktop.org/mesa/mesa/issues">
GitLab on freedesktop.org</a>
</p>
<p>

View File

@@ -445,7 +445,7 @@ Khronos extensions that are not part of any Vulkan version:
VK_KHR_android_surface not started
VK_KHR_create_renderpass2 DONE (anv, radv)
VK_KHR_display DONE (anv, radv)
VK_KHR_display_swapchain DONE (anv, radv)
VK_KHR_display_swapchain not started
VK_KHR_draw_indirect_count DONE (radv)
VK_KHR_external_fence_fd DONE (anv, radv)
VK_KHR_external_fence_win32 not started

View File

@@ -29,7 +29,7 @@ immediately checked into git because not enough people are testing them.
Just applying patches, testing and reporting back is helpful.
<li>
<b>Driver debugging.</b>
There are plenty of open bugs in the <a href="https://bugs.freedesktop.org/describecomponents.cgi?product=Mesa">bug database</a>.
There are plenty of open bugs in the <a href="https://gitlab.freedesktop.org/mesa/mesa/issues">bug database</a>.
<li>
<b>Remove aliasing warnings.</b>
Enable gcc -Wstrict-aliasing=2 -fstrict-aliasing and track down aliasing

View File

@@ -279,7 +279,7 @@ To setup the branchpoint:
<p>
Now go to
<a href="https://bugs.freedesktop.org/editversions.cgi?action=add&amp;product=Mesa" target="_parent">Bugzilla</a> and add the new Mesa version X.Y.
<a href="https://gitlab.freedesktop.org/mesa/mesa/-/milestones" target="_parent">gitlab</a> and add the new Mesa version X.Y.
</p>
<p>

View File

@@ -27,10 +27,15 @@ Some drivers don't support all the features required in OpenGL 4.5. OpenGL
4.5 is <strong>only</strong> available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
</p>
<p>
Mesa 19.1.7 implements the Vulkan 1.1 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
</p>
<h2>SHA256 checksums</h2>
<pre>
TBD
e287920fdb38712a9fed448dc90b3ca95048c7face5db52e58361f8b6e0f3cd5 mesa-19.1.7.tar.xz
</pre>

267
docs/relnotes/19.1.8.html Normal file
View File

@@ -0,0 +1,267 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Mesa Release Notes</title>
<link rel="stylesheet" type="text/css" href="../mesa.css">
</head>
<body>
<div class="header">
<h1>The Mesa 3D Graphics Library</h1>
</div>
<iframe src="../contents.html"></iframe>
<div class="content">
<h1>Mesa 19.1.8 Release Notes / October 21, 2019</h1>
<p>
Mesa 19.1.8 is a bug fix release which fixes bugs found since the 19.1.7 release.
</p>
<p>
Mesa 19.1.8 implements the OpenGL 4.5 API, but the version reported by
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 4.5. OpenGL
4.5 is <strong>only</strong> available if requested at context creation.
Compatibility contexts may report a lower version depending on each driver.
</p>
<p>
Mesa 19.1.8 implements the Vulkan 1.1 API, but the version reported by
the apiVersion property of the VkPhysicalDeviceProperties struct
depends on the particular driver being used.
</p>
<h2>SHA256 checksums</h2>
<pre>
TBD
</pre>
<h2>New features</h2>
<p>None</p>
<h2>Bug fixes</h2>
<ul>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=111236">Bug 111236</a> - VA-API radeonsi SIGSEGV __memmove_avx_unaligned</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=111664">Bug 111664</a> - [Bisected] Segmentation fault on FS shader compilation (mat4x3 * mat4x3)</li>
<li><a href="https://gitlab.freedesktop.org/mesa/mesa/issues/121">Issue #121</a> - Shared Memeory leakage in XCreateDrawable</li>
<li><a href="https://gitlab.freedesktop.org/mesa/mesa/issues/795">Issue #795</a> - Xorg does not render with mesa 19.1.7</li>
<li><a href="https://gitlab.freedesktop.org/mesa/mesa/issues/939">Issue #939</a> - Meson can't find 32-bit libXvMCW in non-standard path</li>
<li><a href="https://gitlab.freedesktop.org/mesa/mesa/issues/944">Issue #944</a> - Mesa doesn't build with current Scons version (3.1.0)</li>
<li><a href="https://gitlab.freedesktop.org/mesa/mesa/issues/1838">Issue #1838</a> - Mesa installs gl.pc and egl.pc even with libglvnd &gt;= 1.2.0</li>
<li><a href="https://gitlab.freedesktop.org/mesa/mesa/issues/1844">Issue #1844</a> - libXvMC-1.0.12 breaks mesa build</li>
<li><a href="https://gitlab.freedesktop.org/mesa/mesa/issues/1869">Issue #1869</a> - X server does not start with Mesa 19.2.0</li>
<li><a href="https://gitlab.freedesktop.org/mesa/mesa/issues/1872">Issue #1872</a> - [bisected] piglit spec.arb_texture_view.bug-layers-image causes gpu hangs on IVB</li>
<li><a href="https://gitlab.freedesktop.org/mesa/mesa/issues/1878">Issue #1878</a> - meson.build:1447:6: ERROR: Problem encountered: libdrm required for gallium video statetrackers when using x11</li>
</ul>
<h2>Changes</h2>
<p>Adam Jackson (1):</p>
<ul>
<li>docs: Update bug report URLs for the gitlab migration</li>
</ul>
<p>Alan Coopersmith (5):</p>
<ul>
<li>c99_compat.h: Don't try to use 'restrict' in C++ code</li>
<li>util: Make Solaris implemention of p_atomic_add work with gcc</li>
<li>util: Workaround lack of flock on Solaris</li>
<li>meson: recognize "sunos" as the system name for Solaris</li>
<li>intel/common: include unistd.h for ioctl() prototype on Solaris</li>
</ul>
<p>Andreas Gottschling (1):</p>
<ul>
<li>drisw: Fix shared memory leak on drawable resize</li>
</ul>
<p>Andres Gomez (3):</p>
<ul>
<li>docs: Add the maximum implemented Vulkan API version in 19.1 rel notes</li>
<li>docs/features: Update VK_KHR_display_swapchain status</li>
<li>egl: Remove the 565 pbuffer-only EGL config under X11.</li>
</ul>
<p>Andrii Simiklit (1):</p>
<ul>
<li>glsl: disallow incompatible matrices multiplication</li>
</ul>
<p>Arcady Goldmints-Orlov (1):</p>
<ul>
<li>anv: fix descriptor limits on gen8</li>
</ul>
<p>Bas Nieuwenhuizen (2):</p>
<ul>
<li>tu: Set up glsl types.</li>
<li>radv: Add workaround for hang in The Surge 2.</li>
</ul>
<p>Danylo Piliaiev (1):</p>
<ul>
<li>st/nine: Ignore D3DSIO_RET if it is the last instruction in a shader</li>
</ul>
<p>Dylan Baker (5):</p>
<ul>
<li>meson: fix logic for generating .pc files with old glvnd</li>
<li>meson: Try finding libxvmcw via pkg-config before using find_library</li>
<li>meson: Link xvmc with libxv</li>
<li>meson: gallium media state trackers require libdrm with x11</li>
<li>meson: Only error building gallium video without libdrm when the platform is drm</li>
</ul>
<p>Eric Engestrom (4):</p>
<ul>
<li>gl: drop incorrect pkg-config file for glvnd</li>
<li>meson: re-add incorrect pkg-config files with GLVND for backward compatibility</li>
<li>util/anon_file: add missing #include</li>
<li>util/anon_file: const string param</li>
</ul>
<p>Erik Faye-Lund (1):</p>
<ul>
<li>glsl: correct bitcast-helpers</li>
</ul>
<p>Greg V (1):</p>
<ul>
<li>util: add anon_file.h for all memfd/temp file usage</li>
</ul>
<p>Haihao Xiang (1):</p>
<ul>
<li>i965: support AYUV/XYUV for external import only</li>
</ul>
<p>Hal Gentz (1):</p>
<ul>
<li>gallium/osmesa: Fix the inability to set no context as current.</li>
</ul>
<p>Jason Ekstrand (2):</p>
<ul>
<li>nir/repair_ssa: Replace the unreachable check with the phi builder</li>
<li>intel/fs: Fix fs_inst::flags_read for ANY/ALL predicates</li>
</ul>
<p>Juan A. Suarez Romero (11):</p>
<ul>
<li>docs: add sha256 checksums for 19.1.7</li>
<li>cherry-ignore: add explicit 19.2 only nominations</li>
<li>cherry-ignore: add explicit 19.3 only nominations</li>
<li>Revert "Revert "intel/fs: Move the scalar-region conversion to the generator.""</li>
<li>cherry-ignore: Revert "gallium: remove PIPE_CAP_TEXTURE_SHADOW_MAP"</li>
<li>bin/get-pick-list.sh: sha1 commits can be smaller than 8 chars</li>
<li>cherry-ignore: nir/opt_large_constants: Handle store writemasks</li>
<li>cherry-ignore: util: added missing headers in anon-file</li>
<li>cherry-ignore: radv: Fix condition for skipping the continue CS.</li>
<li>cherry-ignore: Revert "radv: disable viewport clamping even if FS doesn't write Z"</li>
<li>Update version to 19.1.8</li>
</ul>
<p>Ken Mays (1):</p>
<ul>
<li>haiku: fix Mesa build</li>
</ul>
<p>Kenneth Graunke (4):</p>
<ul>
<li>iris: Initialize ice-&gt;state.prim_mode to an invalid value</li>
<li>intel: Increase Gen11 compute shader scratch IDs to 64.</li>
<li>iris: Disable CCS_E for 32-bit floating point textures.</li>
<li>iris: Fix iris_rebind_buffer() for VBOs with non-zero offsets.</li>
</ul>
<p>Lionel Landwerlin (5):</p>
<ul>
<li>anv: gem-stubs: return a valid fd got anv_gem_userptr()</li>
<li>intel: use proper label for Comet Lake skus</li>
<li>mesa: don't forget to clear _Layer field on texture unit</li>
<li>intel: fix subslice computation from topology data</li>
<li>intel/isl: Set null surface format to R32_UINT</li>
</ul>
<p>Marek Olšák (1):</p>
<ul>
<li>gallium/vl: don't set PIPE_HANDLE_USAGE_EXPLICIT_FLUSH</li>
</ul>
<p>Matt Turner (1):</p>
<ul>
<li>util: Drop preprocessor guards for glibc-2.12</li>
</ul>
<p>Michel Dänzer (1):</p>
<ul>
<li>radeonsi: fix VAAPI segfault due to various bugs</li>
</ul>
<p>Michel Zou (2):</p>
<ul>
<li>scons: add py3 support</li>
<li>scons: For MinGW use -posix flag.</li>
</ul>
<p>Paulo Zanoni (1):</p>
<ul>
<li>intel/fs: fix SHADER_OPCODE_CLUSTER_BROADCAST for SIMD32</li>
</ul>
<p>Prodea Alexandru-Liviu (1):</p>
<ul>
<li>scons/MSYS2-MinGW-W64: Fix build options defaults Signed-off-by: Prodea Alexandru-Liviu &lt;liviuprodea@yahoo.com&gt; Reviewed-by: Jose Fonseca &lt;jfonseca@vmware.com&gt; Cc: &lt;mesa-stable@lists.freedesktop.org&gt;</li>
</ul>
<p>Rhys Perry (2):</p>
<ul>
<li>radv: always emit a position export in gs copy shaders</li>
<li>nir/opt_remove_phis: handle phis with no sources</li>
</ul>
<p>Samuel Iglesias Gonsálvez (1):</p>
<ul>
<li>intel/nir: do not apply the fsin and fcos trig workarounds for consts</li>
</ul>
<p>Stephen Barber (1):</p>
<ul>
<li>nouveau: add idep_nir_headers as dep for libnouveau</li>
</ul>
<p>Tapani Pälli (3):</p>
<ul>
<li>iris: close screen fd on iris_destroy_screen</li>
<li>egl: check for NULL value like eglGetSyncAttribKHR does</li>
<li>util: fix os_create_anonymous_file on android</li>
</ul>
<p>pal1000 (2):</p>
<ul>
<li>scons/windows: Support build with LLVM 9.</li>
<li>scons: Fix MSYS2 Mingw-w64 build.</li>
</ul>
</div>
</body>
</html>

View File

@@ -96,7 +96,7 @@
* - http://cellperformance.beyond3d.com/articles/2006/05/demystifying-the-restrict-keyword.html
*/
#ifndef restrict
# if (__STDC_VERSION__ >= 199901L)
# if (__STDC_VERSION__ >= 199901L) && !defined(__cplusplus)
/* C99 */
# elif defined(__GNUC__)
# define restrict __restrict__

View File

@@ -191,24 +191,24 @@ CHIPSET(0x3EA4, cfl_gt1, "Intel(R) HD Graphics (Whiskey Lake 3x8 GT1)")
CHIPSET(0x3EA0, cfl_gt2, "Intel(R) HD Graphics (Whiskey Lake 3x8 GT2)")
CHIPSET(0x3EA3, cfl_gt2, "Intel(R) HD Graphics (Whiskey Lake 3x8 GT2)")
CHIPSET(0x3EA2, cfl_gt3, "Intel(R) HD Graphics (Whiskey Lake 3x8 GT3)")
CHIPSET(0x9B21, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
CHIPSET(0x9BA0, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
CHIPSET(0x9BA2, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
CHIPSET(0x9BA4, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
CHIPSET(0x9BA5, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
CHIPSET(0x9BA8, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
CHIPSET(0x9BAA, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
CHIPSET(0x9BAB, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
CHIPSET(0x9BAC, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
CHIPSET(0x9B41, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
CHIPSET(0x9BC0, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
CHIPSET(0x9BC2, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
CHIPSET(0x9BC4, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
CHIPSET(0x9BC5, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
CHIPSET(0x9BC8, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
CHIPSET(0x9BCA, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
CHIPSET(0x9BCB, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
CHIPSET(0x9BCC, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
CHIPSET(0x9B21, cfl_gt1, "Intel(R) UHD Graphics (Comet Lake 2x6 GT1)")
CHIPSET(0x9BA0, cfl_gt1, "Intel(R) UHD Graphics (Comet Lake 2x6 GT1)")
CHIPSET(0x9BA2, cfl_gt1, "Intel(R) UHD Graphics (Comet Lake 2x6 GT1)")
CHIPSET(0x9BA4, cfl_gt1, "Intel(R) UHD Graphics (Comet Lake 2x6 GT1)")
CHIPSET(0x9BA5, cfl_gt1, "Intel(R) UHD Graphics (Comet Lake 2x6 GT1)")
CHIPSET(0x9BA8, cfl_gt1, "Intel(R) UHD Graphics (Comet Lake 2x6 GT1)")
CHIPSET(0x9BAA, cfl_gt1, "Intel(R) UHD Graphics (Comet Lake 2x6 GT1)")
CHIPSET(0x9BAB, cfl_gt1, "Intel(R) UHD Graphics (Comet Lake 2x6 GT1)")
CHIPSET(0x9BAC, cfl_gt1, "Intel(R) UHD Graphics (Comet Lake 2x6 GT1)")
CHIPSET(0x9B41, cfl_gt2, "Intel(R) UHD Graphics (Comet Lake 3x8 GT2)")
CHIPSET(0x9BC0, cfl_gt2, "Intel(R) UHD Graphics (Comet Lake 3x8 GT2)")
CHIPSET(0x9BC2, cfl_gt2, "Intel(R) UHD Graphics (Comet Lake 3x8 GT2)")
CHIPSET(0x9BC4, cfl_gt2, "Intel(R) UHD Graphics (Comet Lake 3x8 GT2)")
CHIPSET(0x9BC5, cfl_gt2, "Intel(R) UHD Graphics (Comet Lake 3x8 GT2)")
CHIPSET(0x9BC8, cfl_gt2, "Intel(R) UHD Graphics (Comet Lake 3x8 GT2)")
CHIPSET(0x9BCA, cfl_gt2, "Intel(R) UHD Graphics (Comet Lake 3x8 GT2)")
CHIPSET(0x9BCB, cfl_gt2, "Intel(R) UHD Graphics (Comet Lake 3x8 GT2)")
CHIPSET(0x9BCC, cfl_gt2, "Intel(R) UHD Graphics (Comet Lake 3x8 GT2)")
CHIPSET(0x5A49, cnl_2x8, "Intel(R) HD Graphics (Cannonlake 2x8 GT0.5)")
CHIPSET(0x5A4A, cnl_2x8, "Intel(R) HD Graphics (Cannonlake 2x8 GT0.5)")
CHIPSET(0x5A41, cnl_3x8, "Intel(R) HD Graphics (Cannonlake 3x8 GT1)")

View File

@@ -42,7 +42,7 @@ pre_args = [
'-D__STDC_FORMAT_MACROS',
'-D__STDC_LIMIT_MACROS',
'-DPACKAGE_VERSION="@0@"'.format(meson.project_version()),
'-DPACKAGE_BUGREPORT="https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa"',
'-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/issues"',
]
with_vulkan_icd_dir = get_option('vulkan-icd-dir')
@@ -83,7 +83,7 @@ with_shared_glapi = get_option('shared-glapi')
# shared-glapi is required if at least two OpenGL APIs are being built
if not with_shared_glapi
if ((with_gles1 == 'true' and with_gles2 == 'true') or
if ((with_gles1 == 'true' and with_gles2 == 'true') or
(with_gles1 == 'true' and with_opengl) or
(with_gles2 == 'true' and with_opengl))
error('shared-glapi required for building two or more of OpenGL, OpenGL ES 1.x, OpenGL ES 2.x')
@@ -107,7 +107,7 @@ with_any_opengl = with_opengl or with_gles1 or with_gles2
# Only build shared_glapi if at least one OpenGL API is enabled
with_shared_glapi = get_option('shared-glapi') and with_any_opengl
system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux'].contains(host_machine.system())
system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos'].contains(host_machine.system())
dri_drivers = get_option('dri-drivers')
if dri_drivers.contains('auto')
@@ -373,7 +373,7 @@ pre_args += '-DGLX_USE_TLS'
if with_glx != 'disabled'
if not (with_platform_x11 and with_any_opengl)
error('Cannot build GLX support without X11 platform support and at least one OpenGL API')
elif with_glx == 'gallium-xlib'
elif with_glx == 'gallium-xlib'
if not with_gallium
error('Gallium-xlib based GLX requires at least one gallium driver')
elif not with_gallium_softpipe
@@ -381,7 +381,7 @@ if with_glx != 'disabled'
elif with_dri
error('gallium-xlib conflicts with any dri driver')
endif
elif with_glx == 'xlib'
elif with_glx == 'xlib'
if with_dri
error('xlib conflicts with any dri driver')
endif
@@ -490,10 +490,12 @@ elif not (with_gallium_r600 or with_gallium_nouveau)
endif
endif
dep_xvmc = null_dep
dep_xv = null_dep
with_gallium_xvmc = false
if _xvmc != 'false'
dep_xvmc = dependency('xvmc', version : '>= 1.0.6', required : _xvmc == 'true')
with_gallium_xvmc = dep_xvmc.found()
dep_xv = dependency('xv', required : _xvmc == 'true')
with_gallium_xvmc = dep_xvmc.found() and dep_xv.found()
endif
xvmc_drivers_path = get_option('xvmc-libs-path')
@@ -847,6 +849,8 @@ endif
# TODO: this is very incomplete
if ['linux', 'cygwin', 'gnu', 'gnu/kfreebsd'].contains(host_machine.system())
pre_args += '-D_GNU_SOURCE'
elif host_machine.system() == 'sunos'
pre_args += '-D__EXTENSIONS__'
endif
# Check for generic C arguments
@@ -1055,7 +1059,7 @@ foreach h : ['xlocale.h', 'sys/sysctl.h', 'linux/futex.h', 'endian.h', 'dlfcn.h'
endif
endforeach
foreach f : ['strtof', 'mkostemp', 'posix_memalign', 'timespec_get', 'memfd_create']
foreach f : ['strtof', 'mkostemp', 'posix_memalign', 'timespec_get', 'memfd_create', 'flock']
if cc.has_function(f)
pre_args += '-DHAVE_@0@'.format(f.to_upper())
endif
@@ -1313,8 +1317,13 @@ else
endif
dep_glvnd = null_dep
glvnd_missing_pc_files = false
if with_glvnd
dep_glvnd = dependency('libglvnd', version : '>= 0.2.0')
# GLVND until commit 0dfaea2bcb7cdcc785f9 ("Add pkg-config files for EGL, GL,
# GLES, and GLX.") was missing its pkg-config files, forcing every vendor to
# provide them and the distro maintainers to resolve the conflict.
glvnd_missing_pc_files = dep_glvnd.version().version_compare('< 1.2.0')
pre_args += '-DUSE_LIBGLVND=1'
endif
@@ -1428,6 +1437,9 @@ if with_platform_x11
with_gallium_omx != 'disabled'))
dep_xcb = dependency('xcb')
dep_x11_xcb = dependency('x11-xcb')
if with_dri_platform == 'drm' and not dep_libdrm.found()
error('libdrm required for gallium video statetrackers when using x11')
endif
endif
if with_any_vk or with_egl or (with_glx == 'dri' and with_dri_platform == 'drm')
dep_xcb_dri2 = dependency('xcb-dri2', version : '>= 1.8')
@@ -1448,7 +1460,7 @@ if with_platform_x11
if with_glx == 'dri' or with_glx == 'gallium-xlib'
dep_glproto = dependency('glproto', version : '>= 1.4.14')
endif
if with_glx == 'dri'
if with_glx == 'dri'
if with_dri_platform == 'drm'
dep_dri2proto = dependency('dri2proto', version : '>= 2.8')
dep_xxf86vm = dependency('xxf86vm')

View File

@@ -128,9 +128,9 @@ def generate(env):
if not path:
path = []
if SCons.Util.is_String(path):
path = string.split(path, os.pathsep)
path = str.split(path, os.pathsep)
env['ENV']['PATH'] = string.join([dir] + path, os.pathsep)
env['ENV']['PATH'] = str.join(os.pathsep, [dir] + path)
# Most of mingw is the same as gcc and friends...
gnu_tools = ['gcc', 'g++', 'gnulink', 'ar', 'gas']

View File

@@ -262,8 +262,12 @@ def parse_source_list(env, filename, names=None):
sym_table = parser.parse(src.abspath)
if names:
if isinstance(names, basestring):
names = [names]
if sys.version_info[0] >= 3:
if isinstance(names, str):
names = [names]
else:
if isinstance(names, basestring):
names = [names]
symbols = names
else:

View File

@@ -132,7 +132,7 @@ def check_cc(env, cc, expr, cpp_opt = '-E'):
sys.stdout.write('Checking for %s ... ' % cc)
source = tempfile.NamedTemporaryFile(suffix='.c', delete=False)
source.write('#if !(%s)\n#error\n#endif\n' % expr)
source.write(('#if !(%s)\n#error\n#endif\n' % expr).encode())
source.close()
# sys.stderr.write('%r %s %s\n' % (env['CC'], cpp_opt, source.name));
@@ -237,6 +237,9 @@ def generate(env):
hosthost_platform = host_platform.system().lower()
if hosthost_platform.startswith('cygwin'):
hosthost_platform = 'cygwin'
# Avoid spurious crosscompilation in MSYS2 environment.
if hosthost_platform.startswith('mingw'):
hosthost_platform = 'windows'
host_machine = os.environ.get('PROCESSOR_ARCHITEW6432', os.environ.get('PROCESSOR_ARCHITECTURE', host_platform.machine()))
host_machine = {
'x86': 'x86',

View File

@@ -30,6 +30,7 @@ Tool-specific initialization for LLVM
import os
import os.path
import re
import platform as host_platform
import sys
import distutils.version
@@ -100,8 +101,36 @@ def generate(env):
env.Prepend(CPPPATH = [os.path.join(llvm_dir, 'include')])
env.Prepend(LIBPATH = [os.path.join(llvm_dir, 'lib')])
# LIBS should match the output of `llvm-config --libs engine mcjit bitwriter x86asmprinter irreader`
if llvm_version >= distutils.version.LooseVersion('5.0'):
# LLVM 5.0 and newer requires MinGW w/ pthreads due to use of std::thread and friends.
if llvm_version >= distutils.version.LooseVersion('5.0') and env['crosscompile']:
assert env['gcc']
env.AppendUnique(CXXFLAGS = ['-posix'])
# LIBS should match the output of `llvm-config --libs engine mcjit bitwriter x86asmprinter irreader` for LLVM<=7.0
# and `llvm-config --libs engine irreader` for LLVM>=8.0
# LLVMAggressiveInstCombine library part of engine component can be safely omitted as it's not used.
if llvm_version >= distutils.version.LooseVersion('9.0'):
env.Prepend(LIBS = [
'LLVMX86Disassembler', 'LLVMX86AsmParser',
'LLVMX86CodeGen', 'LLVMSelectionDAG', 'LLVMAsmPrinter',
'LLVMDebugInfoCodeView', 'LLVMCodeGen',
'LLVMScalarOpts', 'LLVMInstCombine',
'LLVMTransformUtils',
'LLVMBitWriter', 'LLVMX86Desc',
'LLVMMCDisassembler', 'LLVMX86Info',
'LLVMX86Utils',
'LLVMMCJIT', 'LLVMExecutionEngine', 'LLVMTarget',
'LLVMAnalysis', 'LLVMProfileData',
'LLVMRuntimeDyld', 'LLVMObject', 'LLVMMCParser',
'LLVMBitReader', 'LLVMMC', 'LLVMCore',
'LLVMSupport',
'LLVMIRReader', 'LLVMAsmParser',
'LLVMDemangle', 'LLVMGlobalISel', 'LLVMDebugInfoMSF',
'LLVMBinaryFormat',
'LLVMRemarks', 'LLVMBitstreamReader', 'LLVMDebugInfoDWARF',
])
elif llvm_version >= distutils.version.LooseVersion('5.0'):
env.Prepend(LIBS = [
'LLVMX86Disassembler', 'LLVMX86AsmParser',
'LLVMX86CodeGen', 'LLVMSelectionDAG', 'LLVMAsmPrinter',
@@ -120,10 +149,6 @@ def generate(env):
'LLVMDemangle', 'LLVMGlobalISel', 'LLVMDebugInfoMSF',
'LLVMBinaryFormat',
])
if env['platform'] == 'windows' and env['crosscompile']:
# LLVM 5.0 requires MinGW w/ pthreads due to use of std::thread and friends.
assert env['gcc']
env['CXX'] = env['CXX'] + '-posix'
elif llvm_version >= distutils.version.LooseVersion('4.0'):
env.Prepend(LIBS = [
'LLVMX86Disassembler', 'LLVMX86AsmParser',
@@ -217,6 +242,12 @@ def generate(env):
'uuid',
])
# Mingw-w64 zlib is required when building with LLVM support in MSYS2 environment
if host_platform.system().lower().startswith('mingw'):
env.Append(LIBS = [
'z',
])
if env['msvc']:
# Some of the LLVM C headers use the inline keyword without
# defining it.

View File

@@ -518,6 +518,14 @@ radv_handle_per_app_options(struct radv_instance *instance,
*/
if (HAVE_LLVM < 0x900)
instance->debug_flags |= RADV_DEBUG_NO_LOAD_STORE_OPT;
} else if (!strcmp(name, "Fledge")) {
/*
* Zero VRAM for "The Surge 2"
*
* This avoid a hang when when rendering any level. Likely
* uninitialized data in an indirect draw.
*/
instance->debug_flags |= RADV_DEBUG_ZERO_VRAM;
}
}

View File

@@ -4066,7 +4066,7 @@ ac_gs_copy_shader_emit(struct radv_shader_context *ctx)
LLVMBasicBlockRef bb;
unsigned offset;
if (!num_components)
if (stream > 0 && !num_components)
continue;
if (stream > 0 && !ctx->shader_info->info.so.num_outputs)

View File

@@ -106,7 +106,7 @@ bitcast_i642d(int64_t i)
return d;
}
static double
static uint64_t
bitcast_d2u64(double d)
{
assert(sizeof(double) == sizeof(uint64_t));
@@ -115,7 +115,7 @@ bitcast_d2u64(double d)
return u;
}
static double
static int64_t
bitcast_d2i64(double d)
{
assert(sizeof(double) == sizeof(int64_t));

View File

@@ -1311,9 +1311,7 @@ glsl_type::get_function_instance(const glsl_type *return_type,
const glsl_type *
glsl_type::get_mul_type(const glsl_type *type_a, const glsl_type *type_b)
{
if (type_a == type_b) {
return type_a;
} else if (type_a->is_matrix() && type_b->is_matrix()) {
if (type_a->is_matrix() && type_b->is_matrix()) {
/* Matrix multiply. The columns of A must match the rows of B. Given
* the other previously tested constraints, this means the vector type
* of a row from A must be the same as the vector type of a column from
@@ -1333,6 +1331,8 @@ glsl_type::get_mul_type(const glsl_type *type_a, const glsl_type *type_b)
return type;
}
} else if (type_a == type_b) {
return type_a;
} else if (type_a->is_matrix()) {
/* A is a matrix and B is a column vector. Columns of A must match
* rows of B. Given the other previously tested constraints, this

View File

@@ -109,12 +109,13 @@ remove_phis_block(nir_block *block, nir_builder *b)
if (!srcs_same)
continue;
/* We must have found at least one definition, since there must be at
* least one forward edge.
*/
assert(def != NULL);
if (!def) {
/* In this case, the phi had no sources. So turn it into an undef. */
if (mov) {
b->cursor = nir_after_phis(block);
def = nir_ssa_undef(b, phi->dest.ssa.num_components,
phi->dest.ssa.bit_size);
} else if (mov) {
/* If the sources were all movs from the same source with the same
* swizzle, then we can't just pick a random move because it may not
* dominate the phi node. Instead, we need to emit our own move after

View File

@@ -103,48 +103,57 @@ repair_ssa_def(nir_ssa_def *def, void *void_state)
nir_foreach_use_safe(src, def) {
nir_block *src_block = get_src_block(src);
if (nir_block_is_unreachable(src_block) ||
!nir_block_dominates(def->parent_instr->block, src_block)) {
nir_ssa_def *block_def =
nir_phi_builder_value_get_block_def(val, src_block);
/* If def was a deref and the use we're looking at is a deref that
* isn't a cast, we need to wrap it in a cast so we don't loose any
* deref information.
*/
if (def->parent_instr->type == nir_instr_type_deref &&
src->parent_instr->type == nir_instr_type_deref &&
nir_instr_as_deref(src->parent_instr)->deref_type != nir_deref_type_cast) {
nir_deref_instr *cast =
nir_deref_instr_create(state->impl->function->shader,
nir_deref_type_cast);
nir_deref_instr *deref = nir_instr_as_deref(def->parent_instr);
cast->mode = deref->mode;
cast->type = deref->type;
cast->parent = nir_src_for_ssa(block_def);
cast->cast.ptr_stride = nir_deref_instr_ptr_as_array_stride(deref);
nir_ssa_dest_init(&cast->instr, &cast->dest,
def->num_components, def->bit_size, NULL);
nir_instr_insert(nir_before_instr(src->parent_instr),
&cast->instr);
block_def = &cast->dest.ssa;
}
nir_instr_rewrite_src(src->parent_instr, src,
nir_src_for_ssa(block_def));
if (src_block == def->parent_instr->block) {
assert(nir_phi_builder_value_get_block_def(val, src_block) == def);
continue;
}
nir_ssa_def *block_def =
nir_phi_builder_value_get_block_def(val, src_block);
if (block_def == def)
continue;
/* If def was a deref and the use we're looking at is a deref that
* isn't a cast, we need to wrap it in a cast so we don't loose any
* deref information.
*/
if (def->parent_instr->type == nir_instr_type_deref &&
src->parent_instr->type == nir_instr_type_deref &&
nir_instr_as_deref(src->parent_instr)->deref_type != nir_deref_type_cast) {
nir_deref_instr *cast =
nir_deref_instr_create(state->impl->function->shader,
nir_deref_type_cast);
nir_deref_instr *deref = nir_instr_as_deref(def->parent_instr);
cast->mode = deref->mode;
cast->type = deref->type;
cast->parent = nir_src_for_ssa(block_def);
cast->cast.ptr_stride = nir_deref_instr_ptr_as_array_stride(deref);
nir_ssa_dest_init(&cast->instr, &cast->dest,
def->num_components, def->bit_size, NULL);
nir_instr_insert(nir_before_instr(src->parent_instr),
&cast->instr);
block_def = &cast->dest.ssa;
}
nir_instr_rewrite_src(src->parent_instr, src, nir_src_for_ssa(block_def));
}
nir_foreach_if_use_safe(src, def) {
nir_block *block_before_if =
nir_cf_node_as_block(nir_cf_node_prev(&src->parent_if->cf_node));
if (nir_block_is_unreachable(block_before_if) ||
!nir_block_dominates(def->parent_instr->block, block_before_if)) {
nir_if_rewrite_condition(src->parent_if, nir_src_for_ssa(
nir_phi_builder_value_get_block_def(val, block_before_if)));
if (block_before_if == def->parent_instr->block) {
assert(nir_phi_builder_value_get_block_def(val, block_before_if) == def);
continue;
}
nir_ssa_def *block_def =
nir_phi_builder_value_get_block_def(val, block_before_if);
if (block_def == def)
continue;
nir_if_rewrite_condition(src->parent_if, nir_src_for_ssa(block_def));
}
return true;

View File

@@ -43,6 +43,7 @@
#include "egl_dri2_fallbacks.h"
#include "loader.h"
#include "util/u_vector.h"
#include "util/anon_file.h"
#include "eglglobals.h"
#include <wayland-egl-backend.h>
@@ -1584,122 +1585,6 @@ dri2_wl_swrast_get_stride_for_format(int format, int w)
return w * (dri2_wl_visuals[visual_idx].bpp / 8);
}
/*
* Taken from weston shared/os-compatibility.c
*/
#ifndef HAVE_MKOSTEMP
static int
set_cloexec_or_close(int fd)
{
long flags;
if (fd == -1)
return -1;
flags = fcntl(fd, F_GETFD);
if (flags == -1)
goto err;
if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) == -1)
goto err;
return fd;
err:
close(fd);
return -1;
}
#endif
/*
* Taken from weston shared/os-compatibility.c
*/
static int
create_tmpfile_cloexec(char *tmpname)
{
int fd;
#ifdef HAVE_MKOSTEMP
fd = mkostemp(tmpname, O_CLOEXEC);
if (fd >= 0)
unlink(tmpname);
#else
fd = mkstemp(tmpname);
if (fd >= 0) {
fd = set_cloexec_or_close(fd);
unlink(tmpname);
}
#endif
return fd;
}
/*
* Taken from weston shared/os-compatibility.c
*
* Create a new, unique, anonymous file of the given size, and
* return the file descriptor for it. The file descriptor is set
* CLOEXEC. The file is immediately suitable for mmap()'ing
* the given size at offset zero.
*
* The file should not have a permanent backing store like a disk,
* but may have if XDG_RUNTIME_DIR is not properly implemented in OS.
*
* The file name is deleted from the file system.
*
* The file is suitable for buffer sharing between processes by
* transmitting the file descriptor over Unix sockets using the
* SCM_RIGHTS methods.
*
* If the C library implements posix_fallocate(), it is used to
* guarantee that disk space is available for the file at the
* given size. If disk space is insufficient, errno is set to ENOSPC.
* If posix_fallocate() is not supported, program may receive
* SIGBUS on accessing mmap()'ed file contents instead.
*/
static int
os_create_anonymous_file(off_t size)
{
static const char templ[] = "/mesa-shared-XXXXXX";
const char *path;
char *name;
int fd;
int ret;
path = getenv("XDG_RUNTIME_DIR");
if (!path) {
errno = ENOENT;
return -1;
}
name = malloc(strlen(path) + sizeof(templ));
if (!name)
return -1;
strcpy(name, path);
strcat(name, templ);
fd = create_tmpfile_cloexec(name);
free(name);
if (fd < 0)
return -1;
ret = ftruncate(fd, size);
if (ret < 0) {
close(fd);
return -1;
}
return fd;
}
static EGLBoolean
dri2_wl_swrast_allocate_buffer(struct dri2_egl_surface *dri2_surf,
int format, int w, int h,
@@ -1716,7 +1601,7 @@ dri2_wl_swrast_allocate_buffer(struct dri2_egl_surface *dri2_surf,
size_map = h * stride;
/* Create a shareable buffer */
fd = os_create_anonymous_file(size_map);
fd = os_create_anonymous_file(size_map, NULL);
if (fd < 0)
return EGL_FALSE;

View File

@@ -753,61 +753,9 @@ dri2_x11_authenticate(_EGLDisplay *disp, uint32_t id)
return dri2_x11_do_authenticate(dri2_dpy, id);
}
static bool
dri2_x11_config_match_attrib(struct dri2_egl_display *dri2_dpy,
const __DRIconfig *config,
unsigned int attrib,
unsigned int value)
{
uint32_t config_val;
if (!dri2_dpy->core->getConfigAttrib(config, attrib, &config_val))
return false;
return config_val == value;
}
/**
* See if the X server can export a pixmap with the given color depth.
*
* Glamor in xorg-server 1.20 can't export pixmaps which have a different
* color depth than the root window as a DRI image. This makes it impossible
* to expose pbuffer-only visuals with, say, 16bpp on a 24bpp X display.
*/
static bool
x11_can_export_pixmap_with_bpp(struct dri2_egl_display *dri2_dpy, int bpp)
{
bool supported = false;
#ifdef HAVE_DRI3
xcb_dri3_buffer_from_pixmap_cookie_t cookie;
xcb_dri3_buffer_from_pixmap_reply_t *reply;
xcb_pixmap_t pixmap = xcb_generate_id(dri2_dpy->conn);
xcb_create_pixmap(dri2_dpy->conn, bpp, pixmap, dri2_dpy->screen->root, 1, 1);
cookie = xcb_dri3_buffer_from_pixmap(dri2_dpy->conn, pixmap);
reply = xcb_dri3_buffer_from_pixmap_reply(dri2_dpy->conn, cookie, NULL);
if (reply) {
int *fds = xcb_dri3_buffer_from_pixmap_reply_fds(dri2_dpy->conn, reply);
for (int i = 0; i < reply->nfd; i++) {
close(fds[i]);
}
supported = true;
free(reply);
}
xcb_free_pixmap(dri2_dpy->conn, pixmap);
#endif
return supported;
}
static EGLBoolean
dri2_x11_add_configs_for_visuals(struct dri2_egl_display *dri2_dpy,
_EGLDisplay *disp, bool supports_preserved,
bool add_pbuffer_configs)
_EGLDisplay *disp, bool supports_preserved)
{
xcb_depth_iterator_t d;
xcb_visualtype_t *visuals;
@@ -883,47 +831,6 @@ dri2_x11_add_configs_for_visuals(struct dri2_egl_display *dri2_dpy,
xcb_depth_next(&d);
}
/* Add a 565-no-depth-no-stencil pbuffer-only config. If X11 is depth 24,
* we wouldn't have 565 available, which the CTS demands.
*/
if (add_pbuffer_configs && x11_can_export_pixmap_with_bpp(dri2_dpy, 16)) {
for (int j = 0; dri2_dpy->driver_configs[j]; j++) {
const __DRIconfig *config = dri2_dpy->driver_configs[j];
const EGLint config_attrs[] = {
EGL_NATIVE_VISUAL_ID, 0,
EGL_NATIVE_VISUAL_TYPE, EGL_NONE,
EGL_NONE
};
EGLint surface_type = EGL_PBUFFER_BIT;
unsigned int rgba_masks[4] = {
0x1f << 11,
0x3f << 5,
0x1f << 0,
0,
};
/* Check that we've found single-sample, no depth, no stencil,
* and single-buffered.
*/
if (!dri2_x11_config_match_attrib(dri2_dpy, config,
__DRI_ATTRIB_DEPTH_SIZE, 0) ||
!dri2_x11_config_match_attrib(dri2_dpy, config,
__DRI_ATTRIB_STENCIL_SIZE, 0) ||
!dri2_x11_config_match_attrib(dri2_dpy, config,
__DRI_ATTRIB_SAMPLES, 0) ||
!dri2_x11_config_match_attrib(dri2_dpy, config,
__DRI_ATTRIB_DOUBLE_BUFFER, 0)) {
continue;
}
if (dri2_add_config(disp, config, config_count + 1, surface_type,
config_attrs, rgba_masks)) {
config_count++;
break;
}
}
}
if (!config_count) {
_eglLog(_EGL_WARNING, "DRI2: failed to create any config");
return EGL_FALSE;
@@ -1388,7 +1295,7 @@ dri2_initialize_x11_swrast(_EGLDriver *drv, _EGLDisplay *disp)
dri2_setup_screen(disp);
if (!dri2_x11_add_configs_for_visuals(dri2_dpy, disp, true, false))
if (!dri2_x11_add_configs_for_visuals(dri2_dpy, disp, true))
goto cleanup;
/* Fill vtbl last to prevent accidentally calling virtual function during
@@ -1486,7 +1393,7 @@ dri2_initialize_x11_dri3(_EGLDriver *drv, _EGLDisplay *disp)
dri2_set_WL_bind_wayland_display(drv, disp);
if (!dri2_x11_add_configs_for_visuals(dri2_dpy, disp, false, true))
if (!dri2_x11_add_configs_for_visuals(dri2_dpy, disp, false))
goto cleanup;
dri2_dpy->loader_dri3_ext.core = dri2_dpy->core;
@@ -1596,7 +1503,7 @@ dri2_initialize_x11_dri2(_EGLDriver *drv, _EGLDisplay *disp)
dri2_set_WL_bind_wayland_display(drv, disp);
if (!dri2_x11_add_configs_for_visuals(dri2_dpy, disp, true, false))
if (!dri2_x11_add_configs_for_visuals(dri2_dpy, disp, true))
goto cleanup;
/* Fill vtbl last to prevent accidentally calling virtual function during

View File

@@ -2064,6 +2064,10 @@ eglGetSyncAttrib(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *valu
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLSync *s = _eglLookupSync(sync, disp);
_EGL_FUNC_START(disp, EGL_OBJECT_SYNC_KHR, s, EGL_FALSE);
if (!value)
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
return _eglGetSyncAttribCommon(disp, s, attribute, value);
}

View File

@@ -175,22 +175,23 @@ libegl = shared_library(
# If using glvnd the pkg-config header should not point to EGL_mesa, it should
# point to EGL. glvnd is only available on unix like platforms so adding -l
# should be safe here
# TODO: in the glvnd case glvnd itself should really be providing this.
if with_glvnd
_egl = '-L${libdir} -lEGL'
else
_egl = libegl
endif
if not with_glvnd or glvnd_missing_pc_files
if glvnd_missing_pc_files
_egl = '-L${libdir} -lEGL'
else
_egl = libegl
endif
pkg.generate(
name : 'egl',
description : 'Mesa EGL Library',
version : meson.project_version(),
libraries : _egl,
libraries_private: gl_priv_libs,
requires_private : gl_priv_reqs,
extra_cflags : gl_pkgconfig_c_flags,
)
pkg.generate(
name : 'egl',
description : 'Mesa EGL Library',
version : meson.project_version(),
libraries : _egl,
libraries_private: gl_priv_libs,
requires_private : gl_priv_reqs,
extra_cflags : gl_pkgconfig_c_flags,
)
endif
if with_tests and prog_nm.found()
if with_glvnd

View File

@@ -36,6 +36,7 @@
#include <unistd.h>
#include <xf86drm.h>
#include "compiler/glsl_types.h"
#include "util/debug.h"
#include "util/disk_cache.h"
#include "util/strtod.h"
@@ -431,6 +432,7 @@ tu_CreateInstance(const VkInstanceCreateInfo *pCreateInfo,
}
_mesa_locale_init();
glsl_type_singleton_init_or_ref();
VG(VALGRIND_CREATE_MEMPOOL(instance, 0, false));
@@ -454,6 +456,7 @@ tu_DestroyInstance(VkInstance _instance,
VG(VALGRIND_DESTROY_MEMPOOL(instance));
glsl_type_singleton_decref();
_mesa_locale_fini();
vk_debug_report_instance_destroy(&instance->debug_report_callbacks);

View File

@@ -221,7 +221,6 @@ dri3_alloc_back_buffer(struct vl_dri3_screen *scrn)
int buffer_fd, fence_fd;
struct pipe_resource templ, *pixmap_buffer_texture;
struct winsys_handle whandle;
unsigned usage;
buffer = CALLOC_STRUCT(vl_dri3_buffer);
if (!buffer)
@@ -271,10 +270,8 @@ dri3_alloc_back_buffer(struct vl_dri3_screen *scrn)
}
memset(&whandle, 0, sizeof(whandle));
whandle.type= WINSYS_HANDLE_TYPE_FD;
usage = PIPE_HANDLE_USAGE_EXPLICIT_FLUSH;
scrn->base.pscreen->resource_get_handle(scrn->base.pscreen, NULL,
pixmap_buffer_texture, &whandle,
usage);
pixmap_buffer_texture, &whandle, 0);
buffer_fd = whandle.handle;
buffer->pitch = whandle.stride;
buffer->width = templ.width0;

View File

@@ -35,4 +35,4 @@ Random list of problems with i915g:
- Fix fragment discard
Other bugs can be found here:
https://bugs.freedesktop.org/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&component=Drivers/Gallium/i915g
https://gitlab.freedesktop.org/mesa/mesa/issues?scope=all&utf8=%E2%9C%93&state=opened&label_name[]=i915g

View File

@@ -1430,6 +1430,21 @@ iris_get_scratch_space(struct iris_context *ice,
if (!*bop) {
unsigned scratch_ids_per_subslice = devinfo->max_cs_threads;
if (devinfo->gen >= 11) {
/* The MEDIA_VFE_STATE docs say:
*
* "Starting with this configuration, the Maximum Number of
* Threads must be set to (#EU * 8) for GPGPU dispatches.
*
* Although there are only 7 threads per EU in the configuration,
* the FFTID is calculated as if there are 8 threads per EU,
* which in turn requires a larger amount of Scratch Space to be
* allocated by the driver."
*/
scratch_ids_per_subslice = 8 * 8;
}
uint32_t max_threads[] = {
[MESA_SHADER_VERTEX] = devinfo->max_vs_threads,
[MESA_SHADER_TESS_CTRL] = devinfo->max_tcs_threads,

View File

@@ -508,6 +508,28 @@ supports_ccs(const struct gen_device_info *devinfo,
return true;
}
static bool
want_ccs_e_for_format(const struct gen_device_info *devinfo,
enum isl_format format)
{
if (!isl_format_supports_ccs_e(devinfo, format))
return false;
const struct isl_format_layout *fmtl = isl_format_get_layout(format);
/* CCS_E seems to significantly hurt performance with 32-bit floating
* point formats. For example, Paraview's "Wavelet Volume" case uses
* both R32_FLOAT and R32G32B32A32_FLOAT, and enabling CCS_E for those
* formats causes a 62% FPS drop.
*
* However, many benchmarks seem to use 16-bit float with no issues.
*/
if (fmtl->channels.r.bits == 32 && fmtl->channels.r.type == ISL_SFLOAT)
return false;
return true;
}
static struct pipe_resource *
iris_resource_create_for_buffer(struct pipe_screen *pscreen,
const struct pipe_resource *templ)
@@ -645,7 +667,7 @@ iris_resource_create_with_modifiers(struct pipe_screen *pscreen,
res->aux.possible_usages |= 1 << ISL_AUX_USAGE_HIZ;
} else if (likely(!(INTEL_DEBUG & DEBUG_NO_RBC)) &&
supports_ccs(devinfo, &res->surf)) {
if (isl_format_supports_ccs_e(devinfo, res->surf.format))
if (want_ccs_e_for_format(devinfo, res->surf.format))
res->aux.possible_usages |= 1 << ISL_AUX_USAGE_CCS_E;
if (isl_format_supports_ccs_d(devinfo, res->surf.format))

View File

@@ -476,6 +476,7 @@ iris_destroy_screen(struct pipe_screen *pscreen)
iris_bo_unreference(screen->workaround_bo);
u_transfer_helper_destroy(pscreen->transfer_helper);
iris_bufmgr_destroy(screen->bufmgr);
close(screen->fd);
ralloc_free(screen);
}

View File

@@ -819,6 +819,8 @@ struct iris_vertex_buffer_state {
/** The resource to source vertex data from. */
struct pipe_resource *resource;
int offset;
};
struct iris_depth_buffer_state {
@@ -2808,6 +2810,8 @@ iris_set_vertex_buffers(struct pipe_context *ctx,
pipe_resource_reference(&state->resource, buffer->buffer.resource);
struct iris_resource *res = (void *) state->resource;
state->offset = (int) buffer->buffer_offset;
if (res) {
ice->state.bound_vertex_buffers |= 1ull << (start_slot + i);
res->bind_history |= PIPE_BIND_VERTEX_BUFFER;
@@ -5681,8 +5685,8 @@ iris_rebind_buffer(struct iris_context *ice,
STATIC_ASSERT(GENX(VERTEX_BUFFER_STATE_BufferStartingAddress_bits) == 64);
uint64_t *addr = (uint64_t *) &state->state[1];
if (*addr == old_address) {
*addr = res->bo->gtt_offset;
if (*addr == old_address + state->offset) {
*addr = res->bo->gtt_offset + state->offset;
ice->state.dirty |= IRIS_DIRTY_VERTEX_BUFFERS;
}
}
@@ -6484,6 +6488,7 @@ genX(init_state)(struct iris_context *ice)
ice->state.sample_mask = 0xffff;
ice->state.num_viewports = 1;
ice->state.prim_mode = PIPE_PRIM_MAX;
ice->state.genx = calloc(1, sizeof(struct iris_genx_state));
/* Make a 1x1x1 null surface for unbound textures */

View File

@@ -211,13 +211,13 @@ files_libnouveau = files(
libnouveau = static_library(
'nouveau',
[files_libnouveau, nir_opcodes_h],
files_libnouveau,
include_directories : [
inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_common,
],
c_args : [c_vis_args],
cpp_args : [cpp_vis_args],
dependencies : [dep_libdrm, dep_libdrm_nouveau],
dependencies : [dep_libdrm, dep_libdrm_nouveau, idep_nir_headers],
)
nouveau_compiler = executable(

View File

@@ -178,6 +178,7 @@ void si_vid_join_surfaces(struct si_context *sctx,
surfaces[i]->u.gfx9.offset[j] += off;
}
surfaces[i]->flags |= RADEON_SURF_IMPORTED;
off += surfaces[i]->surf_size;
}

View File

@@ -1809,6 +1809,7 @@ static bool si_can_invalidate_texture(struct si_screen *sscreen,
const struct pipe_box *box)
{
return !tex->buffer.b.is_shared &&
!(tex->surface.flags & RADEON_SURF_IMPORTED) &&
!(transfer_usage & PIPE_TRANSFER_READ) &&
tex->buffer.b.b.last_level == 0 &&
util_texrange_covers_whole_level(&tex->buffer.b.b, 0,

View File

@@ -96,6 +96,7 @@ struct pipe_video_buffer *si_video_buffer_create(struct pipe_context *pipe,
/* reset the address */
resources[i]->buffer.gpu_address = ctx->ws->buffer_get_virtual_address(
resources[i]->buffer.buf);
resources[i]->buffer.bo_size = resources[i]->buffer.buf->size;
}
vidtemplate.height *= array_size;

View File

@@ -204,7 +204,7 @@ env.Prepend(CPPPATH = [
envavx = env.Clone()
envavx.Append(CPPDEFINES = ['KNOB_ARCH=KNOB_ARCH_AVX'])
if env['platform'] == 'windows':
if env['msvc']:
envavx.Append(CCFLAGS = ['/arch:AVX'])
else:
envavx.Append(CCFLAGS = ['-mavx'])
@@ -220,7 +220,7 @@ env.Alias('swrAVX', swrAVX)
envavx2 = env.Clone()
envavx2.Append(CPPDEFINES = ['KNOB_ARCH=KNOB_ARCH_AVX2'])
if env['platform'] == 'windows':
if env['msvc']:
envavx2.Append(CCFLAGS = ['/arch:AVX2'])
else:
envavx2.Append(CCFLAGS = ['-mavx2', '-mfma', '-mbmi2', '-mf16c'])

View File

@@ -44,7 +44,8 @@ hgl_st_context(struct st_context_iface *stctxi)
// Perform a safe void to hgl_buffer cast
static inline struct hgl_buffer*
//static inline struct hgl_buffer*
struct hgl_buffer*
hgl_st_framebuffer(struct st_framebuffer_iface *stfbi)
{
struct hgl_buffer* buffer;
@@ -62,7 +63,9 @@ hgl_st_framebuffer_flush_front(struct st_context_iface *stctxi,
CALLED();
//struct hgl_context* context = hgl_st_context(stctxi);
//struct hgl_buffer* buffer = hgl_st_context(stfbi);
// struct hgl_buffer* buffer = hgl_st_context(stfbi);
struct hgl_buffer* buffer = hgl_st_framebuffer(stfbi);
//buffer->surface
#if 0
struct stw_st_framebuffer *stwfb = stw_st_framebuffer(stfb);
@@ -281,7 +284,8 @@ hgl_create_st_manager(struct hgl_context* context)
//manager->display = dpy;
manager->screen = context->screen;
manager->get_param = hgl_st_manager_get_param;
manager->st_manager_private = (void *)context;
return manager;
}

View File

@@ -39,6 +39,8 @@ struct hgl_buffer
unsigned mask;
struct pipe_screen* screen;
struct pipe_surface* surface;
enum pipe_texture_target target;
struct pipe_resource* textures[ST_ATTACHMENT_COUNT];
@@ -80,6 +82,8 @@ struct hgl_context
struct hgl_buffer* read;
};
// hgl_buffer from statetracker interface
struct hgl_buffer* hgl_st_framebuffer(struct st_framebuffer_iface *stfbi);
// hgl state_tracker api
struct st_api* hgl_create_st_api(void);

View File

@@ -1802,7 +1802,13 @@ DECL_SPECIAL(LOOP)
DECL_SPECIAL(RET)
{
ureg_RET(tx->ureg);
/* RET as a last instruction could be safely ignored.
* Remove it to prevent crashes/warnings in case underlying
* driver doesn't implement arbitrary returns.
*/
if (*(tx->parse_next) != NINED3DSP_END) {
ureg_RET(tx->ureg);
}
return D3D_OK;
}

View File

@@ -1,4 +1,4 @@
# Copyright © 2017 Intel Corporation
# Copyright © 2017, 2019 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -19,7 +19,9 @@
# SOFTWARE.
inc_st_omx = [inc_common]
dep_st_omx = [dep_omx, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3]
dep_st_omx = [
dep_omx, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3, dep_libdrm,
]
files_omx = files(
'vid_dec_common.c',
@@ -57,7 +59,7 @@ elif with_gallium_omx == 'tizonia'
inc_egl,
inc_egl_dri2,
]
dep_st_omx = [dep_st_omx, dep_omx_other, dep_libdrm]
dep_st_omx = [dep_st_omx, dep_omx_other]
endif
libomx_st = static_library(

View File

@@ -760,6 +760,11 @@ OSMesaMakeCurrent(OSMesaContext osmesa, void *buffer, GLenum type,
struct osmesa_buffer *osbuffer;
enum pipe_format color_format;
if (!osmesa && !buffer) {
stapi->make_current(stapi, NULL, NULL, NULL);
return GL_TRUE;
}
if (!osmesa || !buffer || width < 1 || height < 1) {
return GL_FALSE;
}

View File

@@ -1,4 +1,4 @@
# Copyright © 2017-2018 Intel Corporation
# Copyright © 2017-2019 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -35,5 +35,8 @@ libva_st = static_library(
),
],
include_directories : [inc_common],
dependencies : [dep_va_headers, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3],
dependencies : [
dep_va_headers, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3,
dep_libdrm,
],
)

View File

@@ -1,4 +1,4 @@
# Copyright © 2017 Intel Corproration
# Copyright © 2017, 2019 Intel Corproration
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -35,5 +35,5 @@ libvdpau_st = static_library(
include_directories : [
inc_include, inc_src, inc_util, inc_gallium, inc_gallium_aux,
],
dependencies : [dep_vdpau, dep_xcb, dep_x11_xcb, dep_xcb_dri2],
dependencies : [dep_vdpau, dep_xcb, dep_x11_xcb, dep_xcb_dri2, dep_libdrm],
)

View File

@@ -1,4 +1,4 @@
# Copyright © 2017 Intel Corporation
# Copyright © 2017, 2019 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -23,20 +23,29 @@ libxvmc_st = static_library(
files('attributes.c', 'block.c', 'context.c', 'surface.c', 'subpicture.c'),
c_args : [c_vis_args],
include_directories : [inc_common],
dependencies : [dep_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3],
dependencies : [
dep_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3, dep_xv,
dep_libdrm,
],
)
# These tests will not work without a working xvmc configuration.
# These tests will not work without a working xvmc configuration.
if with_tools.contains('xvmc')
dep_xvmcw = cc.find_library('XvMCW')
# pkg-config was added in 1.0.12, so allow fallback
dep_xvmcw = dependency('xvmc-wrapper', required : false)
if not dep_xvmcw.found()
dep_xvmcw = cc.find_library('XvMCW')
endif
dep_real_xvmc = dependency('xvmc')
foreach x : ['context', 'surface', 'subpicture', 'blocks', 'rendering']
_name = 'xvmc_@0@'.format(x)
executable(
_name,
files('tests/test_@0@.c'.format(x), 'tests/testlib.c'),
dependencies : [
dep_real_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3, dep_xvmcw,
dep_real_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3,
dep_xvmcw, dep_xv,
],
install: true,
)
@@ -46,7 +55,8 @@ if with_tools.contains('xvmc')
'xvmc_bench',
files('tests/xvmc_bench.c', 'tests/testlib.c'),
dependencies : [
dep_real_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3, dep_xvmcw,
dep_real_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3,
dep_xvmcw, dep_xv,
],
install: true,
)

View File

@@ -26,6 +26,7 @@
#include "sw/hgl/hgl_sw_winsys.h"
#include "util/u_atomic.h"
#include "util/u_memory.h"
#include "util/u_framebuffer.h"
#include "target-helpers/inline_sw_helper.h"
#include "target-helpers/inline_debug_helper.h"
@@ -332,36 +333,17 @@ GalliumContext::SwapBuffers(context_id contextID)
ERROR("%s: context not found\n", __func__);
return B_ERROR;
}
// TODO: Where did st_notify_swapbuffers go?
//st_notify_swapbuffers(context->draw->stfbi);
context->st->flush(context->st, ST_FLUSH_FRONT, NULL);
struct st_context *stContext = (struct st_context*)context->st;
unsigned nColorBuffers = stContext->state.framebuffer.nr_cbufs;
for (unsigned i = 0; i < nColorBuffers; i++) {
pipe_surface* surface = stContext->state.framebuffer.cbufs[i];
if (!surface) {
ERROR("%s: Color buffer %d invalid!\n", __func__, i);
continue;
}
TRACE("%s: Flushing color buffer #%d\n", __func__, i);
// We pass our destination bitmap to flush_fronbuffer which passes it
// to the private winsys display call.
fScreen->flush_frontbuffer(fScreen, surface->texture, 0, 0,
context->bitmap, NULL);
struct hgl_buffer* buffer = hgl_st_framebuffer(context->draw->stfbi);
pipe_surface* surface = buffer->surface;
if (!surface) {
ERROR("%s: Invalid drawable surface!\n", __func__);
return B_ERROR;
}
#if 0
// TODO... should we flush the z stencil buffer?
pipe_surface* zSurface = stContext->state.framebuffer.zsbuf;
fScreen->flush_frontbuffer(fScreen, zSurface->texture, 0, 0,
fScreen->flush_frontbuffer(fScreen, surface->texture, 0, 0,
context->bitmap, NULL);
#endif
return B_OK;
}

View File

@@ -86,6 +86,8 @@ XCreateDrawable(struct drisw_drawable * pdp, int shmid, Display * dpy)
if (pdp->ximage) {
XDestroyImage(pdp->ximage);
pdp->ximage = NULL;
if ((pdp->shminfo.shmid > 0) && (shmid != pdp->shminfo.shmid))
XShmDetach(dpy, &pdp->shminfo);
}
if (!xshm_error && shmid >= 0) {

View File

@@ -51,6 +51,7 @@ BGLView::BGLView(BRect rect, const char* name, ulong resizingMode, ulong mode,
fDitherMap(NULL)
{
fRoster = new GLRendererRoster(this, options);
fRenderer = fRoster->GetRenderer();
}
@@ -68,7 +69,7 @@ BGLView::LockGL()
// TODO: acquire the OpenGL API lock it on this glview
fDisplayLock.Lock();
if (fRenderer)
if (fRenderer != NULL && fDisplayLock.CountLocks() == 1)
fRenderer->LockGL();
}
@@ -76,7 +77,7 @@ BGLView::LockGL()
void
BGLView::UnlockGL()
{
if (fRenderer)
if (fRenderer != NULL && fDisplayLock.CountLocks() == 1)
fRenderer->UnlockGL();
fDisplayLock.Unlock();
@@ -189,7 +190,6 @@ BGLView::AttachedToWindow()
for (BView* view = this; view != NULL; view = view->Parent())
view->ConvertToParent(&fBounds);
fRenderer = fRoster->GetRenderer();
if (fRenderer != NULL) {
// Jackburton: The following code was commented because it doesn't look
// good in "direct" mode:

View File

@@ -25,6 +25,7 @@
#define GEN_GEM_H
#include <stdint.h>
#include <unistd.h>
static inline uint64_t
gen_canonical_address(uint64_t v)

View File

@@ -1011,15 +1011,37 @@ fs_inst::size_read(int arg) const
}
namespace {
unsigned
predicate_width(brw_predicate predicate)
{
switch (predicate) {
case BRW_PREDICATE_NONE: return 1;
case BRW_PREDICATE_NORMAL: return 1;
case BRW_PREDICATE_ALIGN1_ANY2H: return 2;
case BRW_PREDICATE_ALIGN1_ALL2H: return 2;
case BRW_PREDICATE_ALIGN1_ANY4H: return 4;
case BRW_PREDICATE_ALIGN1_ALL4H: return 4;
case BRW_PREDICATE_ALIGN1_ANY8H: return 8;
case BRW_PREDICATE_ALIGN1_ALL8H: return 8;
case BRW_PREDICATE_ALIGN1_ANY16H: return 16;
case BRW_PREDICATE_ALIGN1_ALL16H: return 16;
case BRW_PREDICATE_ALIGN1_ANY32H: return 32;
case BRW_PREDICATE_ALIGN1_ALL32H: return 32;
default: unreachable("Unsupported predicate");
}
}
/* Return the subset of flag registers that an instruction could
* potentially read or write based on the execution controls and flag
* subregister number of the instruction.
*/
unsigned
flag_mask(const fs_inst *inst)
flag_mask(const fs_inst *inst, unsigned width)
{
const unsigned start = inst->flag_subreg * 16 + inst->group;
const unsigned end = start + inst->exec_size;
assert(util_is_power_of_two_nonzero(width));
const unsigned start = (inst->flag_subreg * 16 + inst->group) &
~(width - 1);
const unsigned end = start + ALIGN(inst->exec_size, width);
return ((1 << DIV_ROUND_UP(end, 8)) - 1) & ~((1 << (start / 8)) - 1);
}
@@ -1051,9 +1073,9 @@ fs_inst::flags_read(const gen_device_info *devinfo) const
* f0.0 and f1.0 on Gen7+, and f0.0 and f0.1 on older hardware.
*/
const unsigned shift = devinfo->gen >= 7 ? 4 : 2;
return flag_mask(this) << shift | flag_mask(this);
return flag_mask(this, 1) << shift | flag_mask(this, 1);
} else if (predicate) {
return flag_mask(this);
return flag_mask(this, predicate_width(predicate));
} else {
unsigned mask = 0;
for (int i = 0; i < sources; i++) {
@@ -1072,7 +1094,7 @@ fs_inst::flags_written() const
opcode != BRW_OPCODE_WHILE)) ||
opcode == SHADER_OPCODE_FIND_LIVE_CHANNEL ||
opcode == FS_OPCODE_FB_WRITE) {
return flag_mask(this);
return flag_mask(this, 1);
} else {
return flag_mask(dst, size_written);
}
@@ -1192,7 +1214,7 @@ fs_visitor::emit_fragcoord_interpolation(fs_reg wpos)
} else {
bld.emit(FS_OPCODE_LINTERP, wpos,
this->delta_xy[BRW_BARYCENTRIC_PERSPECTIVE_PIXEL],
component(interp_reg(VARYING_SLOT_POS, 2), 0));
interp_reg(VARYING_SLOT_POS, 2));
}
wpos = offset(wpos, bld, 1);

View File

@@ -818,7 +818,7 @@ fs_generator::generate_linterp(fs_inst *inst,
*/
struct brw_reg delta_x = src[0];
struct brw_reg delta_y = offset(src[0], inst->exec_size / 8);
struct brw_reg interp = src[1];
struct brw_reg interp = stride(src[1], 0, 1, 0);
brw_inst *i[2];
/* fs_visitor::lower_linterp() will do the lowering to MAD instructions for
@@ -2147,8 +2147,17 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width)
assert(src[2].type == BRW_REGISTER_TYPE_UD);
const unsigned component = src[1].ud;
const unsigned cluster_size = src[2].ud;
unsigned vstride = cluster_size;
unsigned width = cluster_size;
/* The maximum exec_size is 32, but the maximum width is only 16. */
if (inst->exec_size == width) {
vstride = 0;
width = 1;
}
struct brw_reg strided = stride(suboffset(src[0], component),
cluster_size, cluster_size, 0);
vstride, width, 0);
if (type_sz(src[0].type) > 4 &&
(devinfo->is_cherryview || gen_device_info_is_9lp(devinfo))) {
/* IVB has an issue (which we found empirically) where it reads

View File

@@ -3619,8 +3619,8 @@ fs_visitor::nir_emit_fs_intrinsic(const fs_builder &bld,
for (unsigned int i = 0; i < instr->num_components; i++) {
fs_reg interp =
component(interp_reg(nir_intrinsic_base(instr),
nir_intrinsic_component(instr) + i), 0);
interp_reg(nir_intrinsic_base(instr),
nir_intrinsic_component(instr) + i);
interp.type = BRW_REGISTER_TYPE_F;
dest.type = BRW_REGISTER_TYPE_F;

View File

@@ -194,7 +194,7 @@ fs_visitor::emit_interpolation_setup_gen4()
*/
this->wpos_w = vgrf(glsl_type::float_type);
abld.emit(FS_OPCODE_LINTERP, wpos_w, delta_xy,
component(interp_reg(VARYING_SLOT_POS, 3), 0));
interp_reg(VARYING_SLOT_POS, 3));
/* Compute the pixel 1/W value from wpos.w. */
this->pixel_w = vgrf(glsl_type::float_type);
abld.emit(SHADER_OPCODE_RCP, this->pixel_w, wpos_w);

View File

@@ -37,8 +37,8 @@ import argparse
import sys
TRIG_WORKAROUNDS = [
(('fsin', 'x'), ('fmul', ('fsin', 'x'), 0.99997)),
(('fcos', 'x'), ('fmul', ('fcos', 'x'), 0.99997)),
(('fsin', 'x(is_not_const)'), ('fmul', ('fsin', 'x'), 0.99997)),
(('fcos', 'x(is_not_const)'), ('fmul', ('fcos', 'x'), 0.99997)),
]

View File

@@ -1156,7 +1156,7 @@ gen_device_info_update_from_topology(struct gen_device_info *devinfo,
for (int b = 0; b < devinfo->subslice_slice_stride; b++) {
devinfo->num_subslices[s] +=
__builtin_popcount(devinfo->subslice_masks[b]);
__builtin_popcount(devinfo->subslice_masks[s * devinfo->subslice_slice_stride + b]);
}
n_subslices += devinfo->num_subslices[s];
}

View File

@@ -780,7 +780,12 @@ isl_genX(null_fill_state)(void *state, struct isl_extent3d size)
{
struct GENX(RENDER_SURFACE_STATE) s = {
.SurfaceType = SURFTYPE_NULL,
.SurfaceFormat = ISL_FORMAT_B8G8R8A8_UNORM,
/* We previously had this format set to B8G8R8A8_UNORM but ran into
* hangs on IVB. R32_UINT seems to work for everybody.
*
* https://gitlab.freedesktop.org/mesa/mesa/issues/1872
*/
.SurfaceFormat = ISL_FORMAT_R32_UINT,
#if GEN_GEN >= 7
.SurfaceArray = size.depth > 0,
#endif

View File

@@ -27,16 +27,7 @@
#include <sys/mman.h>
#include "aub_mem.h"
#ifndef HAVE_MEMFD_CREATE
#include <sys/syscall.h>
static inline int
memfd_create(const char *name, unsigned int flags)
{
return syscall(SYS_memfd_create, name, flags);
}
#endif
#include "util/anon_file.h"
struct bo_map {
struct list_head link;
@@ -373,7 +364,7 @@ aub_mem_init(struct aub_mem *mem)
list_inithead(&mem->maps);
mem->mem_fd = memfd_create("phys memory", 0);
mem->mem_fd = os_create_anonymous_file(0, "phys memory");
return mem->mem_fd != -1;
}

View File

@@ -25,13 +25,13 @@
#include <unistd.h>
#include <limits.h>
#include <assert.h>
#include <linux/memfd.h>
#include <sys/mman.h>
#include "anv_private.h"
#include "util/hash_table.h"
#include "util/simple_mtx.h"
#include "util/anon_file.h"
#ifdef HAVE_VALGRIND
#define VG_NOACCESS_READ(__ptr) ({ \
@@ -111,14 +111,6 @@ struct anv_mmap_cleanup {
#define ANV_MMAP_CLEANUP_INIT ((struct anv_mmap_cleanup){0})
#ifndef HAVE_MEMFD_CREATE
static inline int
memfd_create(const char *name, unsigned int flags)
{
return syscall(SYS_memfd_create, name, flags);
}
#endif
static inline uint32_t
ilog2_round_up(uint32_t value)
{
@@ -152,15 +144,12 @@ anv_state_table_init(struct anv_state_table *table,
table->device = device;
table->fd = memfd_create("state table", MFD_CLOEXEC);
if (table->fd == -1)
return vk_error(VK_ERROR_INITIALIZATION_FAILED);
/* Just make it 2GB up-front. The Linux kernel won't actually back it
* with pages until we either map and fault on one of them or we use
* userptr and send a chunk of it off to the GPU.
*/
if (ftruncate(table->fd, BLOCK_POOL_MEMFD_SIZE) == -1) {
table->fd = os_create_anonymous_file(BLOCK_POOL_MEMFD_SIZE, "state table");
if (table->fd == -1) {
result = vk_error(VK_ERROR_INITIALIZATION_FAILED);
goto fail_fd;
}
@@ -446,18 +435,13 @@ anv_block_pool_init(struct anv_block_pool *pool,
anv_bo_init(pool->bo, 0, 0);
if (!(pool->bo_flags & EXEC_OBJECT_PINNED)) {
pool->fd = memfd_create("block pool", MFD_CLOEXEC);
if (pool->fd == -1)
return vk_error(VK_ERROR_INITIALIZATION_FAILED);
/* Just make it 2GB up-front. The Linux kernel won't actually back it
* with pages until we either map and fault on one of them or we use
* userptr and send a chunk of it off to the GPU.
*/
if (ftruncate(pool->fd, BLOCK_POOL_MEMFD_SIZE) == -1) {
result = vk_error(VK_ERROR_INITIALIZATION_FAILED);
goto fail_fd;
}
pool->fd = os_create_anonymous_file(BLOCK_POOL_MEMFD_SIZE, "block pool");
if (pool->fd == -1)
return vk_error(VK_ERROR_INITIALIZATION_FAILED);
} else {
pool->fd = -1;
}
@@ -1532,7 +1516,19 @@ anv_scratch_pool_alloc(struct anv_device *device, struct anv_scratch_pool *pool,
const unsigned subslices = MAX2(physical_device->subslice_total, 1);
unsigned scratch_ids_per_subslice;
if (devinfo->is_haswell) {
if (devinfo->gen >= 11) {
/* The MEDIA_VFE_STATE docs say:
*
* "Starting with this configuration, the Maximum Number of
* Threads must be set to (#EU * 8) for GPGPU dispatches.
*
* Although there are only 7 threads per EU in the configuration,
* the FFTID is calculated as if there are 8 threads per EU,
* which in turn requires a larger amount of Scratch Space to be
* allocated by the driver."
*/
scratch_ids_per_subslice = 8 * 8;
} else if (devinfo->is_haswell) {
/* WaCSScratchSize:hsw
*
* Haswell's scratch space address calculation appears to be sparse

View File

@@ -283,7 +283,7 @@ void anv_GetDescriptorSetLayoutSupport(
/* Our maximum binding table size is 240 and we need to reserve 8 for
* render targets.
*/
if (surface_count[s] >= MAX_BINDING_TABLE_SIZE - MAX_RTS)
if (surface_count[s] > MAX_BINDING_TABLE_SIZE - MAX_RTS)
supported = false;
}

View File

@@ -1210,10 +1210,12 @@ void anv_GetPhysicalDeviceProperties(
const uint32_t max_images =
pdevice->has_bindless_images ? UINT16_MAX : MAX_IMAGES;
/* The moment we have anything bindless, claim a high per-stage limit */
/* If we can use bindless for everything, claim a high per-stage limit,
* otherwise use the binding table size, minus the slots reserved for
* render targets and one slot for the descriptor buffer. */
const uint32_t max_per_stage =
pdevice->has_a64_buffer_access ? UINT32_MAX :
MAX_BINDING_TABLE_SIZE - MAX_RTS;
pdevice->has_bindless_images && pdevice->has_a64_buffer_access
? UINT32_MAX : MAX_BINDING_TABLE_SIZE - MAX_RTS - 1;
const uint32_t max_workgroup_size = 32 * devinfo->max_cs_threads;

View File

@@ -21,32 +21,21 @@
* IN THE SOFTWARE.
*/
#include <linux/memfd.h>
#include <sys/mman.h>
#include <sys/syscall.h>
#include "util/anon_file.h"
#include "anv_private.h"
#ifndef HAVE_MEMFD_CREATE
static inline int
memfd_create(const char *name, unsigned int flags)
{
return syscall(SYS_memfd_create, name, flags);
}
#endif
uint32_t
anv_gem_create(struct anv_device *device, uint64_t size)
{
int fd = memfd_create("fake bo", MFD_CLOEXEC);
int fd = os_create_anonymous_file(size, "fake bo");
if (fd == -1)
return 0;
assert(fd != 0);
if (ftruncate(fd, size) == -1)
return 0;
return fd;
}
@@ -79,7 +68,13 @@ anv_gem_munmap(void *p, uint64_t size)
uint32_t
anv_gem_userptr(struct anv_device *device, void *mem, size_t size)
{
return -1;
int fd = os_create_anonymous_file(size, "fake bo");
if (fd == -1)
return 0;
assert(fd != 0);
return fd;
}
int

View File

@@ -435,7 +435,19 @@ brw_alloc_stage_scratch(struct brw_context *brw,
subslices = 4 * brw->screen->devinfo.num_slices;
unsigned scratch_ids_per_subslice;
if (devinfo->is_haswell) {
if (devinfo->gen >= 11) {
/* The MEDIA_VFE_STATE docs say:
*
* "Starting with this configuration, the Maximum Number of
* Threads must be set to (#EU * 8) for GPGPU dispatches.
*
* Although there are only 7 threads per EU in the configuration,
* the FFTID is calculated as if there are 8 threads per EU,
* which in turn requires a larger amount of Scratch Space to be
* allocated by the driver."
*/
scratch_ids_per_subslice = 8 * 8;
} else if (devinfo->is_haswell) {
/* WaCSScratchSize:hsw
*
* Haswell's scratch space address calculation appears to be sparse

View File

@@ -1383,6 +1383,8 @@ intel_query_dma_buf_modifiers(__DRIscreen *_screen, int fourcc, int max,
for (i = 0; i < num_mods && i < max; i++) {
if (f->components == __DRI_IMAGE_COMPONENTS_Y_U_V ||
f->components == __DRI_IMAGE_COMPONENTS_Y_UV ||
f->components == __DRI_IMAGE_COMPONENTS_AYUV ||
f->components == __DRI_IMAGE_COMPONENTS_XYUV ||
f->components == __DRI_IMAGE_COMPONENTS_Y_XUXV ||
f->components == __DRI_IMAGE_COMPONENTS_Y_UXVX) {
external_only[i] = GL_TRUE;

View File

@@ -588,11 +588,11 @@ set_image_binding(struct gl_image_unit *u, struct gl_texture_object *texObj,
if (texObj && _mesa_tex_target_is_layered(texObj->Target)) {
u->Layered = layered;
u->Layer = layer;
u->_Layer = (u->Layered ? 0 : u->Layer);
} else {
u->Layered = GL_FALSE;
u->Layer = 0;
}
u->_Layer = (u->Layered ? 0 : u->Layer);
_mesa_reference_texobj(&u->TexObj, texObj);
}

View File

@@ -97,12 +97,12 @@ endif
# This must be after at least mesa, glx, and gallium, since libgl will be
# defined in one of those subdirs depending on the glx provider.
if with_glx != 'disabled'
if with_glx != 'disabled' and (not with_glvnd or glvnd_missing_pc_files)
# If using glvnd the pkg-config header should not point to GL_mesa, it should
# point to GL. glvnd is only available on unix like platforms so adding -l
# should be safe here
# TODO: in the glvnd case glvnd itself should really be providing this.
if with_glvnd
if glvnd_missing_pc_files
_gl = '-L${libdir} -lGL'
else
_gl = libgl

View File

@@ -1,4 +1,6 @@
MESA_UTIL_FILES := \
anon_file.h \
anon_file.c \
bigmath.h \
bitscan.c \
bitscan.h \

159
src/util/anon_file.c Normal file
View File

@@ -0,0 +1,159 @@
/*
* Copyright © 2012 Collabora, Ltd.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial
* portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/*
* Based on weston shared/os-compatibility.c
*/
#ifndef WIN32
#include "anon_file.h"
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#ifdef __FreeBSD__
#include <sys/mman.h>
#elif defined(HAVE_MEMFD_CREATE) || defined(ANDROID)
#include <sys/syscall.h>
#include <linux/memfd.h>
#include <stdlib.h>
#else
#include <stdio.h>
#include <stdlib.h>
#endif
#if !(defined(__FreeBSD__) || defined(HAVE_MEMFD_CREATE) || defined(HAVE_MKOSTEMP) || defined(ANDROID))
static int
set_cloexec_or_close(int fd)
{
long flags;
if (fd == -1)
return -1;
flags = fcntl(fd, F_GETFD);
if (flags == -1)
goto err;
if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) == -1)
goto err;
return fd;
err:
close(fd);
return -1;
}
#endif
#if !(defined(__FreeBSD__) || defined(HAVE_MEMFD_CREATE) || defined(ANDROID))
static int
create_tmpfile_cloexec(char *tmpname)
{
int fd;
#ifdef HAVE_MKOSTEMP
fd = mkostemp(tmpname, O_CLOEXEC);
#else
fd = mkstemp(tmpname);
#endif
if (fd < 0) {
return fd;
}
#ifndef HAVE_MKOSTEMP
fd = set_cloexec_or_close(fd);
#endif
unlink(tmpname);
return fd;
}
#endif
/*
* Create a new, unique, anonymous file of the given size, and
* return the file descriptor for it. The file descriptor is set
* CLOEXEC. The file is immediately suitable for mmap()'ing
* the given size at offset zero.
*
* An optional name for debugging can be provided as the second argument.
*
* The file should not have a permanent backing store like a disk,
* but may have if XDG_RUNTIME_DIR is not properly implemented in OS.
*
* If memfd or SHM_ANON is supported, the filesystem is not touched at all.
* Otherwise, the file name is deleted from the file system.
*
* The file is suitable for buffer sharing between processes by
* transmitting the file descriptor over Unix sockets using the
* SCM_RIGHTS methods.
*/
int
os_create_anonymous_file(off_t size, const char *debug_name)
{
int fd, ret;
#ifdef __FreeBSD__
(void*)debug_name;
fd = shm_open(SHM_ANON, O_CREAT | O_RDWR | O_CLOEXEC, 0600);
#elif defined(HAVE_MEMFD_CREATE) || defined(ANDROID)
if (!debug_name)
debug_name = "mesa-shared";
fd = syscall(SYS_memfd_create, debug_name, MFD_CLOEXEC);
#else
const char *path;
char *name;
path = getenv("XDG_RUNTIME_DIR");
if (!path) {
errno = ENOENT;
return -1;
}
if (debug_name)
asprintf(&name, "%s/mesa-shared-%s-XXXXXX", path, debug_name);
else
asprintf(&name, "%s/mesa-shared-XXXXXX", path);
if (!name)
return -1;
fd = create_tmpfile_cloexec(name);
free(name);
#endif
if (fd < 0)
return -1;
ret = ftruncate(fd, size);
if (ret < 0) {
close(fd);
return -1;
}
return fd;
}
#endif

34
src/util/anon_file.h Normal file
View File

@@ -0,0 +1,34 @@
/*
* Copyright © 2012 Collabora, Ltd.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial
* portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef _ANON_FILE_H_
#define _ANON_FILE_H_
#include <sys/types.h>
#include "util/macros.h"
int os_create_anonymous_file(off_t size, const char *debug_name);
#endif

View File

@@ -902,7 +902,17 @@ cache_put(void *job, int thread_index)
* open with the flock held. So just let that file be responsible
* for writing the file.
*/
#ifdef HAVE_FLOCK
err = flock(fd, LOCK_EX | LOCK_NB);
#else
struct flock lock = {
.l_start = 0,
.l_len = 0, /* entire file */
.l_type = F_WRLCK,
.l_whence = SEEK_SET
};
err = fcntl(fd, F_SETLK, &lock);
#endif
if (err == -1)
goto done;

View File

@@ -23,6 +23,8 @@ inc_util = include_directories('.')
subdir('xmlpool')
files_mesa_util = files(
'anon_file.h',
'anon_file.c',
'bigmath.h',
'bitscan.c',
'bitscan.h',

View File

@@ -189,7 +189,7 @@
sizeof(*v) == sizeof(uint64_t) ? atomic_inc_64_nv((uint64_t *)(v)) : \
(assert(!"should not get here"), 0))
#define p_atomic_dec(v) ((void) \
#define p_atomic_dec(v) (void) ( \
sizeof(*v) == sizeof(uint8_t) ? atomic_dec_8 ((uint8_t *)(v)) : \
sizeof(*v) == sizeof(uint16_t) ? atomic_dec_16((uint16_t *)(v)) : \
sizeof(*v) == sizeof(uint32_t) ? atomic_dec_32((uint32_t *)(v)) : \
@@ -203,7 +203,7 @@
sizeof(*v) == sizeof(uint64_t) ? atomic_dec_64_nv((uint64_t *)(v)) : \
(assert(!"should not get here"), 0))
#define p_atomic_add(v, i) ((void) \
#define p_atomic_add(v, i) (void) ( \
sizeof(*v) == sizeof(uint8_t) ? atomic_add_8 ((uint8_t *)(v), (i)) : \
sizeof(*v) == sizeof(uint16_t) ? atomic_add_16((uint16_t *)(v), (i)) : \
sizeof(*v) == sizeof(uint32_t) ? atomic_add_32((uint32_t *)(v), (i)) : \

View File

@@ -61,11 +61,7 @@ static inline thrd_t u_thread_create(int (*routine)(void *), void *param)
static inline void u_thread_setname( const char *name )
{
#if defined(HAVE_PTHREAD)
# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
(__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12)) && \
defined(__linux__)
pthread_setname_np(pthread_self(), name);
# endif
#endif
(void)name;
}
@@ -150,10 +146,7 @@ u_thread_get_time_nano(thrd_t thread)
static inline bool u_thread_is_self(thrd_t thread)
{
#if defined(HAVE_PTHREAD)
# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \
(__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
return pthread_equal(pthread_self(), thread);
# endif
#endif
return false;
}