Skip to content
Commits on Source (89)
......@@ -22,3 +22,8 @@ bcd9224728dcb8d8fe4bcddc4bd9b2c36fcfe9dd
# This is immediately reverted, so just don't apply
19546108d3dd5541a189e36df4ea83b3f519e48f
# The authors requested these not be applied to 19.2
869e32593a9096b845dd6106f8f86e1c41fac968
a2c3c65a31de90fdb55f76f2894860dfbafe2043
bb0c5c487e63e88acbb792f092dd8f392bad8540
......@@ -25,6 +25,7 @@ import asyncio
import datetime
import os
import pathlib
import sys
import textwrap
import typing
import urllib.parse
......@@ -38,6 +39,9 @@ CURRENT_GL_VERSION = '4.5'
CURRENT_VK_VERSION = '1.1'
TEMPLATE = Template(textwrap.dedent("""\
<%!
import html
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
......@@ -57,7 +61,7 @@ TEMPLATE = Template(textwrap.dedent("""\
<h1>Mesa ${next_version} Release Notes / ${today}</h1>
<p>
%if bugfix:
%if not bugfix:
Mesa ${next_version} is a new development release. People who are concerned
with stability and reliability should stick with a previous release or
wait for Mesa ${version[:-1]}1.
......@@ -89,7 +93,7 @@ TEMPLATE = Template(textwrap.dedent("""\
<ul>
%for f in features:
<li>${f}</li>
<li>${html.escape(f)}</li>
%endfor
</ul>
......@@ -97,7 +101,7 @@ TEMPLATE = Template(textwrap.dedent("""\
<ul>
%for b in bugs:
<li>${b}</li>
<li>${html.escape(b)}</li>
%endfor
</ul>
......@@ -106,9 +110,9 @@ TEMPLATE = Template(textwrap.dedent("""\
<ul>
%for c, author in changes:
%if author:
<p>${c}</p>
<p>${html.escape(c)}</p>
%else:
<li>${c}</li>
<li>${html.escape(c)}</li>
%endif
%endfor
</ul>
......@@ -149,7 +153,7 @@ async def gather_bugs(version: str) -> typing.List[str]:
# This means we have a bug in the form "Closes: https://..."
issues.append(os.path.basename(urllib.parse.urlparse(bug).path))
else:
issues.append(bug)
issues.append(bug.lstrip('#'))
loop = asyncio.get_event_loop()
async with aiohttp.ClientSession(loop=loop) as session:
......@@ -218,12 +222,16 @@ def calculate_previous_version(version: str, is_point: bool) -> str:
return '.'.join(base)
def get_features() -> typing.Generator[str, None, None]:
def get_features(is_point_release: bool) -> typing.Generator[str, None, None]:
p = pathlib.Path(__file__).parent.parent / 'docs' / 'relnotes' / 'new_features.txt'
if p.exists():
if is_point_release:
print("WARNING: new features being introduced in a point release", file=sys.stderr)
with p.open('rt') as f:
for line in f:
yield line
else:
yield "None"
async def main() -> None:
......@@ -248,7 +256,7 @@ async def main() -> None:
bugfix=is_point_release,
bugs=bugs,
changes=walk_shortlog(shortlog),
features=get_features(),
features=get_features(is_point_release),
gl_version=CURRENT_GL_VERSION,
next_version=next_version,
today=datetime.date.today(),
......
......@@ -21,6 +21,7 @@
"""Update the main page, release notes, and calendar."""
import argparse
import calendar
import datetime
import pathlib
......@@ -51,18 +52,8 @@ def calculate_previous_version(version: str, is_point: bool) -> str:
return '.'.join(base)
def get_version() -> str:
v = pathlib.Path(__file__).parent.parent / 'VERSION'
with v.open('rt') as f:
raw_version = f.read().strip()
return raw_version.split('-')[0]
def is_point_release() -> bool:
v = pathlib.Path(__file__).parent.parent / 'VERSION'
with v.open('rt') as f:
raw_version = f.read().strip()
return '-rc' not in raw_version
def is_point_release(version: str) -> bool:
return not version.endswith('.0')
def update_index(is_point: bool, version: str, previous_version: str) -> None:
......@@ -78,7 +69,8 @@ def update_index(is_point: bool, version: str, previous_version: str) -> None:
header.text = f"{month} {date.day}, {date.year}"
body = etree.Element('p')
a = etree.SubElement(body, 'a', attrib={'href': f'relnotes/{previous_version}'})
a = etree.SubElement(
body, 'a', attrib={'href': f'relnotes/{previous_version}.html'})
a.text = f"Mesa {previous_version}"
if is_point:
a.tail = " is released. This is a bug fix release."
......@@ -100,7 +92,7 @@ def update_release_notes(previous_version: str) -> None:
tree = html.parse(f)
li = etree.Element('li')
a = etree.SubElement(li, 'a', href=f'relnotes/{previous_version}')
a = etree.SubElement(li, 'a', href=f'relnotes/{previous_version}.html')
a.text = f'{previous_version} release notes'
ul = tree.xpath('.//ul')[0]
......@@ -110,11 +102,14 @@ def update_release_notes(previous_version: str) -> None:
def main() -> None:
is_point = is_point_release()
version = get_version()
previous_version = calculate_previous_version(version, is_point)
parser = argparse.ArgumentParser()
parser.add_argument('version', help="The released version.")
args = parser.parse_args()
is_point = is_point_release(args.version)
previous_version = calculate_previous_version(args.version, is_point)
update_index(is_point, version, previous_version)
update_index(is_point, args.version, previous_version)
update_release_notes(previous_version)
......
......@@ -35,7 +35,7 @@ depends on the particular driver being used.
<h2>SHA256 checksum</h2>
<pre>
TBD.
4cc53ca1a8d12c6ff0e5ea44a5213c05c88447ab50d7e28bb350cd29199f01e9 mesa-19.2.1.tar.xz
</pre>
......
<!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.2.2 Release Notes / 2019-10-23</h1>
<p>
Mesa 19.2.2 is a bug fix release which fixes bugs found since the 19.2.1 release.
</p>
<p>
Mesa 19.2.2 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.2.2 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 checksum</h2>
<pre>
TBD.
</pre>
<h2>New features</h2>
<ul>
<li>None</li>
</ul>
<h2>Bug fixes</h2>
<ul>
<li>Vulkan version of &quot;Middle-earth: Shadow of Mordor&quot; has graphics glitches on RADV driver (part 2)</li>
<li>Vulkan version of &quot;Middle-earth: Shadow of Mordor&quot; has graphics glitches on RADV driver</li>
<li>[amdgpu][Navi][llvm] Minimap problem in Nier Automata</li>
<li>Black ground in Dirt 4</li>
<li>Superbibles examples crashing Mesa drivers (radeonsi) and causing gpu reset</li>
<li>[CTS] dEQP-VK.graphicsfuzz.write-red-in-loop-nest crashes</li>
<li>mesa and libglvnd install the same headers</li>
<li>Regression: Doom (2016) crashes on Mesa 19.2 and above and Radeon 380 with Vulkan (worked on Mesa 19.1)</li>
<li>Rocket League displays corruption when the game starts</li>
</ul>
<h2>Changes</h2>
<ul>
<p>Alan Coopersmith (6):</p>
<li> c99_compat.h: Don&#x27;t try to use &#x27;restrict&#x27; 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> util: Solaris has linux-style pthread_setname_np</li>
<li> meson: recognize &quot;sunos&quot; as the system name for Solaris</li>
<li> intel/common: include unistd.h for ioctl() prototype on Solaris</li>
<p></p>
<p>Alejandro Piñeiro (1):</p>
<li> v3d: take into account prim_counts_offset</li>
<p></p>
<p>Bas Nieuwenhuizen (3):</p>
<li> radv: Disallow sparse shared images.</li>
<li> nir/dead_cf: Remove dead control flow after infinite loops.</li>
<li> radv: Fix single stage constant flush with merged shaders.</li>
<p></p>
<p>Clément Guérin (1):</p>
<li> radeonsi: enable zerovram for Rocket League</li>
<p></p>
<p>Connor Abbott (2):</p>
<li> nir/sink: Rewrite loop handling logic</li>
<li> nir/sink: Don&#x27;t sink load_ubo to outside of its defining loop</li>
<p></p>
<p>Dylan Baker (1):</p>
<li> docs: Add SHA256 sum for 19.2.1</li>
<p></p>
<p>Eric Engestrom (7):</p>
<li> GL: drop symbols mangling support</li>
<li> meson: rename `glvnd_missing_pc_files` to `not glvnd_has_headers_and_pc_files`</li>
<li> meson: move a couple of include installs around</li>
<li> meson: split headers one per line</li>
<li> meson: split Mesa headers as a separate installation</li>
<li> meson: skip installation of GLVND-provided headers</li>
<li> util/u_atomic: fix return type of p_atomic_{inc,dec}_return() and p_atomic_{cmp,}xchg()</li>
<p></p>
<p>Ian Romanick (2):</p>
<li> nir/search: Fix possible NULL dereference in is_fsign</li>
<li> intel/vec4: Don&#x27;t try both sources as immediates for DPH</li>
<p></p>
<p>James Xiong (1):</p>
<li> iris: finish aux import on get_param</li>
<p></p>
<p>Kenneth Graunke (2):</p>
<li> iris: Properly unreference extra VBOs for draw parameters</li>
<li> iris: Implement the Gen &lt; 9 tessellation quads workaround</li>
<p></p>
<p>Lepton Wu (1):</p>
<li> egl/android: Remove our own reference to buffers.</li>
<p></p>
<p>Lionel Landwerlin (3):</p>
<li> etnaviv: remove variable from global namespace</li>
<li> anv: fix vkUpdateDescriptorSets with inline uniform blocks</li>
<li> anv: fix memory leak on device destroy</li>
<p></p>
<p>Lucas Stach (3):</p>
<li> etnaviv: fix vertex buffer state emission for single stream GPUs</li>
<li> rbug: fix transmitted texture sizes</li>
<li> rbug: unwrap index buffer resource</li>
<p></p>
<p>Pierre-Eric Pelloux-Prayer (1):</p>
<li> mesa: fix invalid target error handling for teximage</li>
<p></p>
<p>Roland Scheidegger (1):</p>
<li> gallivm: Fix saturated signed psub/padd intrinsics on llvm 8</li>
<p></p>
<p>Samuel Pitoiset (6):</p>
<li> drirc: enable vk_x11_override_min_image_count for DOOM</li>
<li> radv: bump minTexelBufferOffsetAlignment to 4</li>
<li> radv: fix DCC fast clear code for intensity formats</li>
<li> Revert &quot;radv: do not emit PKT3_CONTEXT_CONTROL with AMDGPU 3.6.0+&quot;</li>
<li> radv: fix DCC fast clear code for intensity formats (correctly)</li>
<li> radv: fix updating bound fast ds clear values with different aspects</li>
<p></p>
<p>Timothy Arceri (1):</p>
<li> glsl: fix crash compiling bindless samplers inside unnamed UBOs</li>
<p></p>
<p></p>
</ul>
</div>
</body>
</html>
<!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.2.3 Release Notes / 2019-11-06</h1>
<p>
Mesa 19.2.3 is a bug fix release which fixes bugs found since the 19.2.2 release.
</p>
<p>
Mesa 19.2.3 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.2.3 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 checksum</h2>
<pre>
TBD.
</pre>
<h2>New features</h2>
<ul>
<li>None</li>
</ul>
<h2>Bug fixes</h2>
<ul>
<li>19.2.2 fails mesa:util / timespec test on x86</li>
<li>Objects leaving trails in Firefox with antialias and preserveDrawingBuffer in three.js WebGLRednerer with mesa 19.2</li>
<li>glLinkProgram crash when using gcc-9 -O3 -flto due to use of uninitialised value</li>
</ul>
<h2>Changes</h2>
<ul>
<p>Bas Nieuwenhuizen (4):</p>
<li> radv: Fix timeout handling in syncobj wait.</li>
<li> radv: Remove _mesa_locale_init/fini calls.</li>
<li> turnip: Remove _mesa_locale_init/fini calls.</li>
<li> anv: Remove _mesa_locale_init/fini calls.</li>
<p></p>
<p>Caio Marcelo de Oliveira Filho (1):</p>
<li> anv: Fix output of INTEL_DEBUG=bat for chained batches</li>
<p></p>
<p>Danylo Piliaiev (1):</p>
<li> glsl: Initialize all fields of ir_variable in constructor</li>
<p></p>
<p>Dylan Baker (11):</p>
<li> bin/gen_release_notes.py: fix conditional of bugfix</li>
<li> bin/gen_release_notes.py: strip &#x27;#&#x27; from gitlab bugs</li>
<li> bin/gen_release_notes.py: Return &quot;None&quot; if there are no new features</li>
<li> bin/post_version.py: Pass version as an argument</li>
<li> bin/post_version.py: white space fixes</li>
<li> bin/post_release.py: Add .html to hrefs</li>
<li> bin/gen_release_notes.py: html escape all external data</li>
<li> bin/gen_release_notes.py: Add a warning if new features are introduced in a point release</li>
<li> cherry-ignore: update for 19.2.3 cycle</li>
<li> nir: correct use of identity check in python</li>
<li> meson: Add dep_glvnd to egl deps when building with glvnd</li>
<p></p>
<p>Ilia Mirkin (1):</p>
<li> nv50/ir: mark STORE destination inputs as used</li>
<p></p>
<p>Illia Iorin (1):</p>
<li> Revert &quot;mesa/main: Fix multisample texture initialize&quot;</li>
<p></p>
<p>Jason Ekstrand (2):</p>
<li> anv: Fix a potential BO handle leak</li>
<li> anv/tests: Zero-initialize instances</li>
<p></p>
<p>Jon Turney (2):</p>
<li> rbug: Fix use of alloca() without #include &quot;c99_alloca.h&quot;</li>
<li> Fix timespec_from_nsec test for 32-bit time_t</li>
<p></p>
<p>Jonathan Marek (1):</p>
<li> etnaviv: fix depth bias</li>
<p></p>
<p>Kenneth Graunke (1):</p>
<li> iris: Fix &quot;Force Zero RTA Index Enable&quot; setting again</li>
<p></p>
<p>Lionel Landwerlin (2):</p>
<li> anv: fix unwind of vkCreateDevice fail</li>
<li> mesa: check draw buffer completeness on glClearBufferfi/glClearBufferiv</li>
<p></p>
<p>Marek Olšák (1):</p>
<li> util/u_queue: skip util_queue_finish if num_threads is 0</li>
<p></p>
<p>Nanley Chery (5):</p>
<li> anv: Properly allocate aux-tracking space for CCS_E</li>
<li> intel/blorp: Disable depth testing for slow depth clears</li>
<li> iris: Clear ::has_hiz when disabling aux</li>
<li> iris: Don&#x27;t leak the resource for unsupported modifier</li>
<li> iris: Disallow incomplete resource creation</li>
<p></p>
<p>Paulo Zanoni (1):</p>
<li> intel/compiler: remove the operand restriction for src1 on GLK</li>
<p></p>
<p>Pierre-Eric Pelloux-Prayer (1):</p>
<li> mesa: enable msaa in clear_with_quad if needed</li>
<p></p>
<p>Sagar Ghuge (1):</p>
<li> intel/blorp: Assign correct view while clearing depth stencil</li>
<p></p>
<p>Samuel Pitoiset (4):</p>
<li> radv: do not create meta pipelines with 16 samples</li>
<li> radv: do not emit rbplus if attachments are undefined</li>
<li> radv/gfx10: fix 3D images</li>
<li> radv: fix vkUpdateDescriptorSets with inline uniform blocks</li>
<p></p>
<p>Tapani Pälli (1):</p>
<li> i965: setup sized internalformat for MESA_FORMAT_R10G10B10A2_UNORM</li>
<p></p>
<p>Thomas Hellstrom (2):</p>
<li> svga: Fix banded DMA upload unmap</li>
<li> winsys/svga: Limit the maximum DMA hardware buffer size</li>
<p></p>
<p></p>
</ul>
</div>
</body>
</html>
......@@ -27,11 +27,6 @@
#ifndef __gl_h_
#define __gl_h_
#if defined(USE_MGL_NAMESPACE)
#include "gl_mangle.h"
#endif
/**********************************************************************
* Begin system-specific stuff.
*/
......@@ -2101,13 +2096,6 @@ typedef void (APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum t
#endif
/**
** NOTE!!!!! If you add new functions to this file, or update
** glext.h be sure to regenerate the gl_mangle.h file. See comments
** in that file for details.
**/
#ifdef __cplusplus
}
#endif
......
This diff is collapsed.
......@@ -32,11 +32,6 @@
#include <GL/gl.h>
#if defined(USE_MGL_NAMESPACE)
#include "glx_mangle.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
......
/*
* Mesa 3-D graphics library
*
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
* 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 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 GLX_MANGLE_H
#define GLX_MANGLE_H
#define glXChooseVisual mglXChooseVisual
#define glXCreateContext mglXCreateContext
#define glXDestroyContext mglXDestroyContext
#define glXMakeCurrent mglXMakeCurrent
#define glXCopyContext mglXCopyContext
#define glXSwapBuffers mglXSwapBuffers
#define glXCreateGLXPixmap mglXCreateGLXPixmap
#define glXDestroyGLXPixmap mglXDestroyGLXPixmap
#define glXQueryExtension mglXQueryExtension
#define glXQueryVersion mglXQueryVersion
#define glXIsDirect mglXIsDirect
#define glXGetConfig mglXGetConfig
#define glXGetCurrentContext mglXGetCurrentContext
#define glXGetCurrentDrawable mglXGetCurrentDrawable
#define glXWaitGL mglXWaitGL
#define glXWaitX mglXWaitX
#define glXUseXFont mglXUseXFont
#define glXQueryExtensionsString mglXQueryExtensionsString
#define glXQueryServerString mglXQueryServerString
#define glXGetClientString mglXGetClientString
#define glXCreateGLXPixmapMESA mglXCreateGLXPixmapMESA
#define glXReleaseBuffersMESA mglXReleaseBuffersMESA
#define glXCopySubBufferMESA mglXCopySubBufferMESA
#define glXGetVideoSyncSGI mglXGetVideoSyncSGI
#define glXWaitVideoSyncSGI mglXWaitVideoSyncSGI
/* GLX 1.2 */
#define glXGetCurrentDisplay mglXGetCurrentDisplay
/* GLX 1.3 */
#define glXChooseFBConfig mglXChooseFBConfig
#define glXGetFBConfigAttrib mglXGetFBConfigAttrib
#define glXGetFBConfigs mglXGetFBConfigs
#define glXGetVisualFromFBConfig mglXGetVisualFromFBConfig
#define glXCreateWindow mglXCreateWindow
#define glXDestroyWindow mglXDestroyWindow
#define glXCreatePixmap mglXCreatePixmap
#define glXDestroyPixmap mglXDestroyPixmap
#define glXCreatePbuffer mglXCreatePbuffer
#define glXDestroyPbuffer mglXDestroyPbuffer
#define glXQueryDrawable mglXQueryDrawable
#define glXCreateNewContext mglXCreateNewContext
#define glXMakeContextCurrent mglXMakeContextCurrent
#define glXGetCurrentReadDrawable mglXGetCurrentReadDrawable
#define glXQueryContext mglXQueryContext
#define glXSelectEvent mglXSelectEvent
#define glXGetSelectedEvent mglXGetSelectedEvent
/* GLX 1.4 */
#define glXGetProcAddress mglXGetProcAddress
#define glXGetProcAddressARB mglXGetProcAddressARB
#endif
......@@ -12,7 +12,6 @@ Normal Haiku Op*enGL layout:
* headers/os/opengl/GLView.h
* headers/os/opengl/GLRenderer.h
* headers/os/opengl/GL/gl.h
* headers/os/opengl/GL/gl_mangle.h
* headers/os/opengl/GL/glext.h
* headers/os/opengl/GL/osmesa.h (needed?)
......
......@@ -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__
......
......@@ -22,52 +22,77 @@ inc_include = include_directories('.')
inc_d3d9 = include_directories('D3D9')
inc_haikugl = include_directories('HaikuGL')
if not glvnd_has_headers_and_pc_files
if with_gles1 or with_gles2 or with_opengl or with_egl
install_headers('KHR/khrplatform.h', subdir : 'KHR')
endif
if with_gles1
install_headers(
'GLES/egl.h', 'GLES/gl.h', 'GLES/glext.h', 'GLES/glplatform.h',
'GLES/egl.h',
'GLES/gl.h',
'GLES/glext.h',
'GLES/glplatform.h',
subdir : 'GLES',
)
endif
if with_gles2
install_headers(
'GLES2/gl2.h', 'GLES2/gl2ext.h', 'GLES2/gl2platform.h',
'GLES2/gl2.h',
'GLES2/gl2ext.h',
'GLES2/gl2platform.h',
subdir : 'GLES2',
)
install_headers(
'GLES3/gl3.h', 'GLES3/gl31.h', 'GLES3/gl32.h', 'GLES3/gl3ext.h',
'GLES3/gl3.h',
'GLES3/gl31.h',
'GLES3/gl32.h',
'GLES3/gl3ext.h',
'GLES3/gl3platform.h',
subdir : 'GLES3',
)
endif
if with_gles1 or with_gles2 or with_opengl or with_egl
install_headers('KHR/khrplatform.h', subdir : 'KHR')
endif
if with_opengl
install_headers(
'GL/gl.h', 'GL/glext.h', 'GL/glcorearb.h', 'GL/gl_mangle.h',
'GL/gl.h',
'GL/glcorearb.h',
'GL/glext.h',
subdir : 'GL',
)
endif
if with_glx != 'disabled'
install_headers('GL/glx.h', 'GL/glxext.h', 'GL/glx_mangle.h', subdir : 'GL')
install_headers(
'GL/glx.h',
'GL/glxext.h',
subdir : 'GL')
endif
if with_osmesa != 'none'
install_headers('GL/osmesa.h', subdir : 'GL')
if with_egl
install_headers(
'EGL/egl.h',
'EGL/eglext.h',
'EGL/eglplatform.h',
subdir : 'EGL',
)
endif
endif
# Non-upstream headers
if with_egl
install_headers(
'EGL/eglext.h', 'EGL/egl.h', 'EGL/eglextchromium.h', 'EGL/eglmesaext.h',
'EGL/eglplatform.h',
'EGL/eglmesaext.h',
'EGL/eglextchromium.h',
subdir : 'EGL',
)
endif
if with_osmesa != 'none'
install_headers('GL/osmesa.h', subdir : 'GL')
endif
if with_dri
install_headers('GL/internal/dri_interface.h', subdir : 'GL/internal')
endif
......
......@@ -117,7 +117,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')
......@@ -858,6 +858,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
......@@ -1034,7 +1036,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', 'random_r']
foreach f : ['strtof', 'mkostemp', 'posix_memalign', 'timespec_get', 'memfd_create', 'random_r', 'flock']
if cc.has_function(f)
pre_args += '-DHAVE_@0@'.format(f.to_upper())
endif
......@@ -1300,13 +1302,12 @@ else
endif
dep_glvnd = null_dep
glvnd_missing_pc_files = false
glvnd_has_headers_and_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')
# GLVND before 1.2 was missing its pkg-config and header files, forcing every
# vendor to provide them and the distro maintainers to resolve the conflict.
glvnd_has_headers_and_pc_files = dep_glvnd.version().version_compare('>= 1.2.0')
pre_args += '-DUSE_LIBGLVND=1'
endif
......
......@@ -998,6 +998,9 @@ radv_emit_rbplus_state(struct radv_cmd_buffer *cmd_buffer)
unsigned sx_blend_opt_epsilon = 0;
unsigned sx_blend_opt_control = 0;
if (!cmd_buffer->state.attachments || !subpass)
return;
for (unsigned i = 0; i < subpass->color_count; ++i) {
if (subpass->color_attachments[i].attachment == VK_ATTACHMENT_UNUSED) {
sx_blend_opt_control |= S_02875C_MRT0_COLOR_OPT_DISABLE(1) << (i * 4);
......@@ -1546,9 +1549,19 @@ radv_update_bound_fast_clear_ds(struct radv_cmd_buffer *cmd_buffer,
if (cmd_buffer->state.attachments[att_idx].iview->image != image)
return;
if (aspects == (VK_IMAGE_ASPECT_DEPTH_BIT |
VK_IMAGE_ASPECT_STENCIL_BIT)) {
radeon_set_context_reg_seq(cs, R_028028_DB_STENCIL_CLEAR, 2);
radeon_emit(cs, ds_clear_value.stencil);
radeon_emit(cs, fui(ds_clear_value.depth));
} else if (aspects == VK_IMAGE_ASPECT_DEPTH_BIT) {
radeon_set_context_reg_seq(cs, R_02802C_DB_DEPTH_CLEAR, 1);
radeon_emit(cs, fui(ds_clear_value.depth));
} else {
assert(aspects == VK_IMAGE_ASPECT_STENCIL_BIT);
radeon_set_context_reg_seq(cs, R_028028_DB_STENCIL_CLEAR, 1);
radeon_emit(cs, ds_clear_value.stencil);
}
/* Update the ZRANGE_PRECISION value for the TC-compat bug. This is
* only needed when clearing Z to 0.0.
......@@ -2268,14 +2281,15 @@ radv_flush_constants(struct radv_cmd_buffer *cmd_buffer,
return;
radv_foreach_stage(stage, stages) {
if (!pipeline->shaders[stage])
shader = radv_get_shader(pipeline, stage);
if (!shader)
continue;
need_push_constants |= pipeline->shaders[stage]->info.info.loads_push_constants;
need_push_constants |= pipeline->shaders[stage]->info.info.loads_dynamic_offsets;
need_push_constants |= shader->info.info.loads_push_constants;
need_push_constants |= shader->info.info.loads_dynamic_offsets;
uint8_t base = pipeline->shaders[stage]->info.info.base_inline_push_consts;
uint8_t count = pipeline->shaders[stage]->info.info.num_inline_push_consts;
uint8_t base = shader->info.info.base_inline_push_consts;
uint8_t count = shader->info.info.num_inline_push_consts;
radv_emit_inline_push_consts(cmd_buffer, pipeline, stage,
AC_UD_INLINE_PUSH_CONSTANTS,
......
......@@ -1076,6 +1076,14 @@ void radv_update_descriptor_sets(
src_ptr += src_binding_layout->offset / 4;
dst_ptr += dst_binding_layout->offset / 4;
if (src_binding_layout->type == VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT) {
src_ptr += copyset->srcArrayElement / 4;
dst_ptr += copyset->dstArrayElement / 4;
memcpy(dst_ptr, src_ptr, copyset->descriptorCount);
continue;
}
src_ptr += src_binding_layout->size * copyset->srcArrayElement / 4;
dst_ptr += dst_binding_layout->size * copyset->dstArrayElement / 4;
......
......@@ -34,7 +34,6 @@
#include "radv_shader.h"
#include "radv_cs.h"
#include "util/disk_cache.h"
#include "util/strtod.h"
#include "vk_util.h"
#include <xf86drm.h>
#include <amdgpu.h>
......@@ -686,7 +685,6 @@ VkResult radv_CreateInstance(
VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
instance->engineVersion = engine_version;
_mesa_locale_init();
glsl_type_singleton_init_or_ref();
VG(VALGRIND_CREATE_MEMPOOL(instance, 0, false));
......@@ -717,7 +715,6 @@ void radv_DestroyInstance(
VG(VALGRIND_DESTROY_MEMPOOL(instance));
glsl_type_singleton_decref();
_mesa_locale_fini();
driDestroyOptionCache(&instance->dri_options);
driDestroyOptionInfo(&instance->available_dri_options);
......@@ -1170,7 +1167,7 @@ void radv_GetPhysicalDeviceProperties(
.viewportBoundsRange = { INT16_MIN, INT16_MAX },
.viewportSubPixelBits = 8,
.minMemoryMapAlignment = 4096, /* A page */
.minTexelBufferOffsetAlignment = 1,
.minTexelBufferOffsetAlignment = 4,
.minUniformBufferOffsetAlignment = 4,
.minStorageBufferOffsetAlignment = 4,
.minTexelOffset = -32,
......@@ -2057,12 +2054,9 @@ VkResult radv_CreateDevice(
device->empty_cs[family] = device->ws->cs_create(device->ws, family);
switch (family) {
case RADV_QUEUE_GENERAL:
/* Since amdgpu version 3.6.0, CONTEXT_CONTROL is emitted by the kernel */
if (device->physical_device->rad_info.drm_minor < 6) {
radeon_emit(device->empty_cs[family], PKT3(PKT3_CONTEXT_CONTROL, 1, 0));
radeon_emit(device->empty_cs[family], CONTEXT_CONTROL_LOAD_ENABLE(1));
radeon_emit(device->empty_cs[family], CONTEXT_CONTROL_SHADOW_ENABLE(1));
}
break;
case RADV_QUEUE_COMPUTE:
radeon_emit(device->empty_cs[family], PKT3(PKT3_NOP, 0, 0));
......
......@@ -1305,6 +1305,10 @@ get_external_image_format_properties(const VkPhysicalDeviceImageFormatInfo2 *pIm
VkExternalMemoryFeatureFlagBits flags = 0;
VkExternalMemoryHandleTypeFlags export_flags = 0;
VkExternalMemoryHandleTypeFlags compat_flags = 0;
if (pImageFormatInfo->flags & VK_IMAGE_CREATE_SPARSE_BINDING_BIT)
return;
switch (handleType) {
case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT:
case VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT:
......@@ -1381,14 +1385,9 @@ VkResult radv_GetPhysicalDeviceImageFormatProperties2(
* present and VkExternalImageFormatProperties will be ignored.
*/
if (external_info && external_info->handleType != 0) {
switch (external_info->handleType) {
case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT:
case VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT:
case VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT:
get_external_image_format_properties(base_info, external_info->handleType,
&external_props->externalMemoryProperties);
break;
default:
if (!external_props->externalMemoryProperties.externalMemoryFeatures) {
/* From the Vulkan 1.0.97 spec:
*
* If handleType is not compatible with the [parameters] specified
......
......@@ -620,7 +620,7 @@ static unsigned gfx9_border_color_swizzle(const enum vk_swizzle swizzle[4])
return bc_swizzle;
}
static bool vi_alpha_is_on_msb(struct radv_device *device, VkFormat format)
bool vi_alpha_is_on_msb(struct radv_device *device, VkFormat format)
{
const struct vk_format_description *desc = vk_format_description(format);
......@@ -694,7 +694,7 @@ gfx10_make_texture_descriptor(struct radv_device *device,
*/
state[4] = S_00A010_DEPTH(type == V_008F1C_SQ_RSRC_IMG_3D ? depth - 1 : last_layer) |
S_00A010_BASE_ARRAY(first_layer);
state[5] = S_00A014_ARRAY_PITCH(!!(type == V_008F1C_SQ_RSRC_IMG_3D)) |
state[5] = S_00A014_ARRAY_PITCH(0) |
S_00A014_MAX_MIP(image->info.samples > 1 ?
util_logbase2(image->info.samples) :
image->info.levels - 1) |
......