Compare commits
68 Commits
mesa-10.5.
...
mesa-10.5.
Author | SHA1 | Date | |
---|---|---|---|
|
b1cf9cfb16 | ||
|
eba7b7cf68 | ||
|
fe521a083f | ||
|
86b7e91ae9 | ||
|
0a26544985 | ||
|
eb1b41302d | ||
|
b1c045c62f | ||
|
21dd729dcc | ||
|
104dc7447d | ||
|
0475deac26 | ||
|
7f7e74b536 | ||
|
a2624f2d2e | ||
|
a6e1495aa7 | ||
|
005def20f4 | ||
|
4ad41f45b5 | ||
|
907ee1494f | ||
|
b4045dd5e9 | ||
|
f25af5317f | ||
|
1353ba5397 | ||
|
097e70202b | ||
|
5bb7ee4fd6 | ||
|
0024b85cc6 | ||
|
ace7d9afc9 | ||
|
3dc08d4d89 | ||
|
8a3ed2dee7 | ||
|
d47d799b5f | ||
|
f3804a0051 | ||
|
113e2bd732 | ||
|
e63d65b235 | ||
|
4504642ccc | ||
|
be7b998a1f | ||
|
8ee1a1c08b | ||
|
d88fb40505 | ||
|
0d425c413f | ||
|
536003c11e | ||
|
071402cc3b | ||
|
b4c973da03 | ||
|
a27d03dd9f | ||
|
0b06729591 | ||
|
dfe88d4f52 | ||
|
1176e5862a | ||
|
716b5f7cbe | ||
|
cf60503378 | ||
|
adb47b5b27 | ||
|
ea0d1f575c | ||
|
776e47a305 | ||
|
e2dd554651 | ||
|
0f5ec7250d | ||
|
a2785a23e6 | ||
|
2ad5a068fa | ||
|
1dfbc95b76 | ||
|
215f28c695 | ||
|
95633d09e8 | ||
|
33c6a4c018 | ||
|
548fc14d36 | ||
|
c614fef092 | ||
|
8ba18d75d6 | ||
|
597d85c6b7 | ||
|
ef0e335c14 | ||
|
f8966a07d9 | ||
|
ee63b31594 | ||
|
1ebb42a6b2 | ||
|
a968edae6c | ||
|
f44e518364 | ||
|
b2a6b01082 | ||
|
abdae1c4d1 | ||
|
f73954e0a7 | ||
|
65776421fe |
@@ -31,6 +31,7 @@ endif
|
||||
endif
|
||||
|
||||
LOCAL_C_INCLUDES += \
|
||||
$(MESA_TOP)/src \
|
||||
$(MESA_TOP)/include
|
||||
|
||||
MESA_VERSION=$(shell cat $(MESA_TOP)/VERSION)
|
||||
@@ -41,6 +42,19 @@ LOCAL_CFLAGS += \
|
||||
-DANDROID_VERSION=0x0$(MESA_ANDROID_MAJOR_VERSION)0$(MESA_ANDROID_MINOR_VERSION)
|
||||
|
||||
LOCAL_CFLAGS += \
|
||||
-DHAVE___BUILTIN_EXPECT \
|
||||
-DHAVE___BUILTIN_FFS \
|
||||
-DHAVE___BUILTIN_FFSLL \
|
||||
-DHAVE_FUNC_ATTRIBUTE_FLATTEN \
|
||||
-DHAVE_FUNC_ATTRIBUTE_UNUSED \
|
||||
-DHAVE_FUNC_ATTRIBUTE_FORMAT \
|
||||
-DHAVE_FUNC_ATTRIBUTE_PACKED \
|
||||
-DHAVE___BUILTIN_CTZ \
|
||||
-DHAVE___BUILTIN_POPCOUNT \
|
||||
-DHAVE___BUILTIN_POPCOUNTLL \
|
||||
-DHAVE___BUILTIN_CLZ \
|
||||
-DHAVE___BUILTIN_CLZLL \
|
||||
-DHAVE___BUILTIN_UNREACHABLE \
|
||||
-DHAVE_PTHREAD=1 \
|
||||
-fvisibility=hidden \
|
||||
-Wno-sign-compare
|
||||
|
@@ -609,6 +609,7 @@ if test "x$enable_asm" = xyes; then
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER([xlocale.h], [DEFINES="$DEFINES -DHAVE_XLOCALE_H"])
|
||||
AC_CHECK_HEADER([sys/sysctl.h], [DEFINES="$DEFINES -DHAVE_SYS_SYSCTL_H"])
|
||||
AC_CHECK_FUNC([strtof], [DEFINES="$DEFINES -DHAVE_STRTOF"])
|
||||
|
||||
dnl Check to see if dlopen is in default libraries (like Solaris, which
|
||||
|
@@ -31,7 +31,8 @@ because compatibility contexts are not supported.
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
TBD
|
||||
2371b8e210ccd19f61dd94b6664d612e5a479ba7d431a074512d87633bd6aeb4 mesa-10.5.3.tar.gz
|
||||
8701ee1be4f5c03238f5e63c1a9bd4cc03a2f6c0155ed42a1ae7d58f18912ba2 mesa-10.5.3.tar.xz
|
||||
</pre>
|
||||
|
||||
|
||||
|
125
docs/relnotes/10.5.4.html
Normal file
125
docs/relnotes/10.5.4.html
Normal file
@@ -0,0 +1,125 @@
|
||||
<!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 10.5.4 Release Notes / April 24, 2015</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.5.4 is a bug fix release which fixes bugs found since the 10.5.3 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.5.4 implements the OpenGL 3.3 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 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
e1089567fc7bf8d9b2d8badcc9f2fc3b758701c8c0ccfe7af1805549fea53f11 mesa-10.5.4.tar.gz
|
||||
b51e723f3a20d842c88a92d809435b229fc4744ca0dbec0317d9d4a3ac4c6803 mesa-10.5.4.tar.xz
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69226">Bug 69226</a> - Cannot enable basic shaders with Second Life aborts attempt</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=71591">Bug 71591</a> - Second Life shaders fail to compile (extension declared in middle of shader)</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=81025">Bug 81025</a> - [IVB/BYT Bisected]Piglit spec_ARB_draw_indirect_arb_draw_indirect-draw-elements-prim-restart-ugly fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89457">Bug 89457</a> - [BSW Bisected]ogles3conform ES3-CTS.gtf.GL3Tests.shadow.shadow_execution_vert fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89957">Bug 89957</a> - vm protection faults in piglit lest: texsubimage cube_map_array pbo</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Brian Paul (1):</p>
|
||||
<ul>
|
||||
<li>glsl: rewrite glsl_type::record_key_hash() to avoid buffer overflow</li>
|
||||
</ul>
|
||||
|
||||
<p>Dave Airlie (2):</p>
|
||||
<ul>
|
||||
<li>st/mesa: convert sub image for cube map arrays to 2d arrays for upload</li>
|
||||
<li>st/mesa: align cube map arrays layers</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (11):</p>
|
||||
<ul>
|
||||
<li>docs: Add 256 sums for the 10.5.3 release</li>
|
||||
<li>radeonsi: remove unused si_dump_key()</li>
|
||||
<li>android: use LOCAL_SHARED_LIBRARIES over TARGET_OUT_HEADERS</li>
|
||||
<li>android: add $(mesa_top)/src include to the whole of mesa</li>
|
||||
<li>android: egl: add libsync_cflags to the build</li>
|
||||
<li>android: dri/common: conditionally include drm_cflags/set __NOT_HAVE_DRM_H</li>
|
||||
<li>android: add HAVE__BUILTIN_* and HAVE_FUNC_ATTRIBUTE_* defines</li>
|
||||
<li>android: add $(mesa_top)/src/mesa/main to the includes list</li>
|
||||
<li>android: dri: link against libmesa_util</li>
|
||||
<li>android: mesa: fix the path of the SSE4_1 optimisations</li>
|
||||
<li>Update version to 10.5.4</li>
|
||||
</ul>
|
||||
|
||||
<p>Ian Romanick (1):</p>
|
||||
<ul>
|
||||
<li>nir: Fix typo in "ushr by 0" algebraic replacement</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (2):</p>
|
||||
<ul>
|
||||
<li>i965: Fix software primitive restart with indirect draws.</li>
|
||||
<li>drirc: Add "Second Life" quirk (allow_glsl_extension_directive_midshader).</li>
|
||||
</ul>
|
||||
|
||||
<p>Kristian Høgsberg (1):</p>
|
||||
<ul>
|
||||
<li>i965: Rewrite ir_tex to ir_txl with lod 0 for vertex shaders</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (2):</p>
|
||||
<ul>
|
||||
<li>glsl_to_tgsi: fix out-of-bounds constant access and crash for uniforms</li>
|
||||
<li>glsl_to_tgsi: don't use a potentially-undefined immediate for ir_query_levels</li>
|
||||
</ul>
|
||||
|
||||
<p>Mathias Froehlich (1):</p>
|
||||
<ul>
|
||||
<li>i965: Flush batchbuffer containing the query on glQueryCounter.</li>
|
||||
</ul>
|
||||
|
||||
<p>Mauro Rossi (2):</p>
|
||||
<ul>
|
||||
<li>android: mesa: generate the format_{un,}pack.[ch] sources</li>
|
||||
<li>android: add inital NIR build</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
95
docs/relnotes/10.5.5.html
Normal file
95
docs/relnotes/10.5.5.html
Normal file
@@ -0,0 +1,95 @@
|
||||
<!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 10.5.5 Release Notes / May 11, 2015</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.5.5 is a bug fix release which fixes bugs found since the 10.5.4 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.5.5 implements the OpenGL 3.3 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 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
c10f00fd792b8290dd51ebcc48a9016c4cafab19ec205423c6fcadfd7f3a59f2 mesa-10.5.5.tar.gz
|
||||
4ac4e4ea3414f1cadb1467f2f173f9e56170d31e8674f7953a46f0549d319f28 mesa-10.5.5.tar.xz
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=88521">Bug 88521</a> - GLBenchmark 2.7 TRex renders with artifacts on Gen8 with !UXA</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89455">Bug 89455</a> - [NVC0/Gallium] Unigine Heaven black and white boxes</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89689">Bug 89689</a> - [Regression] Weston on DRM backend won't start with new version of mesa</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90130">Bug 90130</a> - gl_PrimitiveId seems to reset at 340</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Boyan Ding (1):</p>
|
||||
<ul>
|
||||
<li>i965: Add XRGB8888 format to intel_screen_make_configs</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (3):</p>
|
||||
<ul>
|
||||
<li>docs: Add sha256 sums for the 10.5.4 release</li>
|
||||
<li>r300: do not link against libdrm_intel</li>
|
||||
<li>Update version to 10.5.5</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (4):</p>
|
||||
<ul>
|
||||
<li>nvc0/ir: flush denorms to zero in non-compute shaders</li>
|
||||
<li>gk110/ir: fix set with a register dest to not auto-set the abs flag</li>
|
||||
<li>nvc0/ir: fix predicated PFETCH emission</li>
|
||||
<li>nv50/ir: fix asFlow() const helper for OP_JOIN</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (2):</p>
|
||||
<ul>
|
||||
<li>i965: Make intel_emit_linear_blit handle Gen8+ alignment restrictions.</li>
|
||||
<li>i965: Disallow linear blits that are not cacheline aligned.</li>
|
||||
</ul>
|
||||
|
||||
<p>Roland Scheidegger (1):</p>
|
||||
<ul>
|
||||
<li>draw: fix prim ids when there's no gs</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
146
docs/relnotes/10.5.6.html
Normal file
146
docs/relnotes/10.5.6.html
Normal file
@@ -0,0 +1,146 @@
|
||||
<!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 10.5.6 Release Notes / May 23, 2015</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.5.6 is a bug fix release which fixes bugs found since the 10.5.5 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.5.6 implements the OpenGL 3.3 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 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
TBD
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=86792">Bug 86792</a> - [NVC0] Portal 2 Crashes in Wine</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90147">Bug 90147</a> - swrast: build error undeclared _SC_PHYS_PAGES on osx</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90350">Bug 90350</a> - [G96] Portal's portal are incorrectly rendered</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=90363">Bug 90363</a> - [nv50] HW state is not reset correctly when using a new GL context</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Alex Deucher (1):</p>
|
||||
<ul>
|
||||
<li>radeonsi: add new bonaire pci id</li>
|
||||
</ul>
|
||||
|
||||
<p>Axel Davy (2):</p>
|
||||
<ul>
|
||||
<li>egl/wayland: properly destroy wayland objects</li>
|
||||
<li>glx/dri3: Add additional check for gpu offloading case</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (4):</p>
|
||||
<ul>
|
||||
<li>docs: Add sha256 sums for the 10.5.5 release</li>
|
||||
<li>egl/main: fix EGL_KHR_get_all_proc_addresses</li>
|
||||
<li>targets/osmesa: drop the -module tag from LDFLAGS</li>
|
||||
<li>Update version to 10.5.6</li>
|
||||
</ul>
|
||||
|
||||
<p>Francisco Jerez (4):</p>
|
||||
<ul>
|
||||
<li>clover: Refactor event::trigger and ::abort to prevent deadlock and reentrancy issues.</li>
|
||||
<li>clover: Wrap event::_status in a method to prevent unlocked access.</li>
|
||||
<li>clover: Implement locking of the wait_count, _chain and _status members of event.</li>
|
||||
<li>i965: Fix PBO cache coherency issue after _mesa_meta_pbo_GetTexSubImage().</li>
|
||||
</ul>
|
||||
|
||||
<p>Fredrik Höglund (2):</p>
|
||||
<ul>
|
||||
<li>main: Require that the texture exists in framebuffer_texture</li>
|
||||
<li>mesa: Generate GL_INVALID_VALUE in framebuffer_texture when layer < 0</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (7):</p>
|
||||
<ul>
|
||||
<li>nv50/ir: only propagate saturate up if some actual folding took place</li>
|
||||
<li>nv50: keep track of PGRAPH state in nv50_screen</li>
|
||||
<li>nvc0: keep track of PGRAPH state in nvc0_screen</li>
|
||||
<li>nvc0: reset the instanced elements state when doing blit using 3d engine</li>
|
||||
<li>nv50/ir: only enable mul saturate on G200+</li>
|
||||
<li>st/mesa: make sure to create a "clean" bool when doing i2b</li>
|
||||
<li>nvc0: switch mechanism for shader eviction to be a while loop</li>
|
||||
</ul>
|
||||
|
||||
<p>Jeremy Huddleston Sequoia (2):</p>
|
||||
<ul>
|
||||
<li>swrast: Build fix for darwin</li>
|
||||
<li>darwin: Fix install name of libOSMesa</li>
|
||||
</ul>
|
||||
|
||||
<p>Laura Ekstrand (2):</p>
|
||||
<ul>
|
||||
<li>main: Fix an error generated by FramebufferTexture</li>
|
||||
<li>main: Complete error conditions for glInvalidate*Framebuffer.</li>
|
||||
</ul>
|
||||
|
||||
<p>Marta Lofstedt (1):</p>
|
||||
<ul>
|
||||
<li>main: glGetIntegeri_v fails for GL_VERTEX_BINDING_STRIDE</li>
|
||||
</ul>
|
||||
|
||||
<p>Rob Clark (2):</p>
|
||||
<ul>
|
||||
<li>freedreno: enable a306</li>
|
||||
<li>freedreno: fix bug in tile/slot calculation</li>
|
||||
</ul>
|
||||
|
||||
<p>Roland Scheidegger (1):</p>
|
||||
<ul>
|
||||
<li>draw: (trivial) fix out-of-bounds vector initialization</li>
|
||||
</ul>
|
||||
|
||||
<p>Tim Rowley (1):</p>
|
||||
<ul>
|
||||
<li>mesa: fix shininess check for ffvertex_prog v2</li>
|
||||
</ul>
|
||||
|
||||
<p>Tom Stellard (2):</p>
|
||||
<ul>
|
||||
<li>clover: Add a mutex to guard queue::queued_events</li>
|
||||
<li>clover: Fix a bug with multi-threaded events v2</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -85,6 +85,7 @@ CHIPSET(0x6651, BONAIRE_6651, BONAIRE)
|
||||
CHIPSET(0x6658, BONAIRE_6658, BONAIRE)
|
||||
CHIPSET(0x665C, BONAIRE_665C, BONAIRE)
|
||||
CHIPSET(0x665D, BONAIRE_665D, BONAIRE)
|
||||
CHIPSET(0x665F, BONAIRE_665F, BONAIRE)
|
||||
|
||||
CHIPSET(0x9830, KABINI_9830, KABINI)
|
||||
CHIPSET(0x9831, KABINI_9831, KABINI)
|
||||
|
@@ -40,12 +40,18 @@ LOCAL_C_INCLUDES := \
|
||||
$(MESA_TOP)/src/mapi \
|
||||
$(MESA_TOP)/src/egl/main \
|
||||
$(MESA_TOP)/src/loader \
|
||||
$(TARGET_OUT_HEADERS)/libdrm \
|
||||
$(DRM_GRALLOC_TOP)
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := \
|
||||
libmesa_loader
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm
|
||||
|
||||
ifeq ($(shell echo "$(MESA_ANDROID_VERSION) >= 4.2" | bc),1)
|
||||
LOCAL_SHARED_LIBRARIES += \
|
||||
libsync
|
||||
endif
|
||||
|
||||
LOCAL_MODULE := libmesa_egl_dri2
|
||||
|
||||
include $(MESA_COMMON_MK)
|
||||
|
@@ -703,6 +703,8 @@ dri2_terminate(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
#ifdef HAVE_WAYLAND_PLATFORM
|
||||
case _EGL_PLATFORM_WAYLAND:
|
||||
wl_drm_destroy(dri2_dpy->wl_drm);
|
||||
wl_registry_destroy(dri2_dpy->wl_registry);
|
||||
wl_event_queue_destroy(dri2_dpy->wl_queue);
|
||||
if (dri2_dpy->own_device) {
|
||||
wl_display_disconnect(dri2_dpy->wl_dpy);
|
||||
}
|
||||
|
@@ -1028,7 +1028,7 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
wl_registry_add_listener(dri2_dpy->wl_registry,
|
||||
®istry_listener, dri2_dpy);
|
||||
if (roundtrip(dri2_dpy) < 0 || dri2_dpy->wl_drm == NULL)
|
||||
goto cleanup_dpy;
|
||||
goto cleanup_registry;
|
||||
|
||||
if (roundtrip(dri2_dpy) < 0 || dri2_dpy->fd == -1)
|
||||
goto cleanup_drm;
|
||||
@@ -1111,6 +1111,9 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
cleanup_drm:
|
||||
free(dri2_dpy->device_name);
|
||||
wl_drm_destroy(dri2_dpy->wl_drm);
|
||||
cleanup_registry:
|
||||
wl_registry_destroy(dri2_dpy->wl_registry);
|
||||
wl_event_queue_destroy(dri2_dpy->wl_queue);
|
||||
cleanup_dpy:
|
||||
free(dri2_dpy);
|
||||
|
||||
|
@@ -1029,8 +1029,9 @@ eglGetProcAddress(const char *procname)
|
||||
const char *name;
|
||||
_EGLProc function;
|
||||
} egl_functions[] = {
|
||||
/* core functions should not be queryable, but, well... */
|
||||
#ifdef _EGL_GET_CORE_ADDRESSES
|
||||
/* core functions queryable in the presence of
|
||||
* EGL_KHR_get_all_proc_addresses or EGL 1.5
|
||||
*/
|
||||
/* alphabetical order */
|
||||
{ "eglBindAPI", (_EGLProc) eglBindAPI },
|
||||
{ "eglBindTexImage", (_EGLProc) eglBindTexImage },
|
||||
@@ -1066,7 +1067,6 @@ eglGetProcAddress(const char *procname)
|
||||
{ "eglWaitClient", (_EGLProc) eglWaitClient },
|
||||
{ "eglWaitGL", (_EGLProc) eglWaitGL },
|
||||
{ "eglWaitNative", (_EGLProc) eglWaitNative },
|
||||
#endif /* _EGL_GET_CORE_ADDRESSES */
|
||||
#ifdef EGL_MESA_screen_surface
|
||||
{ "eglChooseModeMESA", (_EGLProc) eglChooseModeMESA },
|
||||
{ "eglGetModesMESA", (_EGLProc) eglGetModesMESA },
|
||||
|
@@ -33,8 +33,7 @@ LOCAL_SRC_FILES := \
|
||||
$(VL_STUB_SOURCES)
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(GALLIUM_TOP)/auxiliary/util \
|
||||
$(MESA_TOP)/src
|
||||
$(GALLIUM_TOP)/auxiliary/util
|
||||
|
||||
LOCAL_MODULE := libmesa_gallium
|
||||
|
||||
|
@@ -182,6 +182,7 @@ boolean draw_init(struct draw_context *draw)
|
||||
void draw_new_instance(struct draw_context *draw)
|
||||
{
|
||||
draw_geometry_shader_new_instance(draw->gs.geometry_shader);
|
||||
draw_prim_assembler_new_instance(draw->ia);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -2049,7 +2049,7 @@ generate_mask_value(struct draw_gs_llvm_variant *variant,
|
||||
|
||||
num_prims = lp_build_broadcast(gallivm, lp_build_vec_type(gallivm, mask_type),
|
||||
variant->num_prims);
|
||||
for (i = 0; i <= gs_type.length; i++) {
|
||||
for (i = 0; i < gs_type.length; i++) {
|
||||
LLVMValueRef idx = lp_build_const_int32(gallivm, i);
|
||||
mask_val = LLVMBuildInsertElement(builder, mask_val, idx, idx, "");
|
||||
}
|
||||
|
@@ -189,7 +189,6 @@ draw_prim_assembler_prepare_outputs(struct draw_assembler *ia)
|
||||
} else {
|
||||
ia->primid_slot = -1;
|
||||
}
|
||||
ia->primid = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -233,7 +232,6 @@ draw_prim_assembler_run(struct draw_context *draw,
|
||||
asmblr->input_prims = input_prims;
|
||||
asmblr->input_verts = input_verts;
|
||||
asmblr->needs_primid = needs_primid(asmblr->draw);
|
||||
asmblr->primid = 0;
|
||||
asmblr->num_prims = 0;
|
||||
|
||||
output_prims->linear = TRUE;
|
||||
@@ -284,3 +282,14 @@ draw_prim_assembler_destroy(struct draw_assembler *ia)
|
||||
{
|
||||
FREE(ia);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Called at the very begin of the draw call with a new instance
|
||||
* Used to reset state that should persist between primitive restart.
|
||||
*/
|
||||
void
|
||||
draw_prim_assembler_new_instance(struct draw_assembler *asmblr)
|
||||
{
|
||||
asmblr->primid = 0;
|
||||
}
|
||||
|
@@ -70,5 +70,8 @@ draw_prim_assembler_run(struct draw_context *draw,
|
||||
void
|
||||
draw_prim_assembler_prepare_outputs(struct draw_assembler *ia);
|
||||
|
||||
void
|
||||
draw_prim_assembler_new_instance(struct draw_assembler *ia);
|
||||
|
||||
|
||||
#endif
|
||||
|
@@ -34,10 +34,9 @@ LOCAL_CFLAGS := \
|
||||
-Wno-packed-bitfield-compat
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(LOCAL_PATH)/ir3 \
|
||||
$(TARGET_OUT_HEADERS)/libdrm \
|
||||
$(TARGET_OUT_HEADERS)/freedreno
|
||||
$(LOCAL_PATH)/ir3
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm libdrm_freedreno
|
||||
LOCAL_MODULE := libmesa_pipe_freedreno
|
||||
|
||||
include $(GALLIUM_COMMON_MK)
|
||||
|
@@ -293,7 +293,7 @@ struct fd_context {
|
||||
*/
|
||||
struct fd_gmem_stateobj gmem;
|
||||
struct fd_vsc_pipe pipe[8];
|
||||
struct fd_tile tile[64];
|
||||
struct fd_tile tile[256];
|
||||
|
||||
/* which state objects need to be re-emit'd: */
|
||||
enum {
|
||||
|
@@ -91,6 +91,7 @@ calculate_tiles(struct fd_context *ctx)
|
||||
uint32_t i, j, t, xoff, yoff;
|
||||
uint32_t tpp_x, tpp_y;
|
||||
bool has_zs = !!(ctx->resolve & (FD_BUFFER_DEPTH | FD_BUFFER_STENCIL));
|
||||
int tile_n[ARRAY_SIZE(ctx->pipe)];
|
||||
|
||||
if (pfb->cbufs[0])
|
||||
cpp = util_format_get_blocksize(pfb->cbufs[0]->format);
|
||||
@@ -213,6 +214,7 @@ calculate_tiles(struct fd_context *ctx)
|
||||
/* configure tiles: */
|
||||
t = 0;
|
||||
yoff = miny;
|
||||
memset(tile_n, 0, sizeof(tile_n));
|
||||
for (i = 0; i < nbins_y; i++) {
|
||||
uint32_t bw, bh;
|
||||
|
||||
@@ -223,20 +225,17 @@ calculate_tiles(struct fd_context *ctx)
|
||||
|
||||
for (j = 0; j < nbins_x; j++) {
|
||||
struct fd_tile *tile = &ctx->tile[t];
|
||||
uint32_t n, p;
|
||||
uint32_t p;
|
||||
|
||||
assert(t < ARRAY_SIZE(ctx->tile));
|
||||
|
||||
/* pipe number: */
|
||||
p = ((i / tpp_y) * div_round_up(nbins_x, tpp_x)) + (j / tpp_x);
|
||||
|
||||
/* slot number: */
|
||||
n = ((i % tpp_y) * tpp_x) + (j % tpp_x);
|
||||
|
||||
/* clip bin width: */
|
||||
bw = MIN2(bin_w, minx + width - xoff);
|
||||
|
||||
tile->n = n;
|
||||
tile->n = tile_n[p]++;
|
||||
tile->p = p;
|
||||
tile->bin_w = bw;
|
||||
tile->bin_h = bh;
|
||||
|
@@ -531,6 +531,7 @@ fd_screen_create(struct fd_device *dev)
|
||||
case 220:
|
||||
fd2_screen_init(pscreen);
|
||||
break;
|
||||
case 307:
|
||||
case 320:
|
||||
case 330:
|
||||
fd3_screen_init(pscreen);
|
||||
|
@@ -36,9 +36,7 @@ LOCAL_SRC_FILES := \
|
||||
$(NVC0_CODEGEN_SOURCES) \
|
||||
$(NVC0_C_SOURCES)
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(TARGET_OUT_HEADERS)/libdrm
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm libdrm_nouveau
|
||||
LOCAL_MODULE := libmesa_pipe_nouveau
|
||||
|
||||
include external/stlport/libstlport.mk
|
||||
|
@@ -903,7 +903,7 @@ CodeEmitterGK110::emitSET(const CmpInstruction *i)
|
||||
code[0] |= 0x1c;
|
||||
} else {
|
||||
switch (i->sType) {
|
||||
case TYPE_F32: op2 = 0x000; op1 = 0x820; break;
|
||||
case TYPE_F32: op2 = 0x000; op1 = 0x800; break;
|
||||
case TYPE_F64: op2 = 0x080; op1 = 0x900; break;
|
||||
default:
|
||||
op2 = 0x1a8;
|
||||
@@ -1265,8 +1265,10 @@ CodeEmitterGK110::emitPFETCH(const Instruction *i)
|
||||
|
||||
emitPredicate(i);
|
||||
|
||||
const int src1 = (i->predSrc == 1) ? 2 : 1; // if predSrc == 1, !srcExists(2)
|
||||
|
||||
defId(i->def(0), 2);
|
||||
srcId(i->src(1), 10);
|
||||
srcId(i, src1, 10);
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -1441,8 +1441,10 @@ CodeEmitterNVC0::emitPFETCH(const Instruction *i)
|
||||
|
||||
emitPredicate(i);
|
||||
|
||||
const int src1 = (i->predSrc == 1) ? 2 : 1; // if predSrc == 1, !srcExists(2)
|
||||
|
||||
defId(i->def(0), 14);
|
||||
srcId(i->src(1), 20);
|
||||
srcId(i, src1, 20);
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -302,7 +302,7 @@ FlowInstruction *Instruction::asFlow()
|
||||
|
||||
const FlowInstruction *Instruction::asFlow() const
|
||||
{
|
||||
if (op >= OP_BRA && op <= OP_JOINAT)
|
||||
if (op >= OP_BRA && op <= OP_JOIN)
|
||||
return static_cast<const FlowInstruction *>(this);
|
||||
return NULL;
|
||||
}
|
||||
|
@@ -73,6 +73,26 @@ NVC0LegalizeSSA::handleRCPRSQ(Instruction *i)
|
||||
// TODO
|
||||
}
|
||||
|
||||
void
|
||||
NVC0LegalizeSSA::handleFTZ(Instruction *i)
|
||||
{
|
||||
// Only want to flush float inputs
|
||||
if (i->sType != TYPE_F32)
|
||||
return;
|
||||
|
||||
// If we're already flushing denorms (and NaN's) to zero, no need for this.
|
||||
if (i->dnz)
|
||||
return;
|
||||
|
||||
// Only certain classes of operations can flush
|
||||
OpClass cls = prog->getTarget()->getOpClass(i->op);
|
||||
if (cls != OPCLASS_ARITH && cls != OPCLASS_COMPARE &&
|
||||
cls != OPCLASS_CONVERT)
|
||||
return;
|
||||
|
||||
i->ftz = true;
|
||||
}
|
||||
|
||||
bool
|
||||
NVC0LegalizeSSA::visit(Function *fn)
|
||||
{
|
||||
@@ -86,8 +106,11 @@ NVC0LegalizeSSA::visit(BasicBlock *bb)
|
||||
Instruction *next;
|
||||
for (Instruction *i = bb->getEntry(); i; i = next) {
|
||||
next = i->next;
|
||||
if (i->dType == TYPE_F32)
|
||||
if (i->dType == TYPE_F32) {
|
||||
if (prog->getType() != Program::TYPE_COMPUTE)
|
||||
handleFTZ(i);
|
||||
continue;
|
||||
}
|
||||
switch (i->op) {
|
||||
case OP_DIV:
|
||||
case OP_MOD:
|
||||
|
@@ -36,6 +36,7 @@ private:
|
||||
// we want to insert calls to the builtin library only after optimization
|
||||
void handleDIV(Instruction *); // integer division, modulus
|
||||
void handleRCPRSQ(Instruction *); // double precision float recip/rsqrt
|
||||
void handleFTZ(Instruction *);
|
||||
|
||||
private:
|
||||
BuildUtil bld;
|
||||
|
@@ -676,6 +676,7 @@ ConstantFolding::tryCollapseChainedMULs(Instruction *mul2,
|
||||
mul1->setSrc(s1, bld.loadImm(NULL, f * imm1.reg.data.f32));
|
||||
mul1->src(s1).mod = Modifier(0);
|
||||
mul2->def(0).replace(mul1->getDef(0), false);
|
||||
mul1->saturate = mul2->saturate;
|
||||
} else
|
||||
if (prog->getTarget()->isPostMultiplySupported(OP_MUL, f, e)) {
|
||||
// c = mul a, b
|
||||
@@ -684,8 +685,8 @@ ConstantFolding::tryCollapseChainedMULs(Instruction *mul2,
|
||||
mul2->def(0).replace(mul1->getDef(0), false);
|
||||
if (f < 0)
|
||||
mul1->src(0).mod *= Modifier(NV50_IR_MOD_NEG);
|
||||
mul1->saturate = mul2->saturate;
|
||||
}
|
||||
mul1->saturate = mul2->saturate;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@@ -84,7 +84,7 @@ static const struct opProperties _initProps[] =
|
||||
// neg abs not sat c[] s[], a[], imm
|
||||
{ OP_ADD, 0x3, 0x0, 0x0, 0x8, 0x2, 0x1, 0x1, 0x2 },
|
||||
{ OP_SUB, 0x3, 0x0, 0x0, 0x8, 0x2, 0x1, 0x1, 0x2 },
|
||||
{ OP_MUL, 0x3, 0x0, 0x0, 0x8, 0x2, 0x1, 0x1, 0x2 },
|
||||
{ OP_MUL, 0x3, 0x0, 0x0, 0x0, 0x2, 0x1, 0x1, 0x2 },
|
||||
{ OP_MAX, 0x3, 0x3, 0x0, 0x0, 0x2, 0x1, 0x1, 0x0 },
|
||||
{ OP_MIN, 0x3, 0x3, 0x0, 0x0, 0x2, 0x1, 0x1, 0x0 },
|
||||
{ OP_MAD, 0x7, 0x0, 0x0, 0x8, 0x6, 0x1, 0x1, 0x0 }, // special constraint
|
||||
@@ -188,6 +188,9 @@ void TargetNV50::initOpInfo()
|
||||
if (prop->mSat & 8)
|
||||
opInfo[prop->op].dstMods = NV50_IR_MOD_SAT;
|
||||
}
|
||||
|
||||
if (chipset >= 0xa0)
|
||||
opInfo[OP_MUL].dstMods = NV50_IR_MOD_SAT;
|
||||
}
|
||||
|
||||
unsigned int
|
||||
|
@@ -138,8 +138,11 @@ nv50_destroy(struct pipe_context *pipe)
|
||||
{
|
||||
struct nv50_context *nv50 = nv50_context(pipe);
|
||||
|
||||
if (nv50_context_screen(nv50)->cur_ctx == nv50)
|
||||
nv50_context_screen(nv50)->cur_ctx = NULL;
|
||||
if (nv50->screen->cur_ctx == nv50) {
|
||||
nv50->screen->cur_ctx = NULL;
|
||||
/* Save off the state in case another context gets created */
|
||||
nv50->screen->save_state = nv50->state;
|
||||
}
|
||||
nouveau_pushbuf_bufctx(nv50->base.pushbuf, NULL);
|
||||
nouveau_pushbuf_kick(nv50->base.pushbuf, nv50->base.pushbuf->channel);
|
||||
|
||||
@@ -290,6 +293,10 @@ nv50_create(struct pipe_screen *pscreen, void *priv)
|
||||
pipe->get_sample_position = nv50_context_get_sample_position;
|
||||
|
||||
if (!screen->cur_ctx) {
|
||||
/* Restore the last context's state here, normally handled during
|
||||
* context switch
|
||||
*/
|
||||
nv50->state = screen->save_state;
|
||||
screen->cur_ctx = nv50;
|
||||
nouveau_pushbuf_bufctx(screen->base.pushbuf, nv50->bufctx);
|
||||
}
|
||||
|
@@ -104,28 +104,7 @@ struct nv50_context {
|
||||
uint32_t dirty;
|
||||
boolean cb_dirty;
|
||||
|
||||
struct {
|
||||
uint32_t instance_elts; /* bitmask of per-instance elements */
|
||||
uint32_t instance_base;
|
||||
uint32_t interpolant_ctrl;
|
||||
uint32_t semantic_color;
|
||||
uint32_t semantic_psize;
|
||||
int32_t index_bias;
|
||||
boolean uniform_buffer_bound[3];
|
||||
boolean prim_restart;
|
||||
boolean point_sprite;
|
||||
boolean rt_serialize;
|
||||
boolean flushed;
|
||||
boolean rasterizer_discard;
|
||||
uint8_t tls_required;
|
||||
boolean new_tls_space;
|
||||
uint8_t num_vtxbufs;
|
||||
uint8_t num_vtxelts;
|
||||
uint8_t num_textures[3];
|
||||
uint8_t num_samplers[3];
|
||||
uint8_t prim_size;
|
||||
uint16_t scissor;
|
||||
} state;
|
||||
struct nv50_graph_state state;
|
||||
|
||||
struct nv50_blend_stateobj *blend;
|
||||
struct nv50_rasterizer_stateobj *rast;
|
||||
@@ -191,12 +170,6 @@ nv50_context(struct pipe_context *pipe)
|
||||
return (struct nv50_context *)pipe;
|
||||
}
|
||||
|
||||
static INLINE struct nv50_screen *
|
||||
nv50_context_screen(struct nv50_context *nv50)
|
||||
{
|
||||
return nv50_screen(&nv50->base.screen->base);
|
||||
}
|
||||
|
||||
/* return index used in nv50_context arrays for a specific shader type */
|
||||
static INLINE unsigned
|
||||
nv50_context_shader_stage(unsigned pipe)
|
||||
|
@@ -25,10 +25,34 @@ struct nv50_context;
|
||||
|
||||
struct nv50_blitter;
|
||||
|
||||
struct nv50_graph_state {
|
||||
uint32_t instance_elts; /* bitmask of per-instance elements */
|
||||
uint32_t instance_base;
|
||||
uint32_t interpolant_ctrl;
|
||||
uint32_t semantic_color;
|
||||
uint32_t semantic_psize;
|
||||
int32_t index_bias;
|
||||
boolean uniform_buffer_bound[3];
|
||||
boolean prim_restart;
|
||||
boolean point_sprite;
|
||||
boolean rt_serialize;
|
||||
boolean flushed;
|
||||
boolean rasterizer_discard;
|
||||
uint8_t tls_required;
|
||||
boolean new_tls_space;
|
||||
uint8_t num_vtxbufs;
|
||||
uint8_t num_vtxelts;
|
||||
uint8_t num_textures[3];
|
||||
uint8_t num_samplers[3];
|
||||
uint8_t prim_size;
|
||||
uint16_t scissor;
|
||||
};
|
||||
|
||||
struct nv50_screen {
|
||||
struct nouveau_screen base;
|
||||
|
||||
struct nv50_context *cur_ctx;
|
||||
struct nv50_graph_state save_state;
|
||||
|
||||
struct nouveau_bo *code;
|
||||
struct nouveau_bo *uniforms;
|
||||
|
@@ -394,6 +394,8 @@ nv50_switch_pipe_context(struct nv50_context *ctx_to)
|
||||
|
||||
if (ctx_from)
|
||||
ctx_to->state = ctx_from->state;
|
||||
else
|
||||
ctx_to->state = ctx_to->screen->save_state;
|
||||
|
||||
ctx_to->dirty = ~0;
|
||||
ctx_to->viewports_dirty = ~0;
|
||||
|
@@ -139,8 +139,12 @@ nvc0_destroy(struct pipe_context *pipe)
|
||||
{
|
||||
struct nvc0_context *nvc0 = nvc0_context(pipe);
|
||||
|
||||
if (nvc0->screen->cur_ctx == nvc0)
|
||||
if (nvc0->screen->cur_ctx == nvc0) {
|
||||
nvc0->screen->cur_ctx = NULL;
|
||||
nvc0->screen->save_state = nvc0->state;
|
||||
nvc0->screen->save_state.tfb = NULL;
|
||||
}
|
||||
|
||||
/* Unset bufctx, we don't want to revalidate any resources after the flush.
|
||||
* Other contexts will always set their bufctx again on action calls.
|
||||
*/
|
||||
@@ -303,6 +307,7 @@ nvc0_create(struct pipe_screen *pscreen, void *priv)
|
||||
pipe->get_sample_position = nvc0_context_get_sample_position;
|
||||
|
||||
if (!screen->cur_ctx) {
|
||||
nvc0->state = screen->save_state;
|
||||
screen->cur_ctx = nvc0;
|
||||
nouveau_pushbuf_bufctx(screen->base.pushbuf, nvc0->bufctx);
|
||||
}
|
||||
|
@@ -113,29 +113,7 @@ struct nvc0_context {
|
||||
uint32_t dirty;
|
||||
uint32_t dirty_cp; /* dirty flags for compute state */
|
||||
|
||||
struct {
|
||||
boolean flushed;
|
||||
boolean rasterizer_discard;
|
||||
boolean early_z_forced;
|
||||
boolean prim_restart;
|
||||
uint32_t instance_elts; /* bitmask of per-instance elements */
|
||||
uint32_t instance_base;
|
||||
uint32_t constant_vbos;
|
||||
uint32_t constant_elts;
|
||||
int32_t index_bias;
|
||||
uint16_t scissor;
|
||||
uint8_t vbo_mode; /* 0 = normal, 1 = translate, 3 = translate, forced */
|
||||
uint8_t num_vtxbufs;
|
||||
uint8_t num_vtxelts;
|
||||
uint8_t num_textures[6];
|
||||
uint8_t num_samplers[6];
|
||||
uint8_t tls_required; /* bitmask of shader types using l[] */
|
||||
uint8_t c14_bound; /* whether immediate array constbuf is bound */
|
||||
uint8_t clip_enable;
|
||||
uint32_t clip_mode;
|
||||
uint32_t uniform_buffer_bound[5];
|
||||
struct nvc0_transform_feedback_state *tfb;
|
||||
} state;
|
||||
struct nvc0_graph_state state;
|
||||
|
||||
struct nvc0_blend_stateobj *blend;
|
||||
struct nvc0_rasterizer_stateobj *rast;
|
||||
|
@@ -683,11 +683,12 @@ nvc0_program_upload_code(struct nvc0_context *nvc0, struct nvc0_program *prog)
|
||||
ret = nouveau_heap_alloc(screen->text_heap, size, prog, &prog->mem);
|
||||
if (ret) {
|
||||
struct nouveau_heap *heap = screen->text_heap;
|
||||
struct nouveau_heap *iter;
|
||||
for (iter = heap; iter && iter->next != heap; iter = iter->next) {
|
||||
struct nvc0_program *evict = iter->priv;
|
||||
if (evict)
|
||||
nouveau_heap_free(&evict->mem);
|
||||
/* Note that the code library, which is allocated before anything else,
|
||||
* does not have a priv pointer. We can stop once we hit it.
|
||||
*/
|
||||
while (heap->next && heap->next->priv) {
|
||||
struct nvc0_program *evict = heap->next->priv;
|
||||
nouveau_heap_free(&evict->mem);
|
||||
}
|
||||
debug_printf("WARNING: out of code space, evicting all shaders.\n");
|
||||
ret = nouveau_heap_alloc(heap, size, prog, &prog->mem);
|
||||
|
@@ -27,10 +27,35 @@ struct nvc0_context;
|
||||
|
||||
struct nvc0_blitter;
|
||||
|
||||
struct nvc0_graph_state {
|
||||
boolean flushed;
|
||||
boolean rasterizer_discard;
|
||||
boolean early_z_forced;
|
||||
boolean prim_restart;
|
||||
uint32_t instance_elts; /* bitmask of per-instance elements */
|
||||
uint32_t instance_base;
|
||||
uint32_t constant_vbos;
|
||||
uint32_t constant_elts;
|
||||
int32_t index_bias;
|
||||
uint16_t scissor;
|
||||
uint8_t vbo_mode; /* 0 = normal, 1 = translate, 3 = translate, forced */
|
||||
uint8_t num_vtxbufs;
|
||||
uint8_t num_vtxelts;
|
||||
uint8_t num_textures[6];
|
||||
uint8_t num_samplers[6];
|
||||
uint8_t tls_required; /* bitmask of shader types using l[] */
|
||||
uint8_t c14_bound; /* whether immediate array constbuf is bound */
|
||||
uint8_t clip_enable;
|
||||
uint32_t clip_mode;
|
||||
uint32_t uniform_buffer_bound[5];
|
||||
struct nvc0_transform_feedback_state *tfb;
|
||||
};
|
||||
|
||||
struct nvc0_screen {
|
||||
struct nouveau_screen base;
|
||||
|
||||
struct nvc0_context *cur_ctx;
|
||||
struct nvc0_graph_state save_state;
|
||||
|
||||
int num_occlusion_queries_active;
|
||||
|
||||
|
@@ -543,6 +543,8 @@ nvc0_switch_pipe_context(struct nvc0_context *ctx_to)
|
||||
|
||||
if (ctx_from)
|
||||
ctx_to->state = ctx_from->state;
|
||||
else
|
||||
ctx_to->state = ctx_to->screen->save_state;
|
||||
|
||||
ctx_to->dirty = ~0;
|
||||
ctx_to->viewports_dirty = ~0;
|
||||
|
@@ -1152,6 +1152,12 @@ nvc0_blit_3d(struct nvc0_context *nvc0, const struct pipe_blit_info *info)
|
||||
NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_32 |
|
||||
NVC0_3D_VERTEX_ATTRIB_FORMAT_CONST);
|
||||
}
|
||||
if (nvc0->state.instance_elts) {
|
||||
nvc0->state.instance_elts = 0;
|
||||
BEGIN_NVC0(push, NVC0_3D(MACRO_VERTEX_ARRAY_PER_INSTANCE), 2);
|
||||
PUSH_DATA (push, n);
|
||||
PUSH_DATA (push, 0);
|
||||
}
|
||||
nvc0->state.num_vtxelts = 2;
|
||||
|
||||
for (i = 0; i < info->dst.box.depth; ++i, z += dz) {
|
||||
|
@@ -33,9 +33,10 @@ LOCAL_SRC_FILES := $(C_SOURCES)
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(MESA_TOP)/src/mapi \
|
||||
$(MESA_TOP)/src/glsl \
|
||||
$(MESA_TOP)/src/mesa \
|
||||
$(TARGET_OUT_HEADERS)/libdrm
|
||||
$(MESA_TOP)/src/mesa
|
||||
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm libdrm_radeon
|
||||
LOCAL_MODULE := libmesa_pipe_r300
|
||||
|
||||
include $(GALLIUM_COMMON_MK)
|
||||
|
@@ -5,7 +5,7 @@ TARGET_CPPFLAGS += -DGALLIUM_R300
|
||||
TARGET_LIB_DEPS += \
|
||||
$(top_builddir)/src/gallium/drivers/r300/libr300.la \
|
||||
$(RADEON_LIBS) \
|
||||
$(INTEL_LIBS)
|
||||
$(LIBDRM_LIBS)
|
||||
|
||||
TARGET_RADEON_WINSYS = \
|
||||
$(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la
|
||||
|
@@ -30,8 +30,7 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := $(C_SOURCES) $(CXX_SOURCES)
|
||||
|
||||
LOCAL_C_INCLUDES := $(TARGET_OUT_HEADERS)/libdrm
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm libdrm_radeon
|
||||
LOCAL_MODULE := libmesa_pipe_r600
|
||||
|
||||
include external/stlport/libstlport.mk
|
||||
|
@@ -30,8 +30,7 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := $(C_SOURCES)
|
||||
|
||||
LOCAL_C_INCLUDES := $(TARGET_OUT_HEADERS)/libdrm
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm libdrm_radeon
|
||||
LOCAL_MODULE := libmesa_pipe_radeon
|
||||
|
||||
include $(GALLIUM_COMMON_MK)
|
||||
|
@@ -30,8 +30,7 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := $(C_SOURCES)
|
||||
|
||||
LOCAL_C_INCLUDES := $(TARGET_OUT_HEADERS)/libdrm
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm libdrm_radeon
|
||||
LOCAL_MODULE := libmesa_pipe_radeonsi
|
||||
|
||||
include $(GALLIUM_COMMON_MK)
|
||||
|
@@ -2741,43 +2741,6 @@ static int si_generate_gs_copy_shader(struct si_screen *sscreen,
|
||||
return r;
|
||||
}
|
||||
|
||||
static void si_dump_key(unsigned shader, union si_shader_key *key)
|
||||
{
|
||||
int i;
|
||||
|
||||
fprintf(stderr, "SHADER KEY\n");
|
||||
|
||||
switch (shader) {
|
||||
case PIPE_SHADER_VERTEX:
|
||||
fprintf(stderr, " instance_divisors = {");
|
||||
for (i = 0; i < Elements(key->vs.instance_divisors); i++)
|
||||
fprintf(stderr, !i ? "%u" : ", %u",
|
||||
key->vs.instance_divisors[i]);
|
||||
fprintf(stderr, "}\n");
|
||||
|
||||
if (key->vs.as_es)
|
||||
fprintf(stderr, " gs_used_inputs = 0x%"PRIx64"\n",
|
||||
key->vs.gs_used_inputs);
|
||||
fprintf(stderr, " as_es = %u\n", key->vs.as_es);
|
||||
break;
|
||||
|
||||
case PIPE_SHADER_GEOMETRY:
|
||||
break;
|
||||
|
||||
case PIPE_SHADER_FRAGMENT:
|
||||
fprintf(stderr, " export_16bpc = 0x%X\n", key->ps.export_16bpc);
|
||||
fprintf(stderr, " last_cbuf = %u\n", key->ps.last_cbuf);
|
||||
fprintf(stderr, " color_two_side = %u\n", key->ps.color_two_side);
|
||||
fprintf(stderr, " alpha_func = %u\n", key->ps.alpha_func);
|
||||
fprintf(stderr, " alpha_to_one = %u\n", key->ps.alpha_to_one);
|
||||
fprintf(stderr, " poly_stipple = %u\n", key->ps.poly_stipple);
|
||||
break;
|
||||
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
|
||||
int si_shader_create(struct si_screen *sscreen, LLVMTargetMachineRef tm,
|
||||
struct si_shader *shader)
|
||||
{
|
||||
|
@@ -27,7 +27,7 @@ using namespace clover;
|
||||
|
||||
event::event(clover::context &ctx, const ref_vector<event> &deps,
|
||||
action action_ok, action action_fail) :
|
||||
context(ctx), _status(0), wait_count(1),
|
||||
context(ctx), wait_count(1), _status(0),
|
||||
action_ok(action_ok), action_fail(action_fail) {
|
||||
for (auto &ev : deps)
|
||||
ev.chain(*this);
|
||||
@@ -36,36 +36,69 @@ event::event(clover::context &ctx, const ref_vector<event> &deps,
|
||||
event::~event() {
|
||||
}
|
||||
|
||||
std::vector<intrusive_ref<event>>
|
||||
event::trigger_self() {
|
||||
std::lock_guard<std::mutex> lock(mutex);
|
||||
std::vector<intrusive_ref<event>> evs;
|
||||
|
||||
if (!--wait_count)
|
||||
std::swap(_chain, evs);
|
||||
|
||||
return evs;
|
||||
}
|
||||
|
||||
void
|
||||
event::trigger() {
|
||||
if (!--wait_count) {
|
||||
action_ok(*this);
|
||||
auto evs = trigger_self();
|
||||
|
||||
while (!_chain.empty()) {
|
||||
_chain.back()().trigger();
|
||||
_chain.pop_back();
|
||||
}
|
||||
if (signalled()) {
|
||||
action_ok(*this);
|
||||
cv.notify_all();
|
||||
}
|
||||
|
||||
for (event &ev : evs)
|
||||
ev.trigger();
|
||||
}
|
||||
|
||||
std::vector<intrusive_ref<event>>
|
||||
event::abort_self(cl_int status) {
|
||||
std::lock_guard<std::mutex> lock(mutex);
|
||||
std::vector<intrusive_ref<event>> evs;
|
||||
|
||||
_status = status;
|
||||
std::swap(_chain, evs);
|
||||
|
||||
return evs;
|
||||
}
|
||||
|
||||
void
|
||||
event::abort(cl_int status) {
|
||||
_status = status;
|
||||
auto evs = abort_self(status);
|
||||
|
||||
action_fail(*this);
|
||||
|
||||
while (!_chain.empty()) {
|
||||
_chain.back()().abort(status);
|
||||
_chain.pop_back();
|
||||
}
|
||||
for (event &ev : evs)
|
||||
ev.abort(status);
|
||||
}
|
||||
|
||||
bool
|
||||
event::signalled() const {
|
||||
std::lock_guard<std::mutex> lock(mutex);
|
||||
return !wait_count;
|
||||
}
|
||||
|
||||
cl_int
|
||||
event::status() const {
|
||||
std::lock_guard<std::mutex> lock(mutex);
|
||||
return _status;
|
||||
}
|
||||
|
||||
void
|
||||
event::chain(event &ev) {
|
||||
std::unique_lock<std::mutex> lock(mutex, std::defer_lock);
|
||||
std::unique_lock<std::mutex> lock_ev(ev.mutex, std::defer_lock);
|
||||
std::lock(lock, lock_ev);
|
||||
|
||||
if (wait_count) {
|
||||
ev.wait_count++;
|
||||
_chain.push_back(ev);
|
||||
@@ -73,6 +106,15 @@ event::chain(event &ev) {
|
||||
ev.deps.push_back(*this);
|
||||
}
|
||||
|
||||
void
|
||||
event::wait() const {
|
||||
for (event &ev : deps)
|
||||
ev.wait();
|
||||
|
||||
std::unique_lock<std::mutex> lock(mutex);
|
||||
cv.wait(lock, [=]{ return !wait_count; });
|
||||
}
|
||||
|
||||
hard_event::hard_event(command_queue &q, cl_command_type command,
|
||||
const ref_vector<event> &deps, action action) :
|
||||
event(q.context(), deps, profile(q, action), [](event &ev){}),
|
||||
@@ -93,8 +135,8 @@ cl_int
|
||||
hard_event::status() const {
|
||||
pipe_screen *screen = queue()->device().pipe;
|
||||
|
||||
if (_status < 0)
|
||||
return _status;
|
||||
if (event::status() < 0)
|
||||
return event::status();
|
||||
|
||||
else if (!_fence)
|
||||
return CL_QUEUED;
|
||||
@@ -120,6 +162,8 @@ void
|
||||
hard_event::wait() const {
|
||||
pipe_screen *screen = queue()->device().pipe;
|
||||
|
||||
event::wait();
|
||||
|
||||
if (status() == CL_QUEUED)
|
||||
queue()->flush();
|
||||
|
||||
@@ -182,8 +226,8 @@ soft_event::soft_event(clover::context &ctx, const ref_vector<event> &deps,
|
||||
|
||||
cl_int
|
||||
soft_event::status() const {
|
||||
if (_status < 0)
|
||||
return _status;
|
||||
if (event::status() < 0)
|
||||
return event::status();
|
||||
|
||||
else if (!signalled() ||
|
||||
any_of([](const event &ev) {
|
||||
@@ -207,8 +251,7 @@ soft_event::command() const {
|
||||
|
||||
void
|
||||
soft_event::wait() const {
|
||||
for (event &ev : deps)
|
||||
ev.wait();
|
||||
event::wait();
|
||||
|
||||
if (status() != CL_COMPLETE)
|
||||
throw error(CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST);
|
||||
|
@@ -23,6 +23,7 @@
|
||||
#ifndef CLOVER_CORE_EVENT_HPP
|
||||
#define CLOVER_CORE_EVENT_HPP
|
||||
|
||||
#include <condition_variable>
|
||||
#include <functional>
|
||||
|
||||
#include "core/object.hpp"
|
||||
@@ -65,24 +66,29 @@ namespace clover {
|
||||
void abort(cl_int status);
|
||||
bool signalled() const;
|
||||
|
||||
virtual cl_int status() const = 0;
|
||||
virtual cl_int status() const;
|
||||
virtual command_queue *queue() const = 0;
|
||||
virtual cl_command_type command() const = 0;
|
||||
virtual void wait() const = 0;
|
||||
virtual void wait() const;
|
||||
|
||||
const intrusive_ref<clover::context> context;
|
||||
|
||||
protected:
|
||||
void chain(event &ev);
|
||||
|
||||
cl_int _status;
|
||||
std::vector<intrusive_ref<event>> deps;
|
||||
|
||||
private:
|
||||
std::vector<intrusive_ref<event>> trigger_self();
|
||||
std::vector<intrusive_ref<event>> abort_self(cl_int status);
|
||||
|
||||
unsigned wait_count;
|
||||
cl_int _status;
|
||||
action action_ok;
|
||||
action action_fail;
|
||||
std::vector<intrusive_ref<event>> _chain;
|
||||
mutable std::condition_variable cv;
|
||||
mutable std::mutex mutex;
|
||||
};
|
||||
|
||||
///
|
||||
|
@@ -44,6 +44,7 @@ command_queue::flush() {
|
||||
pipe_screen *screen = device().pipe;
|
||||
pipe_fence_handle *fence = NULL;
|
||||
|
||||
std::lock_guard<std::mutex> lock(queued_events_mutex);
|
||||
if (!queued_events.empty()) {
|
||||
pipe->flush(pipe, &fence, 0);
|
||||
|
||||
@@ -69,6 +70,7 @@ command_queue::profiling_enabled() const {
|
||||
|
||||
void
|
||||
command_queue::sequence(hard_event &ev) {
|
||||
std::lock_guard<std::mutex> lock(queued_events_mutex);
|
||||
if (!queued_events.empty())
|
||||
queued_events.back()().chain(ev);
|
||||
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#define CLOVER_CORE_QUEUE_HPP
|
||||
|
||||
#include <deque>
|
||||
#include <mutex>
|
||||
|
||||
#include "core/object.hpp"
|
||||
#include "core/context.hpp"
|
||||
@@ -69,6 +70,7 @@ namespace clover {
|
||||
|
||||
cl_command_queue_properties props;
|
||||
pipe_context *pipe;
|
||||
std::mutex queued_events_mutex;
|
||||
std::deque<intrusive_ref<hard_event>> queued_events;
|
||||
};
|
||||
}
|
||||
|
@@ -42,7 +42,6 @@ nodist_EXTRA_lib@OSMESA_LIB@_la_SOURCES = dummy.cpp
|
||||
lib@OSMESA_LIB@_la_SOURCES = target.c
|
||||
|
||||
lib@OSMESA_LIB@_la_LDFLAGS = \
|
||||
-module \
|
||||
-no-undefined \
|
||||
-version-number @OSMESA_VERSION@ \
|
||||
$(GC_SECTIONS) \
|
||||
|
@@ -27,10 +27,7 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := $(C_SOURCES)
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(TARGET_OUT_HEADERS)/libdrm \
|
||||
$(TARGET_OUT_HEADERS)/freedreno
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm libdrm_freedreno
|
||||
LOCAL_MODULE := libmesa_winsys_freedreno
|
||||
|
||||
include $(GALLIUM_COMMON_MK)
|
||||
|
@@ -30,8 +30,7 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := $(C_SOURCES)
|
||||
|
||||
LOCAL_C_INCLUDES := $(TARGET_OUT_HEADERS)/libdrm
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm libdrm_intel
|
||||
LOCAL_MODULE := libmesa_winsys_i915
|
||||
|
||||
include $(GALLIUM_COMMON_MK)
|
||||
|
@@ -29,8 +29,7 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := $(C_SOURCES)
|
||||
|
||||
LOCAL_C_INCLUDES := $(TARGET_OUT_HEADERS)/libdrm
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm libdrm_intel
|
||||
LOCAL_MODULE := libmesa_winsys_intel
|
||||
|
||||
include $(GALLIUM_COMMON_MK)
|
||||
|
@@ -30,8 +30,7 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := $(C_SOURCES)
|
||||
|
||||
LOCAL_C_INCLUDES := $(TARGET_OUT_HEADERS)/libdrm
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm libdrm_nouveau
|
||||
LOCAL_MODULE := libmesa_winsys_nouveau
|
||||
|
||||
include $(GALLIUM_COMMON_MK)
|
||||
|
@@ -30,8 +30,7 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := $(C_SOURCES)
|
||||
|
||||
LOCAL_C_INCLUDES := $(TARGET_OUT_HEADERS)/libdrm
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm libdrm_radeon
|
||||
LOCAL_MODULE := libmesa_winsys_radeon
|
||||
|
||||
include $(GALLIUM_COMMON_MK)
|
||||
|
@@ -34,9 +34,9 @@ LOCAL_CFLAGS := -D_FILE_OFFSET_BITS=64
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(GALLIUM_TOP)/drivers/svga \
|
||||
$(GALLIUM_TOP)/drivers/svga/include \
|
||||
$(TARGET_OUT_HEADERS)/libdrm
|
||||
$(GALLIUM_TOP)/drivers/svga/include
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libdrm
|
||||
LOCAL_MODULE := libmesa_winsys_svga
|
||||
|
||||
include $(GALLIUM_COMMON_MK)
|
||||
|
@@ -33,11 +33,23 @@ sources := \
|
||||
glsl_lexer.cpp \
|
||||
glsl_parser.cpp \
|
||||
glcpp/glcpp-lex.c \
|
||||
glcpp/glcpp-parse.c
|
||||
glcpp/glcpp-parse.c \
|
||||
nir/nir_constant_expressions.c \
|
||||
nir/nir_opcodes.c \
|
||||
nir/nir_opcodes.h \
|
||||
nir/nir_opt_algebraic.c
|
||||
|
||||
LOCAL_SRC_FILES := $(filter-out $(sources), $(LOCAL_SRC_FILES))
|
||||
|
||||
LOCAL_C_INCLUDES += $(intermediates) $(intermediates)/glcpp $(MESA_TOP)/src/glsl/glcpp
|
||||
LOCAL_C_INCLUDES += \
|
||||
$(intermediates) \
|
||||
$(intermediates)/glcpp \
|
||||
$(intermediates)/nir \
|
||||
$(MESA_TOP)/src/glsl/glcpp \
|
||||
$(MESA_TOP)/src/glsl/nir
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDE_DIRS += \
|
||||
$(intermediates)/nir
|
||||
|
||||
sources := $(addprefix $(intermediates)/, $(sources))
|
||||
LOCAL_GENERATED_SOURCES += $(sources)
|
||||
@@ -77,3 +89,42 @@ $(intermediates)/glcpp/glcpp-lex.c: $(LOCAL_PATH)/glcpp/glcpp-lex.l
|
||||
|
||||
$(intermediates)/glcpp/glcpp-parse.c: $(LOCAL_PATH)/glcpp/glcpp-parse.y
|
||||
$(call glsl_local-y-to-c-and-h)
|
||||
|
||||
nir_constant_expressions_gen := $(LOCAL_PATH)/nir/nir_constant_expressions.py
|
||||
nir_constant_expressions_deps := \
|
||||
$(LOCAL_PATH)/nir/nir_opcodes.py \
|
||||
$(LOCAL_PATH)/nir/nir_constant_expressions.py \
|
||||
$(LOCAL_PATH)/nir/nir_constant_expressions.h
|
||||
|
||||
$(intermediates)/nir/nir_constant_expressions.c: $(nir_constant_expressions_deps)
|
||||
@mkdir -p $(dir $@)
|
||||
$(hide) $(MESA_PYTHON2) $(nir_constant_expressions_gen) $< > $@
|
||||
|
||||
nir_opcodes_h_gen := $(LOCAL_PATH)/nir/nir_opcodes_h.py
|
||||
nir_opcodes_h_deps := \
|
||||
$(LOCAL_PATH)/nir/nir_opcodes.py \
|
||||
$(LOCAL_PATH)/nir/nir_opcodes_h.py
|
||||
|
||||
$(intermediates)/nir/nir_opcodes.h: $(nir_opcodes_h_deps)
|
||||
@mkdir -p $(dir $@)
|
||||
$(hide) $(MESA_PYTHON2) $(nir_opcodes_h_gen) $< > $@
|
||||
|
||||
$(LOCAL_PATH)/nir/nir.h: $(intermediates)/nir/nir_opcodes.h
|
||||
|
||||
nir_opcodes_c_gen := $(LOCAL_PATH)/nir/nir_opcodes_c.py
|
||||
nir_opcodes_c_deps := \
|
||||
$(LOCAL_PATH)/nir/nir_opcodes.py \
|
||||
$(LOCAL_PATH)/nir/nir_opcodes_c.py
|
||||
|
||||
$(intermediates)/nir/nir_opcodes.c: $(nir_opcodes_c_deps)
|
||||
@mkdir -p $(dir $@)
|
||||
$(hide) $(MESA_PYTHON2) $(nir_opcodes_c_gen) $< > $@
|
||||
|
||||
nir_opt_algebraic_gen := $(LOCAL_PATH)/nir/nir_opt_algebraic.py
|
||||
nir_opt_algebraic_deps := \
|
||||
$(LOCAL_PATH)/nir/nir_opt_algebraic.py \
|
||||
$(LOCAL_PATH)/nir/nir_algebraic.py
|
||||
|
||||
$(intermediates)/nir/nir_opt_algebraic.c: $(nir_opt_algebraic_deps)
|
||||
@mkdir -p $(dir $@)
|
||||
$(hide) $(MESA_PYTHON2) $(nir_opt_algebraic_gen) $< > $@
|
||||
|
@@ -35,10 +35,10 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
$(LIBGLCPP_FILES) \
|
||||
$(LIBGLSL_FILES)
|
||||
$(LIBGLSL_FILES) \
|
||||
$(NIR_FILES)
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(MESA_TOP)/src \
|
||||
$(MESA_TOP)/src/mapi \
|
||||
$(MESA_TOP)/src/mesa
|
||||
|
||||
@@ -59,7 +59,6 @@ LOCAL_SRC_FILES := \
|
||||
$(GLSL_COMPILER_CXX_FILES)
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(MESA_TOP)/src \
|
||||
$(MESA_TOP)/src/mapi \
|
||||
$(MESA_TOP)/src/mesa
|
||||
|
||||
|
@@ -690,24 +690,27 @@ glsl_type::record_key_compare(const void *a, const void *b)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generate an integer hash value for a glsl_type structure type.
|
||||
*/
|
||||
unsigned
|
||||
glsl_type::record_key_hash(const void *a)
|
||||
{
|
||||
const glsl_type *const key = (glsl_type *) a;
|
||||
char hash_key[128];
|
||||
unsigned size = 0;
|
||||
|
||||
size = snprintf(hash_key, sizeof(hash_key), "%08x", key->length);
|
||||
uintptr_t hash = key->length;
|
||||
unsigned retval;
|
||||
|
||||
for (unsigned i = 0; i < key->length; i++) {
|
||||
if (size >= sizeof(hash_key))
|
||||
break;
|
||||
|
||||
size += snprintf(& hash_key[size], sizeof(hash_key) - size,
|
||||
"%p", (void *) key->fields.structure[i].type);
|
||||
/* casting pointer to uintptr_t */
|
||||
hash = (hash * 13 ) + (uintptr_t) key->fields.structure[i].type;
|
||||
}
|
||||
|
||||
return hash_table_string_hash(& hash_key);
|
||||
if (sizeof(hash) == 8)
|
||||
retval = (hash & 0xffffffff) ^ ((uint64_t) hash >> 32);
|
||||
else
|
||||
retval = hash;
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -101,7 +101,7 @@ optimizations = [
|
||||
(('ishr', 0, a), 0),
|
||||
(('ishr', a, 0), a),
|
||||
(('ushr', 0, a), 0),
|
||||
(('ushr', a, 0), 0),
|
||||
(('ushr', a, 0), a),
|
||||
# Exponential/logarithmic identities
|
||||
(('fexp2', ('flog2', a)), a), # 2^lg2(a) = a
|
||||
(('fexp', ('flog', a)), a), # e^ln(a) = a
|
||||
|
@@ -1985,6 +1985,11 @@ dri3_create_screen(int screen, struct glx_display * priv)
|
||||
goto handle_error;
|
||||
}
|
||||
|
||||
if (psc->is_different_gpu && !psc->image->blitImage) {
|
||||
ErrorMessageF("Different GPU, but blitImage not implemented for this driver\n");
|
||||
goto handle_error;
|
||||
}
|
||||
|
||||
if (!psc->is_different_gpu && (
|
||||
!psc->texBuffer || psc->texBuffer->base.version < 2 ||
|
||||
!psc->texBuffer->setTexBuffer2
|
||||
|
@@ -37,7 +37,7 @@ LOCAL_SRC_FILES := \
|
||||
ifeq ($(MESA_GPU_DRIVERS),swrast)
|
||||
LOCAL_CFLAGS += -D__NOT_HAVE_DRM_H
|
||||
else
|
||||
LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/libdrm
|
||||
LOCAL_SHARED_LIBRARIES := libdrm
|
||||
endif
|
||||
|
||||
LOCAL_MODULE := libmesa_loader
|
||||
|
@@ -34,6 +34,9 @@ sources := \
|
||||
main/enums.c \
|
||||
main/api_exec.c \
|
||||
main/dispatch.h \
|
||||
main/format_pack.c \
|
||||
main/format_unpack.c \
|
||||
main/format_info.h \
|
||||
main/remap_helper.h \
|
||||
main/get_hash.h
|
||||
|
||||
@@ -124,3 +127,21 @@ format_info_deps := \
|
||||
|
||||
$(intermediates)/main/format_info.h: $(format_info_deps)
|
||||
@$(MESA_PYTHON2) $(FORMAT_INFO) $< > $@
|
||||
|
||||
FORMAT_PACK := $(LOCAL_PATH)/main/format_pack.py
|
||||
format_pack_deps := \
|
||||
$(LOCAL_PATH)/main/formats.csv \
|
||||
$(LOCAL_PATH)/main/format_parser.py \
|
||||
$(FORMAT_PACK)
|
||||
|
||||
$(intermediates)/main/format_pack.c: $(format_pack_deps)
|
||||
$(hide) $(MESA_PYTHON2) $(FORMAT_PACK) $< > $@
|
||||
|
||||
FORMAT_UNPACK := $(LOCAL_PATH)/main/format_unpack.py
|
||||
format_unpack_deps := \
|
||||
$(LOCAL_PATH)/main/formats.csv \
|
||||
$(LOCAL_PATH)/main/format_parser.py \
|
||||
$(FORMAT_UNPACK)
|
||||
|
||||
$(intermediates)/main/format_unpack.c: $(format_unpack_deps)
|
||||
$(hide) $(MESA_PYTHON2) $(FORMAT_UNPACK) $< > $@
|
||||
|
@@ -49,8 +49,8 @@ endif # MESA_ENABLE_ASM
|
||||
|
||||
ifeq ($(ARCH_X86_HAVE_SSE4_1),true)
|
||||
LOCAL_SRC_FILES += \
|
||||
$(SRCDIR)main/streaming-load-memcpy.c \
|
||||
$(SRCDIR)main/sse_minmax.c
|
||||
main/streaming-load-memcpy.c \
|
||||
mesa/main/sse_minmax.c
|
||||
LOCAL_CFLAGS := -msse4.1
|
||||
endif
|
||||
|
||||
@@ -61,8 +61,8 @@ endif
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(call intermediates-dir-for STATIC_LIBRARIES,libmesa_program,,) \
|
||||
$(MESA_TOP)/src \
|
||||
$(MESA_TOP)/src/mapi \
|
||||
$(MESA_TOP)/src/mesa/main \
|
||||
$(MESA_TOP)/src/glsl \
|
||||
$(MESA_TOP)/src/gallium/auxiliary
|
||||
|
||||
|
@@ -36,7 +36,6 @@ include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := libmesa_glsl_utils
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(MESA_TOP)/src \
|
||||
$(MESA_TOP)/src/glsl \
|
||||
$(MESA_TOP)/src/mapi
|
||||
|
||||
@@ -59,7 +58,6 @@ LOCAL_IS_HOST_MODULE := true
|
||||
LOCAL_CFLAGS := -D_POSIX_C_SOURCE=199309L
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(MESA_TOP)/src \
|
||||
$(MESA_TOP)/src/glsl \
|
||||
$(MESA_TOP)/src/mapi
|
||||
|
||||
|
@@ -53,11 +53,11 @@ endif
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(call intermediates-dir-for STATIC_LIBRARIES,libmesa_program,,) \
|
||||
$(MESA_TOP)/src/gallium/auxiliary \
|
||||
$(MESA_TOP)/src/gallium/include \
|
||||
$(MESA_TOP)/src \
|
||||
$(MESA_TOP)/src/mapi \
|
||||
$(MESA_TOP)/src/mesa/main \
|
||||
$(MESA_TOP)/src/glsl \
|
||||
$(MESA_TOP)/src/mapi
|
||||
$(MESA_TOP)/src/gallium/auxiliary \
|
||||
$(MESA_TOP)/src/gallium/include
|
||||
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES := \
|
||||
libmesa_program
|
||||
|
@@ -35,17 +35,16 @@ MESA_DRI_CFLAGS := \
|
||||
-DHAVE_ANDROID_PLATFORM
|
||||
|
||||
MESA_DRI_C_INCLUDES := \
|
||||
$(MESA_TOP)/src \
|
||||
$(call intermediates-dir-for,STATIC_LIBRARIES,libmesa_dri_common) \
|
||||
$(addprefix $(MESA_TOP)/, $(mesa_dri_common_INCLUDES)) \
|
||||
$(TARGET_OUT_HEADERS)/libdrm \
|
||||
external/expat/lib
|
||||
|
||||
MESA_DRI_WHOLE_STATIC_LIBRARIES := \
|
||||
libmesa_glsl \
|
||||
libmesa_megadriver_stub \
|
||||
libmesa_dri_common \
|
||||
libmesa_dricore
|
||||
libmesa_dricore \
|
||||
libmesa_util
|
||||
|
||||
MESA_DRI_SHARED_LIBRARIES := \
|
||||
libcutils \
|
||||
|
@@ -40,6 +40,13 @@ LOCAL_C_INCLUDES := \
|
||||
$(intermediates) \
|
||||
$(MESA_DRI_C_INCLUDES)
|
||||
|
||||
# swrast only
|
||||
ifeq ($(MESA_GPU_DRIVERS),swrast)
|
||||
LOCAL_CFLAGS := -D__NOT_HAVE_DRM_H
|
||||
else
|
||||
LOCAL_SHARED_LIBRARIES := libdrm
|
||||
endif
|
||||
|
||||
LOCAL_SRC_FILES := $(DRI_COMMON_FILES)
|
||||
|
||||
LOCAL_GENERATED_SOURCES := \
|
||||
@@ -99,6 +106,13 @@ LOCAL_MODULE_CLASS := STATIC_LIBRARIES
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(MESA_DRI_C_INCLUDES)
|
||||
|
||||
# swrast only
|
||||
ifeq ($(MESA_GPU_DRIVERS),swrast)
|
||||
LOCAL_CFLAGS := -D__NOT_HAVE_DRM_H
|
||||
else
|
||||
LOCAL_SHARED_LIBRARIES := libdrm
|
||||
endif
|
||||
|
||||
LOCAL_SRC_FILES := $(megadriver_stub_FILES)
|
||||
|
||||
include $(MESA_COMMON_MK)
|
||||
|
@@ -91,5 +91,9 @@ TODO: document the other workarounds.
|
||||
<application name="Dead Island" executable="DeadIslandGame">
|
||||
<option name="allow_glsl_extension_directive_midshader" value="true" />
|
||||
</application>
|
||||
|
||||
<application name="Second Life" executable="do-not-directly-run-secondlife-bin">
|
||||
<option name="allow_glsl_extension_directive_midshader" value="true" />
|
||||
</application>
|
||||
</device>
|
||||
</driconf>
|
||||
|
@@ -1683,6 +1683,15 @@ fs_visitor::emit_texture_gen7(ir_texture_opcode op, fs_reg dst,
|
||||
offset_value.file != BAD_FILE && offset_value.file != IMM;
|
||||
bool coordinate_done = false;
|
||||
|
||||
/* The sampler can only meaningfully compute LOD for fragment shader
|
||||
* messages. For all other stages, we change the opcode to ir_txl and
|
||||
* hardcode the LOD to 0.
|
||||
*/
|
||||
if (stage != MESA_SHADER_FRAGMENT && op == ir_tex) {
|
||||
op = ir_txl;
|
||||
lod = fs_reg(0.0f);
|
||||
}
|
||||
|
||||
/* Set up the LOD info */
|
||||
switch (op) {
|
||||
case ir_tex:
|
||||
|
@@ -476,6 +476,8 @@ brw_query_counter(struct gl_context *ctx, struct gl_query_object *q)
|
||||
drm_intel_bo_unreference(query->bo);
|
||||
query->bo = drm_intel_bo_alloc(brw->bufmgr, "timestamp query", 4096, 4096);
|
||||
brw_write_timestamp(brw, query->bo, 0);
|
||||
|
||||
query->flushed = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -271,6 +271,20 @@ intel_miptree_blit(struct brw_context *brw,
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
alignment_valid(struct brw_context *brw, unsigned offset, uint32_t tiling)
|
||||
{
|
||||
/* Tiled buffers must be page-aligned (4K). */
|
||||
if (tiling != I915_TILING_NONE)
|
||||
return (offset & 4095) == 0;
|
||||
|
||||
/* On Gen8+, linear buffers must be cacheline-aligned. */
|
||||
if (brw->gen >= 8)
|
||||
return (offset & 63) == 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Copy BitBlt
|
||||
*/
|
||||
bool
|
||||
@@ -296,14 +310,11 @@ intelEmitCopyBlit(struct brw_context *brw,
|
||||
bool dst_y_tiled = dst_tiling == I915_TILING_Y;
|
||||
bool src_y_tiled = src_tiling == I915_TILING_Y;
|
||||
|
||||
if (dst_tiling != I915_TILING_NONE) {
|
||||
if (dst_offset & 4095)
|
||||
return false;
|
||||
}
|
||||
if (src_tiling != I915_TILING_NONE) {
|
||||
if (src_offset & 4095)
|
||||
return false;
|
||||
}
|
||||
if (!alignment_valid(brw, dst_offset, dst_tiling))
|
||||
return false;
|
||||
if (!alignment_valid(brw, src_offset, src_tiling))
|
||||
return false;
|
||||
|
||||
if ((dst_y_tiled || src_y_tiled) && brw->gen < 6)
|
||||
return false;
|
||||
|
||||
@@ -524,6 +535,7 @@ intel_emit_linear_blit(struct brw_context *brw,
|
||||
{
|
||||
struct gl_context *ctx = &brw->ctx;
|
||||
GLuint pitch, height;
|
||||
int16_t src_x, dst_x;
|
||||
bool ok;
|
||||
|
||||
/* The pitch given to the GPU must be DWORD aligned, and
|
||||
@@ -532,11 +544,13 @@ intel_emit_linear_blit(struct brw_context *brw,
|
||||
*/
|
||||
pitch = ROUND_DOWN_TO(MIN2(size, (1 << 15) - 1), 4);
|
||||
height = (pitch == 0) ? 1 : size / pitch;
|
||||
src_x = src_offset % 64;
|
||||
dst_x = dst_offset % 64;
|
||||
ok = intelEmitCopyBlit(brw, 1,
|
||||
pitch, src_bo, src_offset, I915_TILING_NONE,
|
||||
pitch, dst_bo, dst_offset, I915_TILING_NONE,
|
||||
0, 0, /* src x/y */
|
||||
0, 0, /* dst x/y */
|
||||
pitch, src_bo, src_offset - src_x, I915_TILING_NONE,
|
||||
pitch, dst_bo, dst_offset - dst_x, I915_TILING_NONE,
|
||||
src_x, 0, /* src x/y */
|
||||
dst_x, 0, /* dst x/y */
|
||||
pitch, height, /* w, h */
|
||||
GL_COPY);
|
||||
if (!ok)
|
||||
@@ -544,15 +558,18 @@ intel_emit_linear_blit(struct brw_context *brw,
|
||||
|
||||
src_offset += pitch * height;
|
||||
dst_offset += pitch * height;
|
||||
src_x = src_offset % 64;
|
||||
dst_x = dst_offset % 64;
|
||||
size -= pitch * height;
|
||||
assert (size < (1 << 15));
|
||||
pitch = ALIGN(size, 4);
|
||||
|
||||
if (size != 0) {
|
||||
ok = intelEmitCopyBlit(brw, 1,
|
||||
pitch, src_bo, src_offset, I915_TILING_NONE,
|
||||
pitch, dst_bo, dst_offset, I915_TILING_NONE,
|
||||
0, 0, /* src x/y */
|
||||
0, 0, /* dst x/y */
|
||||
pitch, src_bo, src_offset - src_x, I915_TILING_NONE,
|
||||
pitch, dst_bo, dst_offset - dst_x, I915_TILING_NONE,
|
||||
src_x, 0, /* src x/y */
|
||||
dst_x, 0, /* dst x/y */
|
||||
size, 1, /* w, h */
|
||||
GL_COPY);
|
||||
if (!ok)
|
||||
|
@@ -226,8 +226,30 @@ intelReadPixels(struct gl_context * ctx,
|
||||
|
||||
if (_mesa_is_bufferobj(pack->BufferObj)) {
|
||||
if (_mesa_meta_pbo_GetTexSubImage(ctx, 2, NULL, x, y, 0, width, height, 1,
|
||||
format, type, pixels, pack))
|
||||
format, type, pixels, pack)) {
|
||||
/* _mesa_meta_pbo_GetTexSubImage() implements PBO transfers by
|
||||
* binding the user-provided BO as a fake framebuffer and rendering
|
||||
* to it. This breaks the invariant of the GL that nothing is able
|
||||
* to render to a BO, causing nondeterministic corruption issues
|
||||
* because the render cache is not coherent with a number of other
|
||||
* caches that the BO could potentially be bound to afterwards.
|
||||
*
|
||||
* This could be solved in the same way that we guarantee texture
|
||||
* coherency after a texture is attached to a framebuffer and
|
||||
* rendered to, but that would involve checking *all* BOs bound to
|
||||
* the pipeline for the case we need to emit a cache flush due to
|
||||
* previous rendering to any of them -- Including vertex, index,
|
||||
* uniform, atomic counter, shader image, transform feedback,
|
||||
* indirect draw buffers, etc.
|
||||
*
|
||||
* That would increase the per-draw call overhead even though it's
|
||||
* very unlikely that any of the BOs bound to the pipeline has been
|
||||
* rendered to via a PBO at any point, so it seems better to just
|
||||
* flush here unconditionally.
|
||||
*/
|
||||
intel_batchbuffer_emit_mi_flush(brw);
|
||||
return;
|
||||
}
|
||||
|
||||
perf_debug("%s: fallback to CPU mapping in PBO case\n", __FUNCTION__);
|
||||
}
|
||||
|
@@ -1126,7 +1126,8 @@ intel_screen_make_configs(__DRIscreen *dri_screen)
|
||||
{
|
||||
static const mesa_format formats[] = {
|
||||
MESA_FORMAT_B5G6R5_UNORM,
|
||||
MESA_FORMAT_B8G8R8A8_UNORM
|
||||
MESA_FORMAT_B8G8R8A8_UNORM,
|
||||
MESA_FORMAT_B8G8R8X8_UNORM
|
||||
};
|
||||
|
||||
/* GLX_SWAP_COPY_OML is not supported due to page flipping. */
|
||||
|
@@ -476,8 +476,15 @@ intel_get_tex_image(struct gl_context *ctx,
|
||||
if (_mesa_meta_pbo_GetTexSubImage(ctx, 3, texImage, 0, 0, 0,
|
||||
texImage->Width, texImage->Height,
|
||||
texImage->Depth, format, type,
|
||||
pixels, &ctx->Pack))
|
||||
pixels, &ctx->Pack)) {
|
||||
/* Flush to guarantee coherency between the render cache and other
|
||||
* caches the PBO could potentially be bound to after this point.
|
||||
* See the related comment in intelReadPixels() for a more detailed
|
||||
* explanation.
|
||||
*/
|
||||
intel_batchbuffer_emit_mi_flush(brw);
|
||||
return;
|
||||
}
|
||||
|
||||
perf_debug("%s: fallback to CPU mapping in PBO case\n", __FUNCTION__);
|
||||
}
|
||||
|
@@ -60,6 +60,11 @@
|
||||
#include "swrast_priv.h"
|
||||
#include "swrast/s_context.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_SYS_SYSCTL_H
|
||||
# include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
const __DRIextension **__driDriverGetExtensions_swrast(void);
|
||||
|
||||
const char * const swrast_vendor_string = "Mesa Project";
|
||||
@@ -136,6 +141,16 @@ swrast_query_renderer_integer(__DRIscreen *psp, int param,
|
||||
value[0] = 0;
|
||||
return 0;
|
||||
case __DRI2_RENDERER_VIDEO_MEMORY: {
|
||||
/* This should probably share code with os_get_total_physical_memory()
|
||||
* from src/gallium/auxiliary/os/os_misc.c
|
||||
*/
|
||||
#if defined(CTL_HW) && defined(HW_MEMSIZE)
|
||||
int mib[2] = { CTL_HW, HW_MEMSIZE };
|
||||
unsigned long system_memory_bytes;
|
||||
size_t len = sizeof(system_memory_bytes);
|
||||
if (sysctl(mib, 2, &system_memory_bytes, &len, NULL, 0) != 0)
|
||||
return -1;
|
||||
#elif defined(_SC_PHYS_PAGES) && defined(_SC_PAGE_SIZE)
|
||||
/* XXX: Do we want to return the full amount of system memory ? */
|
||||
const long system_memory_pages = sysconf(_SC_PHYS_PAGES);
|
||||
const long system_page_size = sysconf(_SC_PAGE_SIZE);
|
||||
@@ -145,6 +160,9 @@ swrast_query_renderer_integer(__DRIscreen *psp, int param,
|
||||
|
||||
const uint64_t system_memory_bytes = (uint64_t) system_memory_pages
|
||||
* (uint64_t) system_page_size;
|
||||
#else
|
||||
#error "Unsupported platform"
|
||||
#endif
|
||||
|
||||
const unsigned system_memory_megabytes =
|
||||
(unsigned) (system_memory_bytes / (1024 * 1024));
|
||||
|
@@ -39,7 +39,6 @@ nodist_EXTRA_lib@OSMESA_LIB@_la_SOURCES = dummy.cpp
|
||||
lib@OSMESA_LIB@_la_SOURCES = osmesa.c
|
||||
|
||||
lib@OSMESA_LIB@_la_LDFLAGS = \
|
||||
-module \
|
||||
-no-undefined \
|
||||
-version-number @OSMESA_VERSION@ \
|
||||
$(GC_SECTIONS) \
|
||||
|
@@ -2387,7 +2387,7 @@ framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target,
|
||||
GLboolean err = GL_TRUE;
|
||||
|
||||
texObj = _mesa_lookup_texture(ctx, texture);
|
||||
if (texObj != NULL) {
|
||||
if (texObj != NULL && texObj->Target != 0) {
|
||||
if (textarget == 0) {
|
||||
if (layered) {
|
||||
/* We're being called by glFramebufferTexture() and textarget
|
||||
@@ -2438,10 +2438,19 @@ framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target,
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* can't render to a non-existant texture */
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glFramebufferTexture%s(non existant texture)",
|
||||
caller);
|
||||
/* Can't render to a non-existent texture object.
|
||||
*
|
||||
* The OpenGL 4.5 core spec (02.02.2015) in Section 9.2 Binding and
|
||||
* Managing Framebuffer Objects specifies a different error
|
||||
* depending upon the calling function (PDF pages 325-328).
|
||||
* *FramebufferTexture (where layered = GL_TRUE) throws invalid
|
||||
* value, while the other commands throw invalid operation (where
|
||||
* layered = GL_FALSE).
|
||||
*/
|
||||
const GLenum error = layered ? GL_INVALID_VALUE :
|
||||
GL_INVALID_OPERATION;
|
||||
_mesa_error(ctx, error,
|
||||
"%s(non-existent texture %u)", caller, texture);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2452,6 +2461,18 @@ framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target,
|
||||
return;
|
||||
}
|
||||
|
||||
/* Page 306 (page 328 of the PDF) of the OpenGL 4.5 (Core Profile)
|
||||
* spec says:
|
||||
*
|
||||
* "An INVALID_VALUE error is generated if texture is non-zero
|
||||
* and layer is negative."
|
||||
*/
|
||||
if (zoffset < 0) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE,
|
||||
"glFramebufferTexture%s(layer %u < 0)", caller, zoffset);
|
||||
return;
|
||||
}
|
||||
|
||||
if (texObj->Target == GL_TEXTURE_3D) {
|
||||
const GLuint maxSize = 1 << (ctx->Const.Max3DTextureLevels - 1);
|
||||
if (zoffset >= maxSize) {
|
||||
@@ -3062,12 +3083,29 @@ invalidate_framebuffer_storage(GLenum target, GLsizei numAttachments,
|
||||
return;
|
||||
}
|
||||
|
||||
/* Section 17.4 Whole Framebuffer Operations of the OpenGL 4.5 Core
|
||||
* Spec (2.2.2015, PDF page 522) says:
|
||||
* "An INVALID_VALUE error is generated if numAttachments, width, or
|
||||
* height is negative."
|
||||
*/
|
||||
if (numAttachments < 0) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE,
|
||||
"%s(numAttachments < 0)", name);
|
||||
return;
|
||||
}
|
||||
|
||||
if (width < 0) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE,
|
||||
"%s(width < 0)", name);
|
||||
return;
|
||||
}
|
||||
|
||||
if (height < 0) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE,
|
||||
"%s(height < 0)", name);
|
||||
return;
|
||||
}
|
||||
|
||||
/* The GL_ARB_invalidate_subdata spec says:
|
||||
*
|
||||
* "If an attachment is specified that does not exist in the
|
||||
@@ -3160,7 +3198,8 @@ invalidate_framebuffer_storage(GLenum target, GLsizei numAttachments,
|
||||
return;
|
||||
|
||||
invalid_enum:
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "%s(attachment)", name);
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "%s(invalid attachment %s)", name,
|
||||
_mesa_lookup_enum_by_nr(attachments[i]));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -135,7 +135,7 @@ static GLboolean check_active_shininess( struct gl_context *ctx,
|
||||
(key->light_color_material_mask & (1 << attr)))
|
||||
return GL_TRUE;
|
||||
|
||||
if (key->varying_vp_inputs & VERT_ATTRIB_GENERIC(attr))
|
||||
if (key->varying_vp_inputs & VERT_BIT_GENERIC(attr))
|
||||
return GL_TRUE;
|
||||
|
||||
if (ctx->Light.Material.Attrib[attr][0] != 0.0F)
|
||||
|
@@ -1911,6 +1911,7 @@ find_value_indexed(const char *func, GLenum pname, GLuint index, union value *v)
|
||||
if (index >= ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs)
|
||||
goto invalid_value;
|
||||
v->value_int = ctx->Array.VAO->VertexBinding[VERT_ATTRIB_GENERIC(index)].Stride;
|
||||
return TYPE_INT;
|
||||
|
||||
/* ARB_shader_image_load_store */
|
||||
case GL_IMAGE_BINDING_NAME: {
|
||||
|
@@ -71,7 +71,6 @@ $(intermediates)/program/lex.yy.c: $(LOCAL_PATH)/program_lexer.l
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(intermediates) \
|
||||
$(MESA_TOP)/src \
|
||||
$(MESA_TOP)/src/mapi \
|
||||
$(MESA_TOP)/src/mesa \
|
||||
$(MESA_TOP)/src/glsl
|
||||
|
@@ -741,6 +741,11 @@ st_TexSubImage(struct gl_context *ctx, GLuint dims,
|
||||
if (gl_target == GL_TEXTURE_CUBE_MAP) {
|
||||
gl_target = GL_TEXTURE_2D;
|
||||
}
|
||||
/* TexSubImage can specify subsets of cube map array faces
|
||||
* so we need to upload via 2D array instead */
|
||||
if (gl_target == GL_TEXTURE_CUBE_MAP_ARRAY) {
|
||||
gl_target = GL_TEXTURE_2D_ARRAY;
|
||||
}
|
||||
|
||||
/* Initialize the source texture description. */
|
||||
memset(&src_templ, 0, sizeof(src_templ));
|
||||
|
@@ -1832,7 +1832,7 @@ glsl_to_tgsi_visitor::visit(ir_expression *ir)
|
||||
break;
|
||||
case ir_unop_i2b:
|
||||
if (native_integers)
|
||||
emit(ir, TGSI_OPCODE_INEG, result_dst, op[0]);
|
||||
emit(ir, TGSI_OPCODE_USNE, result_dst, op[0], st_src_reg_for_int(0));
|
||||
else
|
||||
emit(ir, TGSI_OPCODE_SNE, result_dst, op[0], st_src_reg_for_float(0.0));
|
||||
break;
|
||||
@@ -2860,7 +2860,7 @@ glsl_to_tgsi_visitor::visit(ir_texture *ir)
|
||||
break;
|
||||
case ir_query_levels:
|
||||
opcode = TGSI_OPCODE_TXQ;
|
||||
lod_info = st_src_reg(PROGRAM_IMMEDIATE, 0, GLSL_TYPE_INT);
|
||||
lod_info = undef_src;
|
||||
levels_src = get_temp(ir->type);
|
||||
break;
|
||||
case ir_txf:
|
||||
@@ -4152,6 +4152,7 @@ struct st_translate {
|
||||
|
||||
struct ureg_dst arrays[MAX_ARRAYS];
|
||||
struct ureg_src *constants;
|
||||
int num_constants;
|
||||
struct ureg_src *immediates;
|
||||
struct ureg_dst outputs[PIPE_MAX_SHADER_OUTPUTS];
|
||||
struct ureg_src inputs[PIPE_MAX_SHADER_INPUTS];
|
||||
@@ -4352,7 +4353,7 @@ src_register(struct st_translate *t, const struct st_src_reg *reg)
|
||||
{
|
||||
switch(reg->file) {
|
||||
case PROGRAM_UNDEFINED:
|
||||
return ureg_src_undef();
|
||||
return ureg_imm4f(t->ureg, 0, 0, 0, 0);
|
||||
|
||||
case PROGRAM_TEMPORARY:
|
||||
case PROGRAM_ARRAY:
|
||||
@@ -4360,15 +4361,15 @@ src_register(struct st_translate *t, const struct st_src_reg *reg)
|
||||
|
||||
case PROGRAM_UNIFORM:
|
||||
assert(reg->index >= 0);
|
||||
return t->constants[reg->index];
|
||||
return reg->index < t->num_constants ?
|
||||
t->constants[reg->index] : ureg_imm4f(t->ureg, 0, 0, 0, 0);
|
||||
case PROGRAM_STATE_VAR:
|
||||
case PROGRAM_CONSTANT: /* ie, immediate */
|
||||
if (reg->has_index2)
|
||||
return ureg_src_register(TGSI_FILE_CONSTANT, reg->index);
|
||||
else if (reg->index < 0)
|
||||
return ureg_DECL_constant(t->ureg, 0);
|
||||
else
|
||||
return t->constants[reg->index];
|
||||
return reg->index >= 0 && reg->index < t->num_constants ?
|
||||
t->constants[reg->index] : ureg_imm4f(t->ureg, 0, 0, 0, 0);
|
||||
|
||||
case PROGRAM_IMMEDIATE:
|
||||
return t->immediates[reg->index];
|
||||
@@ -4550,10 +4551,8 @@ compile_tgsi_instruction(struct st_translate *t,
|
||||
inst->saturate,
|
||||
clamp_dst_color_output);
|
||||
|
||||
for (i = 0; i < num_src; i++) {
|
||||
assert(inst->src[i].file != PROGRAM_UNDEFINED);
|
||||
for (i = 0; i < num_src; i++)
|
||||
src[i] = translate_src(t, &inst->src[i]);
|
||||
}
|
||||
|
||||
switch(inst->op) {
|
||||
case TGSI_OPCODE_BGNLOOP:
|
||||
@@ -5083,6 +5082,7 @@ st_translate_program(
|
||||
ret = PIPE_ERROR_OUT_OF_MEMORY;
|
||||
goto out;
|
||||
}
|
||||
t->num_constants = proginfo->Parameters->NumParameters;
|
||||
|
||||
for (i = 0; i < proginfo->Parameters->NumParameters; i++) {
|
||||
switch (proginfo->Parameters->Parameters[i].Type) {
|
||||
@@ -5182,6 +5182,7 @@ out:
|
||||
free(t->insn);
|
||||
free(t->labels);
|
||||
free(t->constants);
|
||||
t->num_constants = 0;
|
||||
free(t->immediates);
|
||||
|
||||
if (t->error) {
|
||||
|
@@ -177,7 +177,7 @@ st_gl_texture_dims_to_pipe_dims(GLenum texture,
|
||||
*widthOut = widthIn;
|
||||
*heightOut = heightIn;
|
||||
*depthOut = 1;
|
||||
*layersOut = depthIn;
|
||||
*layersOut = util_align_npot(depthIn, 6);
|
||||
break;
|
||||
default:
|
||||
assert(0 && "Unexpected texture in st_gl_texture_dims_to_pipe_dims()");
|
||||
|
@@ -167,6 +167,8 @@ vbo_sw_primitive_restart(struct gl_context *ctx,
|
||||
struct gl_buffer_object *indirect)
|
||||
{
|
||||
GLuint prim_num;
|
||||
struct _mesa_prim new_prim;
|
||||
struct _mesa_index_buffer new_ib;
|
||||
struct sub_primitive *sub_prims;
|
||||
struct sub_primitive *sub_prim;
|
||||
GLuint num_sub_prims;
|
||||
@@ -182,8 +184,6 @@ vbo_sw_primitive_restart(struct gl_context *ctx,
|
||||
|
||||
/* If there is an indirect buffer, map it and extract the draw params */
|
||||
if (indirect && prims[0].is_indirect) {
|
||||
struct _mesa_prim new_prim = *prims;
|
||||
struct _mesa_index_buffer new_ib = *ib;
|
||||
const uint32_t *indirect_params;
|
||||
if (!ctx->Driver.MapBufferRange(ctx, 0, indirect->Size, GL_MAP_READ_BIT,
|
||||
indirect, MAP_INTERNAL)) {
|
||||
@@ -195,6 +195,7 @@ vbo_sw_primitive_restart(struct gl_context *ctx,
|
||||
}
|
||||
|
||||
assert(nr_prims == 1);
|
||||
new_prim = prims[0];
|
||||
indirect_params = (const uint32_t *)
|
||||
ADD_POINTERS(indirect->Mappings[MAP_INTERNAL].Pointer,
|
||||
new_prim.indirect_offset);
|
||||
@@ -206,6 +207,7 @@ vbo_sw_primitive_restart(struct gl_context *ctx,
|
||||
new_prim.basevertex = indirect_params[3];
|
||||
new_prim.base_instance = indirect_params[4];
|
||||
|
||||
new_ib = *ib;
|
||||
new_ib.count = new_prim.count;
|
||||
|
||||
prims = &new_prim;
|
||||
|
@@ -35,8 +35,7 @@ LOCAL_SRC_FILES := \
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(MESA_TOP)/src/mesa \
|
||||
$(MESA_TOP)/src/mapi \
|
||||
$(MESA_TOP)/src
|
||||
$(MESA_TOP)/src/mapi
|
||||
|
||||
LOCAL_MODULE := libmesa_util
|
||||
|
||||
@@ -75,8 +74,7 @@ LOCAL_SRC_FILES := \
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(MESA_TOP)/src/mesa \
|
||||
$(MESA_TOP)/src/mapi \
|
||||
$(MESA_TOP)/src
|
||||
$(MESA_TOP)/src/mapi
|
||||
|
||||
LOCAL_MODULE := libmesa_util
|
||||
|
||||
|
Reference in New Issue
Block a user