Compare commits
68 Commits
mesa-19.1.
...
mesa-19.1.
Author | SHA1 | Date | |
---|---|---|---|
|
5c6d266c59 | ||
|
6cffdfd192 | ||
|
dfcde49122 | ||
|
9c100e31a2 | ||
|
2fd001f21e | ||
|
13120904e4 | ||
|
740b0e9dc7 | ||
|
9eaa6998cc | ||
|
e56b3afd2d | ||
|
d169d0df0e | ||
|
3d763e801c | ||
|
9b75c1eaef | ||
|
7e3d942403 | ||
|
142e51da08 | ||
|
844c594837 | ||
|
9fc609585d | ||
|
ab1ae12790 | ||
|
9bc34d54db | ||
|
f7338bfe1f | ||
|
2d584d7386 | ||
|
2739dd9621 | ||
|
e53ca66c4a | ||
|
7c0ce1b35e | ||
|
09ba783aea | ||
|
70ef5d63f7 | ||
|
f041840367 | ||
|
4a50b8add1 | ||
|
b30a0afc0c | ||
|
8118131f37 | ||
|
950d167026 | ||
|
e37019723f | ||
|
450b808eea | ||
|
3b927c447f | ||
|
52dc974cd1 | ||
|
26ab4e1614 | ||
|
e5e81d6530 | ||
|
b13396622c | ||
|
bb22ac12d6 | ||
|
2963e9fa3d | ||
|
a74657d4aa | ||
|
3a0b77e3f7 | ||
|
ef35babd33 | ||
|
954ace9e3e | ||
|
4f48aaf50a | ||
|
d34ae3876a | ||
|
895f0a2ca2 | ||
|
9ee9251ef8 | ||
|
b977c7444c | ||
|
c94e5e3ee1 | ||
|
c140c260c1 | ||
|
34ee0eb6cc | ||
|
db6974fa2a | ||
|
9e754647ba | ||
|
0b8c7cf51c | ||
|
7e6dd1ce7a | ||
|
1ee0add2a5 | ||
|
3b0e591228 | ||
|
5936c8f4f4 | ||
|
8748747007 | ||
|
ac31da3529 | ||
|
97af29d6da | ||
|
81a4483465 | ||
|
00651091fa | ||
|
d11d2c6def | ||
|
44c38ecd27 | ||
|
3859e211db | ||
|
4d45999a24 | ||
|
b9d7244035 |
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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"
|
||||
|
@@ -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
|
||||
|
12
common.py
12
common.py
@@ -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'
|
||||
|
@@ -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>
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -279,7 +279,7 @@ To setup the branchpoint:
|
||||
|
||||
<p>
|
||||
Now go to
|
||||
<a href="https://bugs.freedesktop.org/editversions.cgi?action=add&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>
|
||||
|
@@ -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
267
docs/relnotes/19.1.8.html
Normal 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 >= 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->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 <liviuprodea@yahoo.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Cc: <mesa-stable@lists.freedesktop.org></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>
|
@@ -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__
|
||||
|
@@ -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)")
|
||||
|
28
meson.build
28
meson.build
@@ -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')
|
||||
|
@@ -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']
|
||||
|
@@ -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:
|
||||
|
@@ -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',
|
||||
|
@@ -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.
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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)
|
||||
|
@@ -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));
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
@@ -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,
|
||||
|
@@ -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))
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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 */
|
||||
|
@@ -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(
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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,
|
||||
|
@@ -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;
|
||||
|
@@ -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'])
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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(
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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,
|
||||
],
|
||||
)
|
||||
|
@@ -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],
|
||||
)
|
||||
|
@@ -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,
|
||||
)
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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) {
|
||||
|
@@ -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:
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#define GEN_GEM_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static inline uint64_t
|
||||
gen_canonical_address(uint64_t v)
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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)),
|
||||
]
|
||||
|
||||
|
||||
|
@@ -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];
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -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
159
src/util/anon_file.c
Normal 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
34
src/util/anon_file.h
Normal 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
|
@@ -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;
|
||||
|
||||
|
@@ -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',
|
||||
|
@@ -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)) : \
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user