Compare commits
93 Commits
mesa-10.2-
...
mesa-10.2.
Author | SHA1 | Date | |
---|---|---|---|
|
623e68fb1b | ||
|
a9750ff7b5 | ||
|
274be620a8 | ||
|
5751b661ad | ||
|
282ca8ba98 | ||
|
c50fa76c7e | ||
|
ad9264366a | ||
|
855adad132 | ||
|
3568cf8128 | ||
|
aca2d98c35 | ||
|
08317fa9c4 | ||
|
4d0c445af6 | ||
|
9ad103d664 | ||
|
12fcbcde47 | ||
|
d8e3158a43 | ||
|
ef5f998b76 | ||
|
31dd2a6f18 | ||
|
c07485eab1 | ||
|
3b941857ee | ||
|
6b753df1f4 | ||
|
01a79ac679 | ||
|
83be6a5517 | ||
|
348125e7f7 | ||
|
126600c918 | ||
|
ee2035a95f | ||
|
07a6f8bcab | ||
|
1d46c58b83 | ||
|
f7fd6e52ec | ||
|
a46fa0f9de | ||
|
f4a19c1e2c | ||
|
bed18b082a | ||
|
43752c3c37 | ||
|
aa03f78fc8 | ||
|
6194593661 | ||
|
7654120e86 | ||
|
d6d80b44c4 | ||
|
a5d00e243c | ||
|
bfff355cef | ||
|
1e1bdee5ec | ||
|
9e50fc3812 | ||
|
8c319b3f98 | ||
|
70ce1031e7 | ||
|
8c4845d29b | ||
|
1b69ea1c6d | ||
|
c2fc9fb907 | ||
|
28d41e409d | ||
|
f836ef63fd | ||
|
99b9a0973a | ||
|
d36d53b564 | ||
|
283cd12933 | ||
|
aa8ea648f4 | ||
|
e901f40764 | ||
|
d5e47ee66b | ||
|
932a5dadda | ||
|
203bc289a0 | ||
|
11b3011805 | ||
|
c62bc58cce | ||
|
304e80e356 | ||
|
f4aca6868a | ||
|
5ab9a9c0cc | ||
|
ae16f443c2 | ||
|
b8241bb3f2 | ||
|
224c193237 | ||
|
494f916125 | ||
|
767bc05309 | ||
|
3aaae6056e | ||
|
8b71741222 | ||
|
15ec4ef0da | ||
|
9fde5670e2 | ||
|
76e112380a | ||
|
8ac81e5b66 | ||
|
6d23a0b2a6 | ||
|
8f984928cc | ||
|
7ab2363c11 | ||
|
55b9effa4a | ||
|
5347fc5295 | ||
|
e8e48889e6 | ||
|
af3d4eddc1 | ||
|
75ae4fff35 | ||
|
c984e5bd2e | ||
|
ca6b38b80a | ||
|
b814afeb6c | ||
|
17c7ead727 | ||
|
2a29dbdc6e | ||
|
03e93f6079 | ||
|
bc4b9467af | ||
|
7efdc55f5f | ||
|
9ea859931e | ||
|
4e5296208d | ||
|
1ced952686 | ||
|
afe723ce5f | ||
|
8b74c2bdbd | ||
|
4afbd9b0e2 |
@@ -1293,6 +1293,7 @@ if test "x$enable_xa" = xyes; then
|
||||
fi
|
||||
GALLIUM_STATE_TRACKERS_DIRS="xa $GALLIUM_STATE_TRACKERS_DIRS"
|
||||
enable_gallium_loader=yes
|
||||
enable_gallium_drm_loader=yes
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_ST_XA, test "x$enable_xa" = xyes)
|
||||
|
||||
@@ -1323,7 +1324,7 @@ AM_CONDITIONAL(HAVE_OPENVG, test "x$enable_openvg" = xyes)
|
||||
dnl
|
||||
dnl Gallium G3DVL configuration
|
||||
dnl
|
||||
if test -n "$with_gallium_drivers" && ! echo "$with_gallium_drivers" | grep -q 'swrast'; then
|
||||
if test -n "$with_gallium_drivers" -a "x$with_gallium_drivers" != xswrast; then
|
||||
if test "x$enable_xvmc" = xauto; then
|
||||
PKG_CHECK_EXISTS([xvmc], [enable_xvmc=yes], [enable_xvmc=no])
|
||||
fi
|
||||
@@ -1672,6 +1673,10 @@ if test "x$enable_gallium_llvm" = xyes; then
|
||||
else
|
||||
MESA_LLVM=0
|
||||
LLVM_VERSION_INT=0
|
||||
|
||||
if test "x$enable_opencl" = xyes; then
|
||||
AC_MSG_ERROR([cannot enable OpenCL without LLVM])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Directory for XVMC libs
|
||||
|
@@ -16,6 +16,20 @@
|
||||
|
||||
<h1>News</h1>
|
||||
|
||||
<h2>June 6, 2014</h2>
|
||||
<p>
|
||||
<a href="relnotes/10.2.1.html">Mesa 10.2.1</a> is released. This release
|
||||
only fixes a build error in the radeonsi driver that was introduced between
|
||||
10.2-rc5 and the 10.2 final release.
|
||||
</p>
|
||||
|
||||
<h2>June 6, 2014</h2>
|
||||
<p>
|
||||
<a href="relnotes/10.2.html">Mesa 10.2</a> is released. This is a new
|
||||
development release. See the release notes for more information about
|
||||
the release.
|
||||
</p>
|
||||
|
||||
<h2>April 18, 2014</h2>
|
||||
<p>
|
||||
<a href="relnotes/10.1.1.html">Mesa 10.1.1</a> is released.
|
||||
|
@@ -21,6 +21,8 @@ The release notes summarize what's new or changed in each Mesa release.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="relnotes/10.2.1.html">10.2.1 release notes</a>
|
||||
<li><a href="relnotes/10.2.html">10.2 release notes</a>
|
||||
<li><a href="relnotes/10.1.1.html">10.1.1 release notes</a>
|
||||
<li><a href="relnotes/10.1.html">10.1 release notes</a>
|
||||
<li><a href="relnotes/10.0.5.html">10.0.5 release notes</a>
|
||||
|
61
docs/relnotes/10.2.1.html
Normal file
61
docs/relnotes/10.2.1.html
Normal file
@@ -0,0 +1,61 @@
|
||||
<!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.2.1 Release Notes / June 6, 2014</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.2.1 is a bug fix release which fixes bugs found since the 10.1 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.2.1 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>MD5 checksums</h2>
|
||||
<pre>
|
||||
96f892dae2d0bb14ac9c2113f586c909 MesaLib-10.2.1.tar.gz
|
||||
093f9b5d077e5f6061dcd7b01b7aa51a MesaLib-10.2.1.tar.bz2
|
||||
6ab76c1608e5deed1eb8b54c62d7a48a MesaLib-10.2.1.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>
|
||||
Mesa 10.2 had a build problem in the radeonsi driver due to an error resolving
|
||||
conflicts in a patch cherry-pick from master. The build error is fixed.
|
||||
</p>
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Ian Romanick (3):</p>
|
||||
<ul>
|
||||
<li>docs: Add MD5 checksum, etc. for 10.1 release</li>
|
||||
<li>radeonsi: Fix build error introduced in 5ab9a9c</li>
|
||||
<li>Bump version to 10.2.1</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
178
docs/relnotes/10.2.2.html
Normal file
178
docs/relnotes/10.2.2.html
Normal file
@@ -0,0 +1,178 @@
|
||||
<!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.2.2 Release Notes / June 24, 2014</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.2.2 is a bug fix release which fixes bugs found since the 10.2.1 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.2.2 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>
|
||||
</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=54372">Bug 54372</a> - GLX_INTEL_swap_event crashes driver when swapping window buffers</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=66452">Bug 66452</a> - JUNIPER UVD accelerated playback of WMV3 streams does not work</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=74005">Bug 74005</a> - [i965 Bisected]Piglit/glx_glx-make-glxdrawable-current fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=77865">Bug 77865</a> - [BDW] Many Ogles3conform framebuffer_blit cases fail</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=78581">Bug 78581</a> - OpenCL: clBuildProgram prints error messages directly rather than storing them</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=79029">Bug 79029</a> - INTEL_DEBUG=shader_time is full of lies</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=79729">Bug 79729</a> - [i965] glClear on a multisample texture doesn't work</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=79907">Bug 79907</a> - Mesa 10.2.1 --enable-vdpau default=auto broken</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=80115">Bug 80115</a> - MESA_META_DRAW_BUFFERS induced GL_INVALID_VALUE errors</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Adrian Negreanu (8):</p>
|
||||
<ul>
|
||||
<li>add megadriver_stub_FILES</li>
|
||||
<li>android: adapt to the megadriver mechanism</li>
|
||||
<li>android: add libloader to libGLES_mesa and libmesa_egl_dri2</li>
|
||||
<li>android: add src/gallium/auxiliary as include path for libmesa_dricore</li>
|
||||
<li>android, egl: add correct drm include for libmesa_egl_dri2</li>
|
||||
<li>android, egl: typo dri2_fallback_pixmap_surface -> dri2_fallback_create_pixmap_surface</li>
|
||||
<li>android, mesa_gen_matypes: pull in timespec POSIX definition</li>
|
||||
<li>android, dricore: undefined reference to _mesa_streaming_load_memcpy</li>
|
||||
</ul>
|
||||
|
||||
<p>Carl Worth (1):</p>
|
||||
<ul>
|
||||
<li>Update VERSION to 10.2.2</li>
|
||||
</ul>
|
||||
|
||||
<p>Daniel Manjarres (1):</p>
|
||||
<ul>
|
||||
<li>glx: Don't crash on swap event for a Window (non-GLXWindow)</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (3):</p>
|
||||
<ul>
|
||||
<li>targets/xa: limit the amount of exported symbols</li>
|
||||
<li>configure: error out when building opencl without LLVM</li>
|
||||
<li>configure: correctly autodetect xvmc/vdpau/omx</li>
|
||||
</ul>
|
||||
|
||||
<p>Grigori Goronzy (1):</p>
|
||||
<ul>
|
||||
<li>radeon/uvd: disable VC-1 simple/main on UVD 2.x</li>
|
||||
</ul>
|
||||
|
||||
<p>Iago Toral Quiroga (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Copy Geom.UsesEndPrimitive when cloning a geometry program.</li>
|
||||
</ul>
|
||||
|
||||
<p>Ian Romanick (3):</p>
|
||||
<ul>
|
||||
<li>docs: Add initial 10.2.1 release notes</li>
|
||||
<li>docs: Add MD5 checksum, etc. for 10.2.1 release</li>
|
||||
<li>meta: Respect the driver's maximum number of draw buffers</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (7):</p>
|
||||
<ul>
|
||||
<li>gk110/ir: emit saturate flag on fadd when needed</li>
|
||||
<li>gk110/ir: fix emitting constbuf file index</li>
|
||||
<li>gk110/ir: fix bfind emission</li>
|
||||
<li>nv50: make sure to mark first scissor dirty after blit</li>
|
||||
<li>nv30: plug some memory leaks on screen destroy and shader compile</li>
|
||||
<li>nv30: avoid dangling references to deleted contexts</li>
|
||||
<li>nv30: hack to avoid errors on unexpected color/zeta combinations</li>
|
||||
</ul>
|
||||
|
||||
<p>Jason Ekstrand (1):</p>
|
||||
<ul>
|
||||
<li>meta_blit: properly compute texture width for the CopyTexSubImage fallback</li>
|
||||
</ul>
|
||||
|
||||
<p>José Fonseca (1):</p>
|
||||
<ul>
|
||||
<li>mesa/main: Prevent sefgault on glGetIntegerv(GL_ATOMIC_COUNTER_BUFFER_BINDING).</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (9):</p>
|
||||
<ul>
|
||||
<li>i965: Don't use the head sentinel as an fs_inst in Gen4 workaround code.</li>
|
||||
<li>i965: Invalidate live intervals when inserting Gen4 SEND workarounds.</li>
|
||||
<li>i965/vec4: Fix dead code elimination for VGRFs of size > 1.</li>
|
||||
<li>i965: Add missing MOCS setup for 3DSTATE_INDEX_BUFFER on Broadwell.</li>
|
||||
<li>i965: Drop Broadwell perf_debugs about missing MOCS that aren't missing.</li>
|
||||
<li>i965: Add missing newlines to a few perf_debug messages.</li>
|
||||
<li>i965/vec4: Use the sampler for pull constant loads on Broadwell.</li>
|
||||
<li>i965: Use 8x4 aligned rectangles for HiZ operations on Broadwell.</li>
|
||||
<li>i965: Save meta stencil blit programs in the context.</li>
|
||||
</ul>
|
||||
|
||||
<p>Kristian Høgsberg (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Remove glClear optimization based on drawable size</li>
|
||||
</ul>
|
||||
|
||||
<p>Michel Dänzer (1):</p>
|
||||
<ul>
|
||||
<li>configure: Only check for OpenCL without LLVM when the latter is certain</li>
|
||||
</ul>
|
||||
|
||||
<p>Neil Roberts (1):</p>
|
||||
<ul>
|
||||
<li>i965: Set the fast clear color value for texture surfaces</li>
|
||||
</ul>
|
||||
|
||||
<p>Tom Stellard (2):</p>
|
||||
<ul>
|
||||
<li>clover: Prevent Clang from printing number of errors and warnings to stderr.</li>
|
||||
<li>clover: Don't use llvm's global context</li>
|
||||
</ul>
|
||||
|
||||
<p>Ville Syrjälä (1):</p>
|
||||
<ul>
|
||||
<li>i915: Fix gen2 texblend setup</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -14,7 +14,7 @@
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.2 Release Notes / TBD</h1>
|
||||
<h1>Mesa 10.2 Release Notes / June 6, 2014</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.2 is a new development release.
|
||||
@@ -33,7 +33,9 @@ because compatibility contexts are not supported.
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
TBD.
|
||||
c87bfb6dd5cbcf1fdef42e5ccd972581 MesaLib-10.2.0.tar.gz
|
||||
7aaba90bd7169a94ae2fe83febdec963 MesaLib-10.2.0.tar.bz2
|
||||
58b203aca15dadc25ab4d1126db1052b MesaLib-10.2.0.zip
|
||||
</pre>
|
||||
|
||||
|
||||
|
@@ -40,8 +40,12 @@ LOCAL_C_INCLUDES := \
|
||||
$(MESA_TOP)/src/mapi \
|
||||
$(MESA_TOP)/src/egl/main \
|
||||
$(MESA_TOP)/src/loader \
|
||||
$(DRM_TOP)/include/drm \
|
||||
$(DRM_GRALLOC_TOP)
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := \
|
||||
libloader
|
||||
|
||||
LOCAL_MODULE := libmesa_egl_dri2
|
||||
|
||||
include $(MESA_COMMON_MK)
|
||||
|
@@ -638,7 +638,7 @@ droid_log(EGLint level, const char *msg)
|
||||
static struct dri2_egl_display_vtbl droid_display_vtbl = {
|
||||
.authenticate = NULL,
|
||||
.create_window_surface = droid_create_window_surface,
|
||||
.create_pixmap_surface = dri2_fallback_pixmap_surface,
|
||||
.create_pixmap_surface = dri2_fallback_create_pixmap_surface,
|
||||
.create_pbuffer_surface = droid_create_pbuffer_surface,
|
||||
.destroy_surface = droid_destroy_surface,
|
||||
.create_image = droid_create_image_khr,
|
||||
|
@@ -154,11 +154,14 @@ LOCAL_STATIC_LIBRARIES := \
|
||||
libmesa_glsl \
|
||||
libmesa_glsl_utils \
|
||||
libmesa_gallium \
|
||||
libloader \
|
||||
$(LOCAL_STATIC_LIBRARIES)
|
||||
|
||||
endif # MESA_BUILD_GALLIUM
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := \
|
||||
$(LOCAL_STATIC_LIBRARIES) \
|
||||
libloader
|
||||
|
||||
LOCAL_MODULE := libGLES_mesa
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
|
||||
|
||||
|
@@ -524,8 +524,12 @@ eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read,
|
||||
if (!context && ctx != EGL_NO_CONTEXT)
|
||||
RETURN_EGL_ERROR(disp, EGL_BAD_CONTEXT, EGL_FALSE);
|
||||
if (!draw_surf || !read_surf) {
|
||||
/* surfaces may be NULL if surfaceless */
|
||||
if (!disp->Extensions.KHR_surfaceless_context)
|
||||
/* From the EGL 1.4 (20130211) spec:
|
||||
*
|
||||
* To release the current context without assigning a new one, set ctx
|
||||
* to EGL_NO_CONTEXT and set draw and read to EGL_NO_SURFACE.
|
||||
*/
|
||||
if (!disp->Extensions.KHR_surfaceless_context && ctx != EGL_NO_CONTEXT)
|
||||
RETURN_EGL_ERROR(disp, EGL_BAD_SURFACE, EGL_FALSE);
|
||||
|
||||
if ((!draw_surf && draw != EGL_NO_SURFACE) ||
|
||||
@@ -567,6 +571,10 @@ _eglCreateWindowSurfaceCommon(_EGLDisplay *disp, EGLConfig config,
|
||||
EGLSurface ret;
|
||||
|
||||
_EGL_CHECK_CONFIG(disp, conf, EGL_NO_SURFACE, drv);
|
||||
|
||||
if (native_window == NULL)
|
||||
RETURN_EGL_ERROR(disp, EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE);
|
||||
|
||||
surf = drv->API.CreateWindowSurface(drv, disp, conf, native_window,
|
||||
attrib_list);
|
||||
ret = (surf) ? _eglLinkSurface(surf) : EGL_NO_SURFACE;
|
||||
|
@@ -312,9 +312,15 @@ lp_rast_shade_tile(struct lp_rasterizer_task *task,
|
||||
|
||||
/* color buffer */
|
||||
for (i = 0; i < scene->fb.nr_cbufs; i++){
|
||||
stride[i] = scene->cbufs[i].stride;
|
||||
color[i] = lp_rast_get_unswizzled_color_block_pointer(task, i, tile_x + x,
|
||||
tile_y + y, inputs->layer);
|
||||
if (scene->fb.cbufs[i]) {
|
||||
stride[i] = scene->cbufs[i].stride;
|
||||
color[i] = lp_rast_get_unswizzled_color_block_pointer(task, i, tile_x + x,
|
||||
tile_y + y, inputs->layer);
|
||||
}
|
||||
else {
|
||||
stride[i] = 0;
|
||||
color[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* depth buffer */
|
||||
|
@@ -287,10 +287,12 @@ CodeEmitterGK110::emitPredicate(const Instruction *i)
|
||||
void
|
||||
CodeEmitterGK110::setCAddress14(const ValueRef& src)
|
||||
{
|
||||
const int32_t addr = src.get()->asSym()->reg.data.offset / 4;
|
||||
const Storage& res = src.get()->asSym()->reg;
|
||||
const int32_t addr = res.data.offset / 4;
|
||||
|
||||
code[0] |= (addr & 0x01ff) << 23;
|
||||
code[1] |= (addr & 0x3e00) >> 9;
|
||||
code[1] |= res.fileIndex << 5;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -413,7 +415,6 @@ CodeEmitterGK110::emitForm_21(const Instruction *i, uint32_t opc2,
|
||||
case FILE_MEMORY_CONST:
|
||||
code[1] &= (s == 2) ? ~(0x4 << 28) : ~(0x8 << 28);
|
||||
setCAddress14(i->src(s));
|
||||
code[1] |= i->getSrc(s)->reg.fileIndex << 5;
|
||||
break;
|
||||
case FILE_IMMEDIATE:
|
||||
setShortImmediate(i, s);
|
||||
@@ -555,6 +556,7 @@ CodeEmitterGK110::emitFADD(const Instruction *i)
|
||||
RND_(2a, F);
|
||||
ABS_(31, 0);
|
||||
NEG_(33, 0);
|
||||
SAT_(35);
|
||||
|
||||
if (code[0] & 0x1) {
|
||||
modNegAbsF32_3b(i, 1);
|
||||
@@ -633,7 +635,7 @@ CodeEmitterGK110::emitISAD(const Instruction *i)
|
||||
{
|
||||
assert(i->dType == TYPE_S32 || i->dType == TYPE_U32);
|
||||
|
||||
emitForm_21(i, 0x1fc, 0xb74);
|
||||
emitForm_21(i, 0x1f4, 0xb74);
|
||||
|
||||
if (i->dType == TYPE_S32)
|
||||
code[1] |= 1 << 19;
|
||||
@@ -711,7 +713,7 @@ CodeEmitterGK110::emitEXTBF(const Instruction *i)
|
||||
void
|
||||
CodeEmitterGK110::emitBFIND(const Instruction *i)
|
||||
{
|
||||
emitForm_21(i, 0x618, 0xc18);
|
||||
emitForm_C(i, 0x218, 0x2);
|
||||
|
||||
if (i->dType == TYPE_S32)
|
||||
code[1] |= 0x80000;
|
||||
@@ -952,7 +954,7 @@ CodeEmitterGK110::emitSLCT(const CmpInstruction *i)
|
||||
FTZ_(32);
|
||||
emitCondCode(cc, 0x33, 0xf);
|
||||
} else {
|
||||
emitForm_21(i, 0x1a4, 0xb20);
|
||||
emitForm_21(i, 0x1a0, 0xb20);
|
||||
emitCondCode(cc, 0x34, 0x7);
|
||||
}
|
||||
}
|
||||
@@ -967,7 +969,7 @@ void CodeEmitterGK110::emitSELP(const Instruction *i)
|
||||
|
||||
void CodeEmitterGK110::emitTEXBAR(const Instruction *i)
|
||||
{
|
||||
code[0] = 0x00000002 | (i->subOp << 23);
|
||||
code[0] = 0x0000003e | (i->subOp << 23);
|
||||
code[1] = 0x77000000;
|
||||
|
||||
emitPredicate(i);
|
||||
@@ -1204,7 +1206,7 @@ CodeEmitterGK110::emitFlow(const Instruction *i)
|
||||
case OP_PRECONT: code[1] = 0x15800000; mask = 2; break;
|
||||
case OP_PRERET: code[1] = 0x13800000; mask = 2; break;
|
||||
|
||||
case OP_QUADON: code[1] = 0x1b000000; mask = 0; break;
|
||||
case OP_QUADON: code[1] = 0x1b800000; mask = 0; break;
|
||||
case OP_QUADPOP: code[1] = 0x1c000000; mask = 0; break;
|
||||
case OP_BRKPT: code[1] = 0x00000000; mask = 0; break;
|
||||
default:
|
||||
@@ -1326,7 +1328,8 @@ CodeEmitterGK110::emitOUT(const Instruction *i)
|
||||
void
|
||||
CodeEmitterGK110::emitInterpMode(const Instruction *i)
|
||||
{
|
||||
code[1] |= i->ipa << 21; // TODO: INTERP_SAMPLEID
|
||||
code[1] |= (i->ipa & 0x3) << 21; // TODO: INTERP_SAMPLEID
|
||||
code[1] |= (i->ipa & 0xc) << (19 - 2);
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -2199,7 +2199,6 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn)
|
||||
case TGSI_OPCODE_IMUL_HI:
|
||||
case TGSI_OPCODE_UMUL_HI:
|
||||
case TGSI_OPCODE_OR:
|
||||
case TGSI_OPCODE_POW:
|
||||
case TGSI_OPCODE_SHL:
|
||||
case TGSI_OPCODE_ISHR:
|
||||
case TGSI_OPCODE_USHR:
|
||||
@@ -2254,6 +2253,11 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn)
|
||||
FOR_EACH_DST_ENABLED_CHANNEL(0, c, tgsi)
|
||||
mkOp1(OP_MOV, TYPE_U32, dst0[c], fetchSrc(0, c));
|
||||
break;
|
||||
case TGSI_OPCODE_POW:
|
||||
val0 = mkOp2v(op, TYPE_F32, getScratch(), fetchSrc(0, 0), fetchSrc(1, 0));
|
||||
FOR_EACH_DST_ENABLED_CHANNEL(0, c, tgsi)
|
||||
mkOp1(OP_MOV, TYPE_F32, dst0[c], val0);
|
||||
break;
|
||||
case TGSI_OPCODE_EX2:
|
||||
case TGSI_OPCODE_LG2:
|
||||
val0 = mkOp1(op, TYPE_F32, getScratch(), fetchSrc(0, 0))->getDef(0);
|
||||
@@ -2453,7 +2457,12 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn)
|
||||
break;
|
||||
case TGSI_OPCODE_KILL_IF:
|
||||
val0 = new_LValue(func, FILE_PREDICATE);
|
||||
mask = 0;
|
||||
for (c = 0; c < 4; ++c) {
|
||||
const int s = tgsi.getSrc(0).getSwizzle(c);
|
||||
if (mask & (1 << s))
|
||||
continue;
|
||||
mask |= 1 << s;
|
||||
mkCmp(OP_SET, CC_LT, TYPE_F32, val0, TYPE_F32, fetchSrc(0, c), zero);
|
||||
mkOp(OP_DISCARD, TYPE_NONE, NULL)->setPredicate(CC_P, val0);
|
||||
}
|
||||
|
@@ -1279,8 +1279,11 @@ NV50LoweringPreSSA::checkPredicate(Instruction *insn)
|
||||
Value *pred = insn->getPredicate();
|
||||
Value *cdst;
|
||||
|
||||
if (!pred || pred->reg.file == FILE_FLAGS)
|
||||
// FILE_PREDICATE will simply be changed to FLAGS on conversion to SSA
|
||||
if (!pred ||
|
||||
pred->reg.file == FILE_FLAGS || pred->reg.file == FILE_PREDICATE)
|
||||
return;
|
||||
|
||||
cdst = bld.getSSA(1, FILE_FLAGS);
|
||||
|
||||
bld.mkCmp(OP_SET, CC_NEU, insn->dType, cdst, insn->dType, bld.loadImm(NULL, 0), pred);
|
||||
|
@@ -561,8 +561,9 @@ ConstantFolding::expr(Instruction *i,
|
||||
if (i->src(0).getImmediate(src0))
|
||||
expr(i, src0, *i->getSrc(1)->asImm());
|
||||
} else {
|
||||
i->op = OP_MOV;
|
||||
i->op = i->saturate ? OP_SAT : OP_MOV; /* SAT handled by unary() */
|
||||
}
|
||||
i->subOp = 0;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -612,6 +613,7 @@ ConstantFolding::unary(Instruction *i, const ImmediateValue &imm)
|
||||
switch (i->op) {
|
||||
case OP_NEG: res.data.f32 = -imm.reg.data.f32; break;
|
||||
case OP_ABS: res.data.f32 = fabsf(imm.reg.data.f32); break;
|
||||
case OP_SAT: res.data.f32 = CLAMP(imm.reg.data.f32, 0.0f, 1.0f); break;
|
||||
case OP_RCP: res.data.f32 = 1.0f / imm.reg.data.f32; break;
|
||||
case OP_RSQ: res.data.f32 = 1.0f / sqrtf(imm.reg.data.f32); break;
|
||||
case OP_LG2: res.data.f32 = log2f(imm.reg.data.f32); break;
|
||||
@@ -922,6 +924,7 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s)
|
||||
|
||||
case OP_ABS:
|
||||
case OP_NEG:
|
||||
case OP_SAT:
|
||||
case OP_LG2:
|
||||
case OP_RCP:
|
||||
case OP_SQRT:
|
||||
|
@@ -165,6 +165,9 @@ nv30_context_destroy(struct pipe_context *pipe)
|
||||
if (nv30->draw)
|
||||
draw_destroy(nv30->draw);
|
||||
|
||||
if (nv30->screen->base.pushbuf->user_priv == &nv30->bufctx)
|
||||
nv30->screen->base.pushbuf->user_priv = NULL;
|
||||
|
||||
nouveau_bufctx_del(&nv30->bufctx);
|
||||
|
||||
if (nv30->screen->cur_ctx == nv30)
|
||||
|
@@ -325,6 +325,12 @@ nv30_screen_destroy(struct pipe_screen *pscreen)
|
||||
nouveau_fence_ref(NULL, &screen->base.fence.current);
|
||||
}
|
||||
|
||||
nouveau_bo_ref(NULL, &screen->notify);
|
||||
|
||||
nouveau_heap_destroy(&screen->query_heap);
|
||||
nouveau_heap_destroy(&screen->vp_exec_heap);
|
||||
nouveau_heap_destroy(&screen->vp_data_heap);
|
||||
|
||||
nouveau_object_del(&screen->query);
|
||||
nouveau_object_del(&screen->fence);
|
||||
nouveau_object_del(&screen->ntfy);
|
||||
|
@@ -23,6 +23,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "util/u_format.h"
|
||||
#include "util/u_helpers.h"
|
||||
#include "util/u_inlines.h"
|
||||
|
||||
@@ -360,6 +361,22 @@ nv30_set_framebuffer_state(struct pipe_context *pipe,
|
||||
|
||||
nv30->framebuffer = *fb;
|
||||
nv30->dirty |= NV30_NEW_FRAMEBUFFER;
|
||||
|
||||
/* Hardware can't handle different swizzled-ness or different blocksizes
|
||||
* for zs and cbufs. If both are supplied and something doesn't match,
|
||||
* blank out the zs for now so that at least *some* rendering can occur.
|
||||
*/
|
||||
if (fb->nr_cbufs > 0 && fb->zsbuf) {
|
||||
struct nv30_miptree *color_mt = nv30_miptree(fb->cbufs[0]->texture);
|
||||
struct nv30_miptree *zeta_mt = nv30_miptree(fb->zsbuf->texture);
|
||||
|
||||
if (color_mt->swizzled != zeta_mt->swizzled ||
|
||||
(util_format_get_blocksize(fb->zsbuf->format) > 2) !=
|
||||
(util_format_get_blocksize(fb->cbufs[0]->format) > 2)) {
|
||||
nv30->framebuffer.zsbuf = NULL;
|
||||
debug_printf("Mismatched color and zeta formats, ignoring zeta.\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -1225,6 +1225,7 @@ out:
|
||||
if(fpc)
|
||||
{
|
||||
FREE(fpc->r_temp);
|
||||
FREE(fpc->r_imm);
|
||||
util_dynarray_fini(&fpc->if_stack);
|
||||
util_dynarray_fini(&fpc->label_relocs);
|
||||
util_dynarray_fini(&fpc->imm_data);
|
||||
|
@@ -122,12 +122,9 @@ nv50_destroy(struct pipe_context *pipe)
|
||||
{
|
||||
struct nv50_context *nv50 = nv50_context(pipe);
|
||||
|
||||
if (nv50_context_screen(nv50)->cur_ctx == nv50) {
|
||||
nv50->base.pushbuf->kick_notify = NULL;
|
||||
if (nv50_context_screen(nv50)->cur_ctx == nv50)
|
||||
nv50_context_screen(nv50)->cur_ctx = NULL;
|
||||
nouveau_pushbuf_bufctx(nv50->base.pushbuf, NULL);
|
||||
}
|
||||
/* need to flush before destroying the bufctx */
|
||||
nouveau_pushbuf_bufctx(nv50->base.pushbuf, NULL);
|
||||
nouveau_pushbuf_kick(nv50->base.pushbuf, nv50->base.pushbuf->channel);
|
||||
|
||||
nv50_context_unreference_resources(nv50);
|
||||
|
@@ -400,6 +400,10 @@ nv50_switch_pipe_context(struct nv50_context *ctx_to)
|
||||
ctx_to->viewports_dirty = ~0;
|
||||
ctx_to->scissors_dirty = ~0;
|
||||
|
||||
ctx_to->constbuf_dirty[0] =
|
||||
ctx_to->constbuf_dirty[1] =
|
||||
ctx_to->constbuf_dirty[2] = (1 << NV50_MAX_PIPE_CONSTBUFS) - 1;
|
||||
|
||||
if (!ctx_to->vertex)
|
||||
ctx_to->dirty &= ~(NV50_NEW_VERTEX | NV50_NEW_ARRAYS);
|
||||
|
||||
|
@@ -288,6 +288,14 @@ nv50_clear_render_target(struct pipe_context *pipe,
|
||||
|
||||
PUSH_REFN(push, bo, mt->base.domain | NOUVEAU_BO_WR);
|
||||
|
||||
BEGIN_NV04(push, NV50_3D(SCREEN_SCISSOR_HORIZ), 2);
|
||||
PUSH_DATA (push, ( width << 16) | dstx);
|
||||
PUSH_DATA (push, (height << 16) | dsty);
|
||||
BEGIN_NV04(push, NV50_3D(SCISSOR_HORIZ(0)), 2);
|
||||
PUSH_DATA (push, 8192 << 16);
|
||||
PUSH_DATA (push, 8192 << 16);
|
||||
nv50->scissors_dirty |= 1;
|
||||
|
||||
BEGIN_NV04(push, NV50_3D(RT_CONTROL), 1);
|
||||
PUSH_DATA (push, 1);
|
||||
BEGIN_NV04(push, NV50_3D(RT_ADDRESS_HIGH(0)), 5);
|
||||
@@ -325,7 +333,7 @@ nv50_clear_render_target(struct pipe_context *pipe,
|
||||
(z << NV50_3D_CLEAR_BUFFERS_LAYER__SHIFT));
|
||||
}
|
||||
|
||||
nv50->dirty |= NV50_NEW_FRAMEBUFFER;
|
||||
nv50->dirty |= NV50_NEW_FRAMEBUFFER | NV50_NEW_SCISSOR;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -364,6 +372,14 @@ nv50_clear_depth_stencil(struct pipe_context *pipe,
|
||||
|
||||
PUSH_REFN(push, bo, mt->base.domain | NOUVEAU_BO_WR);
|
||||
|
||||
BEGIN_NV04(push, NV50_3D(SCREEN_SCISSOR_HORIZ), 2);
|
||||
PUSH_DATA (push, ( width << 16) | dstx);
|
||||
PUSH_DATA (push, (height << 16) | dsty);
|
||||
BEGIN_NV04(push, NV50_3D(SCISSOR_HORIZ(0)), 2);
|
||||
PUSH_DATA (push, 8192 << 16);
|
||||
PUSH_DATA (push, 8192 << 16);
|
||||
nv50->scissors_dirty |= 1;
|
||||
|
||||
BEGIN_NV04(push, NV50_3D(ZETA_ADDRESS_HIGH), 5);
|
||||
PUSH_DATAh(push, bo->offset + sf->offset);
|
||||
PUSH_DATA (push, bo->offset + sf->offset);
|
||||
@@ -390,7 +406,7 @@ nv50_clear_depth_stencil(struct pipe_context *pipe,
|
||||
(z << NV50_3D_CLEAR_BUFFERS_LAYER__SHIFT));
|
||||
}
|
||||
|
||||
nv50->dirty |= NV50_NEW_FRAMEBUFFER;
|
||||
nv50->dirty |= NV50_NEW_FRAMEBUFFER | NV50_NEW_SCISSOR;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1090,6 +1106,7 @@ nv50_blitctx_post_blit(struct nv50_blitctx *blit)
|
||||
NV50_NEW_RASTERIZER | NV50_NEW_ZSA | NV50_NEW_BLEND |
|
||||
NV50_NEW_TEXTURES | NV50_NEW_SAMPLERS |
|
||||
NV50_NEW_VERTPROG | NV50_NEW_GMTYPROG | NV50_NEW_FRAGPROG);
|
||||
nv50->scissors_dirty |= 1;
|
||||
|
||||
nv50->base.pipe.set_min_samples(&nv50->base.pipe, blit->saved.min_samples);
|
||||
}
|
||||
|
@@ -123,11 +123,12 @@ nvc0_destroy(struct pipe_context *pipe)
|
||||
{
|
||||
struct nvc0_context *nvc0 = nvc0_context(pipe);
|
||||
|
||||
if (nvc0->screen->cur_ctx == nvc0) {
|
||||
nvc0->base.pushbuf->kick_notify = NULL;
|
||||
if (nvc0->screen->cur_ctx == nvc0)
|
||||
nvc0->screen->cur_ctx = NULL;
|
||||
nouveau_pushbuf_bufctx(nvc0->base.pushbuf, 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.
|
||||
*/
|
||||
nouveau_pushbuf_bufctx(nvc0->base.pushbuf, NULL);
|
||||
nouveau_pushbuf_kick(nvc0->base.pushbuf, nvc0->base.pushbuf->channel);
|
||||
|
||||
nvc0_context_unreference_resources(nvc0);
|
||||
|
@@ -133,17 +133,12 @@ static int
|
||||
nvc0_fp_assign_output_slots(struct nv50_ir_prog_info *info)
|
||||
{
|
||||
unsigned count = info->prop.fp.numColourResults * 4;
|
||||
unsigned i, c, ci;
|
||||
unsigned i, c;
|
||||
|
||||
for (i = 0, ci = 0; i < info->numOutputs; ++i) {
|
||||
if (info->out[i].sn == TGSI_SEMANTIC_COLOR) {
|
||||
for (i = 0; i < info->numOutputs; ++i)
|
||||
if (info->out[i].sn == TGSI_SEMANTIC_COLOR)
|
||||
for (c = 0; c < 4; ++c)
|
||||
info->out[i].slot[c] = ci * 4 + c;
|
||||
ci++;
|
||||
}
|
||||
}
|
||||
|
||||
assert(ci == info->prop.fp.numColourResults);
|
||||
info->out[i].slot[c] = info->out[i].si * 4 + c;
|
||||
|
||||
if (info->io.sampleMask < PIPE_MAX_SHADER_OUTPUTS)
|
||||
info->out[info->io.sampleMask].slot[0] = count++;
|
||||
|
@@ -171,7 +171,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
||||
case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
|
||||
return 0;
|
||||
case PIPE_CAP_COMPUTE:
|
||||
return (class_3d >= NVE4_3D_CLASS) ? 1 : 0;
|
||||
return (class_3d == NVE4_3D_CLASS) ? 1 : 0;
|
||||
case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
|
||||
return 1;
|
||||
case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK:
|
||||
@@ -211,7 +211,7 @@ nvc0_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
|
||||
case PIPE_SHADER_FRAGMENT:
|
||||
break;
|
||||
case PIPE_SHADER_COMPUTE:
|
||||
if (class_3d < NVE4_3D_CLASS)
|
||||
if (class_3d != NVE4_3D_CLASS)
|
||||
return 0;
|
||||
break;
|
||||
default:
|
||||
@@ -514,9 +514,10 @@ nvc0_screen_init_compute(struct nvc0_screen *screen)
|
||||
return nvc0_screen_compute_setup(screen, screen->base.pushbuf);
|
||||
return 0;
|
||||
case 0xe0:
|
||||
return nve4_screen_compute_setup(screen, screen->base.pushbuf);
|
||||
case 0xf0:
|
||||
case 0x100:
|
||||
return nve4_screen_compute_setup(screen, screen->base.pushbuf);
|
||||
return 0;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
@@ -531,6 +531,7 @@ nvc0_switch_pipe_context(struct nvc0_context *ctx_to)
|
||||
for (s = 0; s < 5; ++s) {
|
||||
ctx_to->samplers_dirty[s] = ~0;
|
||||
ctx_to->textures_dirty[s] = ~0;
|
||||
ctx_to->constbuf_dirty[s] = (1 << NVC0_MAX_PIPE_CONSTBUFS) - 1;
|
||||
}
|
||||
|
||||
if (!ctx_to->vertex)
|
||||
|
@@ -543,9 +543,22 @@ nvc0_blitter_make_vp(struct nvc0_blitter *blit)
|
||||
0x03f01c46, 0x0a7e0080, /* export b96 o[0x80] $r0:$r1:$r2 */
|
||||
0x00001de7, 0x80000000, /* exit */
|
||||
};
|
||||
static const uint32_t code_gk110[] =
|
||||
{
|
||||
0x00000000, 0x08000000, /* sched */
|
||||
0x401ffc12, 0x7ec7fc00, /* ld b64 $r4d a[0x80] 0x0 0x0 */
|
||||
0x481ffc02, 0x7ecbfc00, /* ld b96 $r0t a[0x90] 0x0 0x0 */
|
||||
0x381ffc12, 0x7f07fc00, /* st b64 a[0x70] $r4d 0x0 0x0 */
|
||||
0x401ffc02, 0x7f0bfc00, /* st b96 a[0x80] $r0t 0x0 0x0 */
|
||||
0x001c003c, 0x18000000, /* exit */
|
||||
};
|
||||
|
||||
blit->vp.type = PIPE_SHADER_VERTEX;
|
||||
blit->vp.translated = TRUE;
|
||||
if (blit->screen->base.class_3d >= NVF0_3D_CLASS) {
|
||||
blit->vp.code = (uint32_t *)code_gk110; /* const_cast */
|
||||
blit->vp.code_size = sizeof(code_gk110);
|
||||
} else
|
||||
if (blit->screen->base.class_3d >= NVE4_3D_CLASS) {
|
||||
blit->vp.code = (uint32_t *)code_nve4; /* const_cast */
|
||||
blit->vp.code_size = sizeof(code_nve4);
|
||||
|
@@ -789,7 +789,8 @@ static bool do_hardware_msaa_resolve(struct pipe_context *ctx,
|
||||
info->src.box.width == dst_width &&
|
||||
info->src.box.height == dst_height &&
|
||||
info->src.box.depth == 1 &&
|
||||
dst->surface.level[info->dst.level].mode >= RADEON_SURF_MODE_1D) {
|
||||
dst->surface.level[info->dst.level].mode >= RADEON_SURF_MODE_1D &&
|
||||
(!dst->cmask.size || !dst->dirty_level_mask) /* dst cannot be fast-cleared */) {
|
||||
r600_blitter_begin(ctx, R600_COLOR_RESOLVE);
|
||||
util_blitter_custom_resolve_color(rctx->blitter,
|
||||
info->dst.resource, info->dst.level,
|
||||
|
@@ -1235,6 +1235,9 @@ void evergreen_do_fast_color_clear(struct r600_common_context *rctx,
|
||||
{
|
||||
int i;
|
||||
|
||||
if (rctx->current_render_cond)
|
||||
return;
|
||||
|
||||
for (i = 0; i < fb->nr_cbufs; i++) {
|
||||
struct r600_texture *tex;
|
||||
unsigned clear_bit = PIPE_CLEAR_COLOR0 << i;
|
||||
|
@@ -242,7 +242,10 @@ int rvid_get_video_param(struct pipe_screen *screen,
|
||||
switch (param) {
|
||||
case PIPE_VIDEO_CAP_SUPPORTED:
|
||||
/* no support for MPEG4 */
|
||||
return codec != PIPE_VIDEO_FORMAT_MPEG4;
|
||||
return codec != PIPE_VIDEO_FORMAT_MPEG4 &&
|
||||
/* FIXME: VC-1 simple/main profile is broken */
|
||||
profile != PIPE_VIDEO_PROFILE_VC1_SIMPLE &&
|
||||
profile != PIPE_VIDEO_PROFILE_VC1_MAIN;
|
||||
case PIPE_VIDEO_CAP_PREFERS_INTERLACED:
|
||||
case PIPE_VIDEO_CAP_SUPPORTS_INTERLACED:
|
||||
/* and MPEG2 only with shaders */
|
||||
|
@@ -689,7 +689,8 @@ static bool do_hardware_msaa_resolve(struct pipe_context *ctx,
|
||||
info->src.box.height == dst_height &&
|
||||
info->src.box.depth == 1 &&
|
||||
dst->surface.level[info->dst.level].mode >= RADEON_SURF_MODE_1D &&
|
||||
!(dst->surface.flags & RADEON_SURF_SCANOUT)) {
|
||||
!(dst->surface.flags & RADEON_SURF_SCANOUT) &&
|
||||
(!dst->cmask.size || !dst->dirty_level_mask) /* dst cannot be fast-cleared */) {
|
||||
si_blitter_begin(ctx, SI_COLOR_RESOLVE);
|
||||
util_blitter_custom_resolve_color(sctx->blitter,
|
||||
info->dst.resource, info->dst.level,
|
||||
|
@@ -117,12 +117,13 @@ namespace {
|
||||
#endif
|
||||
|
||||
llvm::Module *
|
||||
compile(const std::string &source, const std::string &name,
|
||||
const std::string &triple, const std::string &processor,
|
||||
const std::string &opts, clang::LangAS::Map& address_spaces) {
|
||||
compile(llvm::LLVMContext &llvm_ctx, const std::string &source,
|
||||
const std::string &name, const std::string &triple,
|
||||
const std::string &processor, const std::string &opts,
|
||||
clang::LangAS::Map& address_spaces) {
|
||||
|
||||
clang::CompilerInstance c;
|
||||
clang::EmitLLVMOnlyAction act(&llvm::getGlobalContext());
|
||||
clang::EmitLLVMOnlyAction act(&llvm_ctx);
|
||||
std::string log;
|
||||
llvm::raw_string_ostream s_log(log);
|
||||
std::string libclc_path = LIBCLC_LIBEXECDIR + processor + "-"
|
||||
@@ -187,6 +188,11 @@ namespace {
|
||||
c.getLangOpts().NoBuiltin = true;
|
||||
c.getTargetOpts().Triple = triple;
|
||||
c.getTargetOpts().CPU = processor;
|
||||
|
||||
// This is a workaround for a Clang bug which causes the number
|
||||
// of warnings and errors to be printed to stderr.
|
||||
// http://www.llvm.org/bugs/show_bug.cgi?id=19735
|
||||
c.getDiagnosticOpts().ShowCarets = false;
|
||||
#if HAVE_LLVM <= 0x0301
|
||||
c.getInvocation().setLangDefaults(clang::IK_OpenCL);
|
||||
#else
|
||||
@@ -394,10 +400,12 @@ clover::compile_program_llvm(const compat::string &source,
|
||||
target.size() - processor_str_len - 1);
|
||||
clang::LangAS::Map address_spaces;
|
||||
|
||||
llvm::LLVMContext llvm_ctx;
|
||||
|
||||
// The input file name must have the .cl extension in order for the
|
||||
// CompilerInvocation class to recognize it as an OpenCL source file.
|
||||
llvm::Module *mod = compile(source, "input.cl", triple, processor, opts,
|
||||
address_spaces);
|
||||
llvm::Module *mod = compile(llvm_ctx, source, "input.cl", triple, processor,
|
||||
opts, address_spaces);
|
||||
|
||||
find_kernels(mod, kernels);
|
||||
|
||||
|
@@ -66,6 +66,9 @@ libxatracker_la_LDFLAGS = \
|
||||
$(GC_SECTIONS) \
|
||||
$(LD_NO_UNDEFINED)
|
||||
|
||||
libxatracker_la_LDFLAGS += \
|
||||
-Wl,--version-script=$(top_srcdir)/src/gallium/targets/xa/xa.sym
|
||||
|
||||
if HAVE_MESA_LLVM
|
||||
libxatracker_la_LIBADD += $(LLVM_LIBS)
|
||||
libxatracker_la_LDFLAGS += $(LLVM_LDFLAGS)
|
||||
|
38
src/gallium/targets/xa/xa.sym
Normal file
38
src/gallium/targets/xa/xa.sym
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
global:
|
||||
xa_composite_allocation;
|
||||
xa_composite_check_accelerated;
|
||||
xa_composite_done;
|
||||
xa_composite_prepare;
|
||||
xa_composite_rect;
|
||||
xa_context_create;
|
||||
xa_context_default;
|
||||
xa_context_destroy;
|
||||
xa_context_flush;
|
||||
xa_copy;
|
||||
xa_copy_done;
|
||||
xa_copy_prepare;
|
||||
xa_fence_get;
|
||||
xa_fence_wait;
|
||||
xa_fence_destroy;
|
||||
xa_format_check_supported;
|
||||
xa_solid;
|
||||
xa_solid_done;
|
||||
xa_solid_prepare;
|
||||
xa_surface_create;
|
||||
xa_surface_dma;
|
||||
xa_surface_format;
|
||||
xa_surface_from_handle;
|
||||
xa_surface_handle;
|
||||
xa_surface_map;
|
||||
xa_surface_redefine;
|
||||
xa_surface_ref;
|
||||
xa_surface_unmap;
|
||||
xa_surface_unref;
|
||||
xa_tracker_create;
|
||||
xa_tracker_destroy;
|
||||
xa_tracker_version;
|
||||
xa_yuv_planar_blit;
|
||||
local:
|
||||
*;
|
||||
};
|
@@ -3652,11 +3652,15 @@ ast_declarator_list::hir(exec_list *instructions,
|
||||
* instruction stream.
|
||||
*/
|
||||
exec_list initializer_instructions;
|
||||
|
||||
/* Examine var name here since var may get deleted in the next call */
|
||||
bool var_is_gl_id = (strncmp(var->name, "gl_", 3) == 0);
|
||||
|
||||
ir_variable *earlier =
|
||||
get_variable_being_redeclared(var, decl->get_location(), state,
|
||||
false /* allow_all_redeclarations */);
|
||||
if (earlier != NULL) {
|
||||
if (strncmp(var->name, "gl_", 3) == 0 &&
|
||||
if (var_is_gl_id &&
|
||||
earlier->data.how_declared == ir_var_declared_in_block) {
|
||||
_mesa_glsl_error(&loc, state,
|
||||
"`%s' has already been redeclared using "
|
||||
|
@@ -131,10 +131,14 @@ DRI2WireToEvent(Display *dpy, XEvent *event, xEvent *wire)
|
||||
aevent->msc = ((CARD64)awire->msc_hi << 32) | awire->msc_lo;
|
||||
|
||||
glxDraw = GetGLXDrawable(dpy, pdraw->drawable);
|
||||
if (awire->sbc < glxDraw->lastEventSbc)
|
||||
glxDraw->eventSbcWrap += 0x100000000;
|
||||
glxDraw->lastEventSbc = awire->sbc;
|
||||
aevent->sbc = awire->sbc + glxDraw->eventSbcWrap;
|
||||
if (glxDraw != NULL) {
|
||||
if (awire->sbc < glxDraw->lastEventSbc)
|
||||
glxDraw->eventSbcWrap += 0x100000000;
|
||||
glxDraw->lastEventSbc = awire->sbc;
|
||||
aevent->sbc = awire->sbc + glxDraw->eventSbcWrap;
|
||||
} else {
|
||||
aevent->sbc = awire->sbc;
|
||||
}
|
||||
|
||||
return True;
|
||||
}
|
||||
|
@@ -249,6 +249,10 @@ glx_display_free(struct glx_display *priv)
|
||||
if (priv->dri2Display)
|
||||
(*priv->dri2Display->destroyDisplay) (priv->dri2Display);
|
||||
priv->dri2Display = NULL;
|
||||
|
||||
if (priv->dri3Display)
|
||||
(*priv->dri3Display->destroyDisplay) (priv->dri3Display);
|
||||
priv->dri3Display = NULL;
|
||||
#endif
|
||||
|
||||
free((char *) priv);
|
||||
|
@@ -87,6 +87,63 @@
|
||||
/* those link to libglapi.a should provide the entry points */
|
||||
#define _GLAPI_SKIP_PROTO_ENTRY_POINTS
|
||||
#endif
|
||||
|
||||
/* These prototypes are necessary because GLES1 library builds will create
|
||||
* dispatch functions for them. We can't directly include GLES/gl.h because
|
||||
* it would conflict the previously-included GL/gl.h. Since GLES1 ABI is not
|
||||
* expected to every add more functions, the path of least resistance is to
|
||||
* just duplicate the prototypes for the functions that aren't already in
|
||||
* desktop OpenGL.
|
||||
*/
|
||||
#include <GLES/glplatform.h>
|
||||
|
||||
GL_API void GL_APIENTRY glClearDepthf (GLclampf depth);
|
||||
GL_API void GL_APIENTRY glClipPlanef (GLenum plane, const GLfloat *equation);
|
||||
GL_API void GL_APIENTRY glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
|
||||
GL_API void GL_APIENTRY glGetClipPlanef (GLenum pname, GLfloat eqn[4]);
|
||||
GL_API void GL_APIENTRY glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar);
|
||||
|
||||
GL_API void GL_APIENTRY glAlphaFuncx (GLenum func, GLclampx ref);
|
||||
GL_API void GL_APIENTRY glClearColorx (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
|
||||
GL_API void GL_APIENTRY glClearDepthx (GLclampx depth);
|
||||
GL_API void GL_APIENTRY glClipPlanex (GLenum plane, const GLfixed *equation);
|
||||
GL_API void GL_APIENTRY glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha);
|
||||
GL_API void GL_APIENTRY glDepthRangex (GLclampx zNear, GLclampx zFar);
|
||||
GL_API void GL_APIENTRY glFogx (GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glFogxv (GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glFrustumx (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
|
||||
GL_API void GL_APIENTRY glGetClipPlanex (GLenum pname, GLfixed eqn[4]);
|
||||
GL_API void GL_APIENTRY glGetFixedv (GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetLightxv (GLenum light, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetMaterialxv (GLenum face, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetTexEnvxv (GLenum env, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glGetTexParameterxv (GLenum target, GLenum pname, GLfixed *params);
|
||||
GL_API void GL_APIENTRY glLightModelx (GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glLightModelxv (GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glLightx (GLenum light, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glLightxv (GLenum light, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glLineWidthx (GLfixed width);
|
||||
GL_API void GL_APIENTRY glLoadMatrixx (const GLfixed *m);
|
||||
GL_API void GL_APIENTRY glMaterialx (GLenum face, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glMaterialxv (GLenum face, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glMultMatrixx (const GLfixed *m);
|
||||
GL_API void GL_APIENTRY glMultiTexCoord4x (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
|
||||
GL_API void GL_APIENTRY glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz);
|
||||
GL_API void GL_APIENTRY glOrthox (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar);
|
||||
GL_API void GL_APIENTRY glPointParameterx (GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glPointParameterxv (GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glPointSizex (GLfixed size);
|
||||
GL_API void GL_APIENTRY glPolygonOffsetx (GLfixed factor, GLfixed units);
|
||||
GL_API void GL_APIENTRY glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
|
||||
GL_API void GL_APIENTRY glSampleCoveragex (GLclampx value, GLboolean invert);
|
||||
GL_API void GL_APIENTRY glScalex (GLfixed x, GLfixed y, GLfixed z);
|
||||
GL_API void GL_APIENTRY glTexEnvx (GLenum target, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glTexParameterx (GLenum target, GLenum pname, GLfixed param);
|
||||
GL_API void GL_APIENTRY glTexParameterxv (GLenum target, GLenum pname, const GLfixed *params);
|
||||
GL_API void GL_APIENTRY glTranslatex (GLfixed x, GLfixed y, GLfixed z);
|
||||
GL_API void GL_APIENTRY glPointSizePointerOES (GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
|
||||
#include "glapi/glapitemp.h"
|
||||
|
||||
#endif /* USE_X86_ASM */
|
||||
|
@@ -47,10 +47,16 @@ ifeq ($(TARGET_ARCH),x86)
|
||||
endif # x86
|
||||
endif # MESA_ENABLE_ASM
|
||||
|
||||
ifeq ($(ARCH_X86_HAVE_SSE4_1),true)
|
||||
LOCAL_SRC_FILES += \
|
||||
$(SRCDIR)main/streaming-load-memcpy.c
|
||||
endif
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(call intermediates-dir-for STATIC_LIBRARIES,libmesa_program,,) \
|
||||
$(MESA_TOP)/src/mapi \
|
||||
$(MESA_TOP)/src/glsl
|
||||
$(MESA_TOP)/src/glsl \
|
||||
$(MESA_TOP)/src/gallium/auxiliary
|
||||
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES := \
|
||||
libmesa_program
|
||||
|
@@ -56,6 +56,7 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := libmesa_glsl_utils
|
||||
LOCAL_IS_HOST_MODULE := true
|
||||
LOCAL_CFLAGS := -D_POSIX_C_SOURCE=199309L
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(MESA_TOP)/src/glsl \
|
||||
|
@@ -33,6 +33,7 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := mesa_gen_matypes
|
||||
LOCAL_IS_HOST_MODULE := true
|
||||
LOCAL_CFLAGS := -D_POSIX_C_SOURCE=199309L
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(MESA_TOP)/src/mapi \
|
||||
|
@@ -801,7 +801,7 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
|
||||
int buf, real_color_buffers = 0;
|
||||
memset(save->ColorDrawBuffers, 0, sizeof(save->ColorDrawBuffers));
|
||||
|
||||
for (buf = 0; buf < MAX_DRAW_BUFFERS; buf++) {
|
||||
for (buf = 0; buf < ctx->Const.MaxDrawBuffers; buf++) {
|
||||
int buf_index = ctx->DrawBuffer->_ColorDrawBufferIndexes[buf];
|
||||
if (buf_index == -1)
|
||||
continue;
|
||||
@@ -1213,7 +1213,7 @@ _mesa_meta_end(struct gl_context *ctx)
|
||||
_mesa_BindRenderbuffer(GL_RENDERBUFFER, save->RenderbufferName);
|
||||
|
||||
if (state & MESA_META_DRAW_BUFFERS) {
|
||||
_mesa_DrawBuffers(MAX_DRAW_BUFFERS, save->ColorDrawBuffers);
|
||||
_mesa_DrawBuffers(ctx->Const.MaxDrawBuffers, save->ColorDrawBuffers);
|
||||
}
|
||||
|
||||
ctx->Meta->SaveStackDepth--;
|
||||
|
@@ -270,7 +270,7 @@ struct blit_state
|
||||
struct fb_tex_blit_state
|
||||
{
|
||||
GLint baseLevelSave, maxLevelSave;
|
||||
GLuint sampler, samplerSave;
|
||||
GLuint sampler, samplerSave, stencilSamplingSave;
|
||||
GLuint tempTex;
|
||||
};
|
||||
|
||||
@@ -407,7 +407,7 @@ _mesa_meta_fb_tex_blit_begin(const struct gl_context *ctx,
|
||||
struct fb_tex_blit_state *blit);
|
||||
|
||||
extern void
|
||||
_mesa_meta_fb_tex_blit_end(const struct gl_context *ctx, GLenum target,
|
||||
_mesa_meta_fb_tex_blit_end(struct gl_context *ctx, GLenum target,
|
||||
struct fb_tex_blit_state *blit);
|
||||
|
||||
extern GLboolean
|
||||
|
@@ -273,7 +273,7 @@ setup_glsl_msaa_blit_shader(struct gl_context *ctx,
|
||||
samples);
|
||||
} else {
|
||||
ralloc_asprintf_append(&sample_resolve,
|
||||
" out_color = sample_%d_0 / %f;\n",
|
||||
" gl_FragColor = sample_%d_0 / %f;\n",
|
||||
samples, (float)samples);
|
||||
}
|
||||
}
|
||||
@@ -405,7 +405,7 @@ blitframebuffer_texture(struct gl_context *ctx,
|
||||
}
|
||||
} else {
|
||||
GLenum tex_base_format;
|
||||
int srcW = abs(srcY1 - srcY0);
|
||||
int srcW = abs(srcX1 - srcX0);
|
||||
int srcH = abs(srcY1 - srcY0);
|
||||
/* Fall back to doing a CopyTexSubImage to get the destination
|
||||
* renderbuffer into a texture.
|
||||
@@ -444,6 +444,7 @@ blitframebuffer_texture(struct gl_context *ctx,
|
||||
|
||||
fb_tex_blit.baseLevelSave = texObj->BaseLevel;
|
||||
fb_tex_blit.maxLevelSave = texObj->MaxLevel;
|
||||
fb_tex_blit.stencilSamplingSave = texObj->StencilSampling;
|
||||
|
||||
if (glsl_version) {
|
||||
setup_glsl_blit_framebuffer(ctx, blit, rb, target);
|
||||
@@ -574,7 +575,7 @@ _mesa_meta_fb_tex_blit_begin(const struct gl_context *ctx,
|
||||
}
|
||||
|
||||
void
|
||||
_mesa_meta_fb_tex_blit_end(const struct gl_context *ctx, GLenum target,
|
||||
_mesa_meta_fb_tex_blit_end(struct gl_context *ctx, GLenum target,
|
||||
struct fb_tex_blit_state *blit)
|
||||
{
|
||||
/* Restore texture object state, the texture binding will
|
||||
@@ -583,6 +584,16 @@ _mesa_meta_fb_tex_blit_end(const struct gl_context *ctx, GLenum target,
|
||||
if (target != GL_TEXTURE_RECTANGLE_ARB) {
|
||||
_mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, blit->baseLevelSave);
|
||||
_mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, blit->maxLevelSave);
|
||||
|
||||
if (ctx->Extensions.ARB_stencil_texturing) {
|
||||
const struct gl_texture_object *texObj =
|
||||
_mesa_get_current_tex_object(ctx, target);
|
||||
|
||||
if (texObj->StencilSampling != blit->stencilSamplingSave)
|
||||
_mesa_TexParameteri(target, GL_DEPTH_STENCIL_TEXTURE_MODE,
|
||||
blit->stencilSamplingSave ?
|
||||
GL_STENCIL_INDEX : GL_DEPTH_COMPONENT);
|
||||
}
|
||||
}
|
||||
|
||||
_mesa_BindSampler(ctx->Texture.CurrentUnit, blit->samplerSave);
|
||||
|
@@ -43,6 +43,7 @@ MESA_DRI_C_INCLUDES := \
|
||||
|
||||
MESA_DRI_WHOLE_STATIC_LIBRARIES := \
|
||||
libmesa_glsl \
|
||||
libmegadriver_stub \
|
||||
libmesa_dri_common \
|
||||
libmesa_dricore
|
||||
|
||||
|
@@ -86,3 +86,20 @@ $(intermediates)/xmlpool/options.h: $$(PRIVATE_SCRIPT) $$(PRIVATE_TEMPLATE_HEADE
|
||||
|
||||
include $(MESA_COMMON_MK)
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
#
|
||||
# Build libmegadriver_stub
|
||||
#
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
include $(LOCAL_PATH)/Makefile.sources
|
||||
|
||||
LOCAL_MODULE := libmegadriver_stub
|
||||
LOCAL_MODULE_CLASS := STATIC_LIBRARIES
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(MESA_DRI_C_INCLUDES)
|
||||
|
||||
LOCAL_SRC_FILES := $(megadriver_stub_FILES)
|
||||
|
||||
include $(MESA_COMMON_MK)
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
@@ -42,7 +42,7 @@ libdricommon_la_SOURCES = $(DRI_COMMON_FILES)
|
||||
libdri_test_stubs_la_SOURCES = $(test_stubs_FILES)
|
||||
libdri_test_stubs_la_CFLAGS = $(AM_CFLAGS) -DNO_MAIN
|
||||
|
||||
libmegadriver_stub_la_SOURCES = megadriver_stub.c
|
||||
libmegadriver_stub_la_SOURCES = $(megadriver_stub_FILES)
|
||||
|
||||
sysconf_DATA = drirc
|
||||
|
||||
|
@@ -14,3 +14,6 @@ mesa_dri_common_INCLUDES := \
|
||||
|
||||
test_stubs_FILES := \
|
||||
dri_test.c
|
||||
|
||||
megadriver_stub_FILES := \
|
||||
megadriver_stub.c
|
||||
|
@@ -445,7 +445,7 @@ i830EmitTextureBlend(struct i830_context *i830)
|
||||
I830_ACTIVESTATE(i830, I830_UPLOAD_TEXBLEND_ALL, false);
|
||||
|
||||
if (ctx->Texture._MaxEnabledTexImageUnit != -1) {
|
||||
for (unit = 0; unit < ctx->Texture._MaxEnabledTexImageUnit; unit++)
|
||||
for (unit = 0; unit <= ctx->Texture._MaxEnabledTexImageUnit; unit++)
|
||||
if (ctx->Texture.Unit[unit]._Current)
|
||||
emit_texblend(i830, unit, blendunit++,
|
||||
unit == ctx->Texture._MaxEnabledTexImageUnit);
|
||||
|
@@ -507,7 +507,7 @@ intelInitContext(struct intel_context *intel,
|
||||
|
||||
_mesa_meta_init(ctx);
|
||||
|
||||
intel->hw_stencil = mesaVis->stencilBits && mesaVis->depthBits == 24;
|
||||
intel->hw_stencil = mesaVis && mesaVis->stencilBits && mesaVis->depthBits == 24;
|
||||
intel->hw_stipple = 1;
|
||||
|
||||
intel->RenderIndex = ~0;
|
||||
|
@@ -1115,6 +1115,9 @@ struct brw_context
|
||||
|
||||
struct brw_cache cache;
|
||||
|
||||
/** IDs for meta stencil blit shader programs. */
|
||||
unsigned meta_stencil_blit_programs[2];
|
||||
|
||||
/* Whether a meta-operation is in progress. */
|
||||
bool meta_in_progress;
|
||||
|
||||
|
@@ -606,6 +606,7 @@
|
||||
#define BRW_TEXCOORDMODE_CUBE 3
|
||||
#define BRW_TEXCOORDMODE_CLAMP_BORDER 4
|
||||
#define BRW_TEXCOORDMODE_MIRROR_ONCE 5
|
||||
#define GEN8_TEXCOORDMODE_HALF_BORDER 6
|
||||
|
||||
#define BRW_THREAD_PRIORITY_NORMAL 0
|
||||
#define BRW_THREAD_PRIORITY_HIGH 1
|
||||
@@ -1694,7 +1695,7 @@ enum brw_message_target {
|
||||
/* GEN7/DW1: */
|
||||
# define GEN7_SF_DEPTH_BUFFER_SURFACE_FORMAT_SHIFT 12
|
||||
/* GEN7/DW2: */
|
||||
# define HSW_SF_LINE_STIPPLE_ENABLE 14
|
||||
# define HSW_SF_LINE_STIPPLE_ENABLE (1 << 14)
|
||||
|
||||
# define GEN8_SF_SMOOTH_POINT_ENABLE (1 << 13)
|
||||
|
||||
|
@@ -192,33 +192,44 @@ static const struct brw_device_info brw_device_info_hsw_gt3 = {
|
||||
},
|
||||
};
|
||||
|
||||
/* Thread counts and URB limits are placeholders, and may not be accurate. */
|
||||
#define GEN8_FEATURES \
|
||||
.gen = 8, \
|
||||
.has_hiz_and_separate_stencil = true, \
|
||||
.must_use_separate_stencil = true, \
|
||||
.has_llc = true, \
|
||||
.has_pln = true, \
|
||||
.max_vs_threads = 280, \
|
||||
.max_gs_threads = 256, \
|
||||
.max_wm_threads = 408, \
|
||||
.urb = { \
|
||||
.size = 128, \
|
||||
.min_vs_entries = 64, \
|
||||
.max_vs_entries = 1664, \
|
||||
.max_gs_entries = 640, \
|
||||
}
|
||||
.max_vs_threads = 504, \
|
||||
.max_gs_threads = 504, \
|
||||
.max_wm_threads = 384 \
|
||||
|
||||
static const struct brw_device_info brw_device_info_bdw_gt1 = {
|
||||
GEN8_FEATURES, .gt = 1,
|
||||
.urb = {
|
||||
.size = 192,
|
||||
.min_vs_entries = 64,
|
||||
.max_vs_entries = 2560,
|
||||
.max_gs_entries = 960,
|
||||
}
|
||||
};
|
||||
|
||||
static const struct brw_device_info brw_device_info_bdw_gt2 = {
|
||||
GEN8_FEATURES, .gt = 2,
|
||||
.urb = {
|
||||
.size = 384,
|
||||
.min_vs_entries = 64,
|
||||
.max_vs_entries = 2560,
|
||||
.max_gs_entries = 960,
|
||||
}
|
||||
};
|
||||
|
||||
static const struct brw_device_info brw_device_info_bdw_gt3 = {
|
||||
GEN8_FEATURES, .gt = 3,
|
||||
.urb = {
|
||||
.size = 384,
|
||||
.min_vs_entries = 64,
|
||||
.max_vs_entries = 2560,
|
||||
.max_gs_entries = 960,
|
||||
}
|
||||
};
|
||||
|
||||
/* Thread counts and URB limits are placeholders, and may not be accurate.
|
||||
|
@@ -2406,7 +2406,7 @@ fs_visitor::insert_gen4_pre_send_dependency_workarounds(fs_inst *inst)
|
||||
* program.
|
||||
*/
|
||||
for (fs_inst *scan_inst = (fs_inst *)inst->prev;
|
||||
scan_inst != NULL;
|
||||
!scan_inst->is_head_sentinel();
|
||||
scan_inst = (fs_inst *)scan_inst->prev) {
|
||||
|
||||
/* If we hit control flow, assume that there *are* outstanding
|
||||
@@ -2533,6 +2533,8 @@ fs_visitor::insert_gen4_send_dependency_workarounds()
|
||||
if (brw->gen != 4 || brw->is_g4x)
|
||||
return;
|
||||
|
||||
bool progress = false;
|
||||
|
||||
/* Note that we're done with register allocation, so GRF fs_regs always
|
||||
* have a .reg_offset of 0.
|
||||
*/
|
||||
@@ -2543,8 +2545,12 @@ fs_visitor::insert_gen4_send_dependency_workarounds()
|
||||
if (inst->mlen != 0 && inst->dst.file == GRF) {
|
||||
insert_gen4_pre_send_dependency_workarounds(inst);
|
||||
insert_gen4_post_send_dependency_workarounds(inst);
|
||||
progress = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (progress)
|
||||
invalidate_live_intervals();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -77,21 +77,40 @@ is_coalesce_candidate(const fs_inst *inst, const int *virtual_grf_sizes)
|
||||
|
||||
static bool
|
||||
can_coalesce_vars(brw::fs_live_variables *live_intervals,
|
||||
const exec_list *instructions, const fs_inst *inst, int ip,
|
||||
const exec_list *instructions, const fs_inst *inst,
|
||||
int var_to, int var_from)
|
||||
{
|
||||
if (!live_intervals->vars_interfere(var_from, var_to))
|
||||
return true;
|
||||
|
||||
assert(ip >= live_intervals->start[var_to]);
|
||||
/* We know that the live ranges of A (var_from) and B (var_to)
|
||||
* interfere because of the ->vars_interfere() call above. If the end
|
||||
* of B's live range is after the end of A's range, then we know two
|
||||
* things:
|
||||
* - the start of B's live range must be in A's live range (since we
|
||||
* already know the two ranges interfere, this is the only remaining
|
||||
* possibility)
|
||||
* - the interference isn't of the form we're looking for (where B is
|
||||
* entirely inside A)
|
||||
*/
|
||||
if (live_intervals->end[var_to] > live_intervals->end[var_from])
|
||||
return false;
|
||||
|
||||
fs_inst *scan_inst;
|
||||
for (scan_inst = (fs_inst *)inst->next;
|
||||
!scan_inst->is_tail_sentinel() && ip <= live_intervals->end[var_to];
|
||||
scan_inst = (fs_inst *)scan_inst->next, ip++) {
|
||||
if (scan_inst->opcode == BRW_OPCODE_WHILE)
|
||||
int scan_ip = -1;
|
||||
|
||||
foreach_list(n, instructions) {
|
||||
fs_inst *scan_inst = (fs_inst *)n;
|
||||
scan_ip++;
|
||||
|
||||
if (scan_inst->is_control_flow())
|
||||
return false;
|
||||
|
||||
if (scan_ip <= live_intervals->start[var_to])
|
||||
continue;
|
||||
|
||||
if (scan_ip > live_intervals->end[var_to])
|
||||
break;
|
||||
|
||||
if (scan_inst->dst.equals(inst->dst) ||
|
||||
scan_inst->dst.equals(inst->src[0]))
|
||||
return false;
|
||||
@@ -114,11 +133,9 @@ fs_visitor::register_coalesce()
|
||||
fs_inst *mov[MAX_SAMPLER_MESSAGE_SIZE];
|
||||
int var_to[MAX_SAMPLER_MESSAGE_SIZE];
|
||||
int var_from[MAX_SAMPLER_MESSAGE_SIZE];
|
||||
int ip = -1;
|
||||
|
||||
foreach_list(node, &this->instructions) {
|
||||
fs_inst *inst = (fs_inst *)node;
|
||||
ip++;
|
||||
|
||||
if (!is_coalesce_candidate(inst, virtual_grf_sizes))
|
||||
continue;
|
||||
@@ -157,7 +174,7 @@ fs_visitor::register_coalesce()
|
||||
var_to[i] = live_intervals->var_from_vgrf[reg_to] + reg_to_offset[i];
|
||||
var_from[i] = live_intervals->var_from_vgrf[reg_from] + i;
|
||||
|
||||
if (!can_coalesce_vars(live_intervals, &instructions, inst, ip,
|
||||
if (!can_coalesce_vars(live_intervals, &instructions, inst,
|
||||
var_to[i], var_from[i])) {
|
||||
can_coalesce = false;
|
||||
reg_from = -1;
|
||||
|
@@ -221,15 +221,18 @@ fs_visitor::emit_lrp(const fs_reg &dst, const fs_reg &x, const fs_reg &y,
|
||||
!y.is_valid_3src() ||
|
||||
!a.is_valid_3src()) {
|
||||
/* We can't use the LRP instruction. Emit x*(1-a) + y*a. */
|
||||
fs_reg y_times_a = fs_reg(this, glsl_type::float_type);
|
||||
fs_reg one_minus_a = fs_reg(this, glsl_type::float_type);
|
||||
fs_reg x_times_one_minus_a = fs_reg(this, glsl_type::float_type);
|
||||
|
||||
emit(MUL(y_times_a, y, a));
|
||||
|
||||
fs_reg negative_a = a;
|
||||
negative_a.negate = !a.negate;
|
||||
|
||||
emit(ADD(one_minus_a, negative_a, fs_reg(1.0f)));
|
||||
fs_inst *mul = emit(MUL(reg_null_f, y, a));
|
||||
mul->writes_accumulator = true;
|
||||
emit(MAC(dst, x, one_minus_a));
|
||||
emit(MUL(x_times_one_minus_a, x, one_minus_a));
|
||||
|
||||
emit(ADD(dst, x_times_one_minus_a, y_times_a));
|
||||
} else {
|
||||
/* The LRP instruction actually does op1 * op0 + op2 * (1 - op0), so
|
||||
* we need to reorder the operands.
|
||||
@@ -1480,15 +1483,28 @@ fs_visitor::rescale_texcoord(ir_texture *ir, fs_reg coordinate,
|
||||
return coordinate;
|
||||
}
|
||||
|
||||
scale_x = fs_reg(UNIFORM, uniforms);
|
||||
scale_y = fs_reg(UNIFORM, uniforms + 1);
|
||||
|
||||
GLuint index = _mesa_add_state_reference(params,
|
||||
(gl_state_index *)tokens);
|
||||
stage_prog_data->param[uniforms++] =
|
||||
&prog->Parameters->ParameterValues[index][0].f;
|
||||
stage_prog_data->param[uniforms++] =
|
||||
&prog->Parameters->ParameterValues[index][1].f;
|
||||
/* Try to find existing copies of the texrect scale uniforms. */
|
||||
for (unsigned i = 0; i < uniforms; i++) {
|
||||
if (stage_prog_data->param[i] ==
|
||||
&prog->Parameters->ParameterValues[index][0].f) {
|
||||
scale_x = fs_reg(UNIFORM, i);
|
||||
scale_y = fs_reg(UNIFORM, i + 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* If we didn't already set them up, do so now. */
|
||||
if (scale_x.file == BAD_FILE) {
|
||||
scale_x = fs_reg(UNIFORM, uniforms);
|
||||
scale_y = fs_reg(UNIFORM, uniforms + 1);
|
||||
|
||||
stage_prog_data->param[uniforms++] =
|
||||
&prog->Parameters->ParameterValues[index][0].f;
|
||||
stage_prog_data->param[uniforms++] =
|
||||
&prog->Parameters->ParameterValues[index][1].f;
|
||||
}
|
||||
}
|
||||
|
||||
/* The 965 requires the EU to do the normalization of GL rectangle
|
||||
|
@@ -272,28 +272,30 @@ setup_coord_transform(GLuint prog, const struct blit_dims *dims)
|
||||
}
|
||||
|
||||
static GLuint
|
||||
setup_program(struct gl_context *ctx, bool msaa_tex)
|
||||
setup_program(struct brw_context *brw, bool msaa_tex)
|
||||
{
|
||||
struct gl_context *ctx = &brw->ctx;
|
||||
struct blit_state *blit = &ctx->Meta->Blit;
|
||||
static GLuint prog_cache[] = { 0, 0 };
|
||||
const char *fs_source;
|
||||
const struct sampler_and_fetch *sampler = &samplers[msaa_tex];
|
||||
|
||||
_mesa_meta_setup_vertex_objects(&blit->VAO, &blit->VBO, true, 2, 2, 0);
|
||||
|
||||
if (prog_cache[msaa_tex]) {
|
||||
_mesa_UseProgram(prog_cache[msaa_tex]);
|
||||
return prog_cache[msaa_tex];
|
||||
GLuint *prog_id = &brw->meta_stencil_blit_programs[msaa_tex];
|
||||
|
||||
if (*prog_id) {
|
||||
_mesa_UseProgram(*prog_id);
|
||||
return *prog_id;
|
||||
}
|
||||
|
||||
fs_source = ralloc_asprintf(NULL, fs_tmpl, sampler->sampler,
|
||||
sampler->fetch);
|
||||
_mesa_meta_compile_and_link_program(ctx, vs_source, fs_source,
|
||||
"i965 stencil blit",
|
||||
&prog_cache[msaa_tex]);
|
||||
prog_id);
|
||||
ralloc_free(fs_source);
|
||||
|
||||
return prog_cache[msaa_tex];
|
||||
return *prog_id;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -391,6 +393,7 @@ set_read_rb_tex_image(struct gl_context *ctx, struct fb_tex_blit_state *blit,
|
||||
|
||||
blit->baseLevelSave = tex_obj->BaseLevel;
|
||||
blit->maxLevelSave = tex_obj->MaxLevel;
|
||||
blit->stencilSamplingSave = tex_obj->StencilSampling;
|
||||
blit->sampler = _mesa_meta_setup_sampler(ctx, tex_obj, *target,
|
||||
GL_NEAREST, level);
|
||||
}
|
||||
@@ -426,7 +429,7 @@ brw_meta_stencil_blit(struct brw_context *brw,
|
||||
_mesa_TexParameteri(target, GL_DEPTH_STENCIL_TEXTURE_MODE,
|
||||
GL_STENCIL_INDEX);
|
||||
|
||||
prog = setup_program(ctx, target != GL_TEXTURE_2D);
|
||||
prog = setup_program(brw, target != GL_TEXTURE_2D);
|
||||
setup_bounding_rect(prog, orig_dims);
|
||||
setup_drawing_rect(prog, &dims);
|
||||
setup_coord_transform(prog, orig_dims);
|
||||
|
@@ -870,8 +870,7 @@ fs_instruction_scheduler::calculate_deps()
|
||||
} else if (inst->dst.is_accumulator() && gen6plus) {
|
||||
add_dep(last_accumulator_write, n);
|
||||
last_accumulator_write = n;
|
||||
} else if (inst->dst.file != BAD_FILE &&
|
||||
!inst->dst.is_null()) {
|
||||
} else if (inst->dst.file != BAD_FILE) {
|
||||
add_barrier_deps(n);
|
||||
}
|
||||
|
||||
@@ -998,8 +997,7 @@ fs_instruction_scheduler::calculate_deps()
|
||||
}
|
||||
} else if (inst->dst.is_accumulator() && gen6plus) {
|
||||
last_accumulator_write = n;
|
||||
} else if (inst->dst.file != BAD_FILE &&
|
||||
!inst->dst.is_null()) {
|
||||
} else if (inst->dst.file != BAD_FILE) {
|
||||
add_barrier_deps(n);
|
||||
}
|
||||
|
||||
@@ -1115,8 +1113,7 @@ vec4_instruction_scheduler::calculate_deps()
|
||||
} else if (inst->dst.is_accumulator() && gen6plus) {
|
||||
add_dep(last_accumulator_write, n);
|
||||
last_accumulator_write = n;
|
||||
} else if (inst->dst.file != BAD_FILE &&
|
||||
!inst->dst.is_null()) {
|
||||
} else if (inst->dst.file != BAD_FILE) {
|
||||
add_barrier_deps(n);
|
||||
}
|
||||
|
||||
@@ -1208,8 +1205,7 @@ vec4_instruction_scheduler::calculate_deps()
|
||||
last_fixed_grf_write = n;
|
||||
} else if (inst->dst.is_accumulator() && gen6plus) {
|
||||
last_accumulator_write = n;
|
||||
} else if (inst->dst.file != BAD_FILE &&
|
||||
!inst->dst.is_null()) {
|
||||
} else if (inst->dst.file != BAD_FILE) {
|
||||
add_barrier_deps(n);
|
||||
}
|
||||
|
||||
|
@@ -243,7 +243,8 @@ void gen7_upload_3dstate_so_decl_list(struct brw_context *brw,
|
||||
void gen8_init_vtable_surface_functions(struct brw_context *brw);
|
||||
|
||||
/* brw_wm_sampler_state.c */
|
||||
uint32_t translate_wrap_mode(GLenum wrap, bool using_nearest);
|
||||
uint32_t translate_wrap_mode(struct brw_context *brw,
|
||||
GLenum wrap, bool using_nearest);
|
||||
void upload_default_color(struct brw_context *brw,
|
||||
struct gl_sampler_object *sampler,
|
||||
int unit,
|
||||
|
@@ -464,7 +464,8 @@ vec4_visitor::dead_code_eliminate()
|
||||
}
|
||||
|
||||
if (inst->dst.file == scan_inst->dst.file &&
|
||||
inst->dst.reg == scan_inst->dst.reg) {
|
||||
inst->dst.reg == scan_inst->dst.reg &&
|
||||
inst->dst.reg_offset == scan_inst->dst.reg_offset) {
|
||||
int new_writemask = scan_inst->dst.writemask & ~dead_channels;
|
||||
|
||||
progress = try_eliminate_instruction(scan_inst, new_writemask, brw) ||
|
||||
|
@@ -1171,13 +1171,17 @@ vec4_visitor::emit_lrp(const dst_reg &dst,
|
||||
/* Earlier generations don't support three source operations, so we
|
||||
* need to emit x*(1-a) + y*a.
|
||||
*/
|
||||
dst_reg one_minus_a = dst_reg(this, glsl_type::vec4_type);
|
||||
one_minus_a.writemask = dst.writemask;
|
||||
dst_reg y_times_a = dst_reg(this, glsl_type::vec4_type);
|
||||
dst_reg one_minus_a = dst_reg(this, glsl_type::vec4_type);
|
||||
dst_reg x_times_one_minus_a = dst_reg(this, glsl_type::vec4_type);
|
||||
y_times_a.writemask = dst.writemask;
|
||||
one_minus_a.writemask = dst.writemask;
|
||||
x_times_one_minus_a.writemask = dst.writemask;
|
||||
|
||||
emit(MUL(y_times_a, y, a));
|
||||
emit(ADD(one_minus_a, negate(a), src_reg(1.0f)));
|
||||
vec4_instruction *mul = emit(MUL(dst_null_f(), y, a));
|
||||
mul->writes_accumulator = true;
|
||||
emit(MAC(dst, x, src_reg(one_minus_a)));
|
||||
emit(MUL(x_times_one_minus_a, x, src_reg(one_minus_a)));
|
||||
emit(ADD(dst, src_reg(x_times_one_minus_a), src_reg(y_times_a)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -352,7 +352,8 @@ brw_populate_sampler_prog_key_data(struct gl_context *ctx,
|
||||
if (alpha_depth || (brw->gen < 8 && !brw->is_haswell))
|
||||
key->swizzles[s] = brw_get_texture_swizzle(ctx, t);
|
||||
|
||||
if (sampler->MinFilter != GL_NEAREST &&
|
||||
if (brw->gen < 8 &&
|
||||
sampler->MinFilter != GL_NEAREST &&
|
||||
sampler->MagFilter != GL_NEAREST) {
|
||||
if (sampler->WrapS == GL_CLAMP)
|
||||
key->gl_clamp_mask[0] |= 1 << s;
|
||||
|
@@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
uint32_t
|
||||
translate_wrap_mode(GLenum wrap, bool using_nearest)
|
||||
translate_wrap_mode(struct brw_context *brw, GLenum wrap, bool using_nearest)
|
||||
{
|
||||
switch( wrap ) {
|
||||
case GL_REPEAT:
|
||||
@@ -55,9 +55,16 @@ translate_wrap_mode(GLenum wrap, bool using_nearest)
|
||||
/* GL_CLAMP is the weird mode where coordinates are clamped to
|
||||
* [0.0, 1.0], so linear filtering of coordinates outside of
|
||||
* [0.0, 1.0] give you half edge texel value and half border
|
||||
* color. The fragment shader will clamp the coordinates, and
|
||||
* we set clamp_border here, which gets the result desired. We
|
||||
* just use clamp(_to_edge) for nearest, because for nearest
|
||||
* color.
|
||||
*
|
||||
* Gen8+ supports this natively.
|
||||
*/
|
||||
if (brw->gen >= 8)
|
||||
return GEN8_TEXCOORDMODE_HALF_BORDER;
|
||||
|
||||
/* On Gen4-7.5, we clamp the coordinates in the fragment shader
|
||||
* and set clamp_border here, which gets the result desired.
|
||||
* We just use clamp(_to_edge) for nearest, because for nearest
|
||||
* clamping to 1.0 gives border color instead of the desired
|
||||
* edge texels.
|
||||
*/
|
||||
@@ -276,11 +283,11 @@ static void brw_update_sampler_state(struct brw_context *brw,
|
||||
}
|
||||
}
|
||||
|
||||
sampler->ss1.r_wrap_mode = translate_wrap_mode(gl_sampler->WrapR,
|
||||
sampler->ss1.r_wrap_mode = translate_wrap_mode(brw, gl_sampler->WrapR,
|
||||
using_nearest);
|
||||
sampler->ss1.s_wrap_mode = translate_wrap_mode(gl_sampler->WrapS,
|
||||
sampler->ss1.s_wrap_mode = translate_wrap_mode(brw, gl_sampler->WrapS,
|
||||
using_nearest);
|
||||
sampler->ss1.t_wrap_mode = translate_wrap_mode(gl_sampler->WrapT,
|
||||
sampler->ss1.t_wrap_mode = translate_wrap_mode(brw, gl_sampler->WrapT,
|
||||
using_nearest);
|
||||
|
||||
if (brw->gen >= 6 &&
|
||||
|
@@ -106,7 +106,7 @@ upload_clip_state(struct brw_context *brw)
|
||||
dw2 &= ~GEN6_CLIP_GB_TEST;
|
||||
if (brw->gen >= 8) {
|
||||
perf_debug("Disabling GB clipping due to lack of Gen8 viewport "
|
||||
"clipping setup code. This should be fixed.");
|
||||
"clipping setup code. This should be fixed.\n");
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -116,7 +116,7 @@ upload_clip_state(struct brw_context *brw)
|
||||
if (ctx->RasterDiscard) {
|
||||
dw2 |= GEN6_CLIP_MODE_REJECT_ALL;
|
||||
perf_debug("Rasterizer discard is currently implemented via the clipper; "
|
||||
"%s be faster.", brw->gen >= 7 ? "using the SOL unit may" :
|
||||
"%s be faster.\n", brw->gen >= 7 ? "using the SOL unit may" :
|
||||
"having the GS not write primitives would likely");
|
||||
}
|
||||
|
||||
|
@@ -103,11 +103,11 @@ gen7_update_sampler_state(struct brw_context *brw, int unit, int ss_index,
|
||||
}
|
||||
}
|
||||
|
||||
sampler->ss3.r_wrap_mode = translate_wrap_mode(gl_sampler->WrapR,
|
||||
sampler->ss3.r_wrap_mode = translate_wrap_mode(brw, gl_sampler->WrapR,
|
||||
using_nearest);
|
||||
sampler->ss3.s_wrap_mode = translate_wrap_mode(gl_sampler->WrapS,
|
||||
sampler->ss3.s_wrap_mode = translate_wrap_mode(brw, gl_sampler->WrapS,
|
||||
using_nearest);
|
||||
sampler->ss3.t_wrap_mode = translate_wrap_mode(gl_sampler->WrapT,
|
||||
sampler->ss3.t_wrap_mode = translate_wrap_mode(brw, gl_sampler->WrapT,
|
||||
using_nearest);
|
||||
|
||||
/* Cube-maps on 965 and later must use the same wrap mode for all 3
|
||||
|
@@ -337,6 +337,8 @@ gen7_update_texture_surface(struct gl_context *ctx,
|
||||
/* mip count */
|
||||
(intelObj->_MaxLevel - tObj->BaseLevel));
|
||||
|
||||
surf[7] = mt->fast_clear_color_value;
|
||||
|
||||
if (brw->is_haswell) {
|
||||
/* Handling GL_ALPHA as a surface format override breaks 1.30+ style
|
||||
* texturing functions that return a float, as our code generation always
|
||||
@@ -351,7 +353,7 @@ gen7_update_texture_surface(struct gl_context *ctx,
|
||||
|
||||
const bool need_scs_green_to_blue = for_gather && tex_format == BRW_SURFACEFORMAT_R32G32_FLOAT_LD;
|
||||
|
||||
surf[7] =
|
||||
surf[7] |=
|
||||
SET_FIELD(brw_swizzle_to_scs(GET_SWZ(swizzle, 0), need_scs_green_to_blue), GEN7_SURFACE_SCS_R) |
|
||||
SET_FIELD(brw_swizzle_to_scs(GET_SWZ(swizzle, 1), need_scs_green_to_blue), GEN7_SURFACE_SCS_G) |
|
||||
SET_FIELD(brw_swizzle_to_scs(GET_SWZ(swizzle, 2), need_scs_green_to_blue), GEN7_SURFACE_SCS_B) |
|
||||
|
@@ -225,6 +225,13 @@ gen8_hiz_exec(struct brw_context *brw, struct intel_mipmap_tree *mt,
|
||||
assert(mt->first_level == 0);
|
||||
assert(mt->logical_depth0 >= 1);
|
||||
|
||||
/* If we're operating on LOD 0, align to 8x4 to meet the alignment
|
||||
* requirements for most HiZ operations. Otherwise, use the actual size
|
||||
* to allow the hardware to calculate the miplevel offsets correctly.
|
||||
*/
|
||||
uint32_t surface_width = ALIGN(mt->logical_width0, level == 0 ? 8 : 1);
|
||||
uint32_t surface_height = ALIGN(mt->logical_height0, level == 0 ? 4 : 1);
|
||||
|
||||
/* The basic algorithm is:
|
||||
* - If needed, emit 3DSTATE_{DEPTH,HIER_DEPTH,STENCIL}_BUFFER and
|
||||
* 3DSTATE_CLEAR_PARAMS packets to set up the relevant buffers.
|
||||
@@ -239,14 +246,19 @@ gen8_hiz_exec(struct brw_context *brw, struct intel_mipmap_tree *mt,
|
||||
true, /* depth writes */
|
||||
NULL, false, 0, /* no stencil for now */
|
||||
true, /* hiz */
|
||||
mt->logical_width0,
|
||||
mt->logical_height0,
|
||||
surface_width,
|
||||
surface_height,
|
||||
mt->logical_depth0,
|
||||
level,
|
||||
layer); /* min_array_element */
|
||||
|
||||
unsigned rect_width = minify(mt->logical_width0, level);
|
||||
unsigned rect_height = minify(mt->logical_height0, level);
|
||||
/* Depth buffer clears and HiZ resolves must use an 8x4 aligned rectangle.
|
||||
* Note that intel_miptree_level_enable_hiz disables HiZ for miplevels > 0
|
||||
* which aren't 8x4 aligned, so expanding the size is safe - it'll just
|
||||
* draw into empty padding space.
|
||||
*/
|
||||
unsigned rect_width = ALIGN(minify(mt->logical_width0, level), 8);
|
||||
unsigned rect_height = ALIGN(minify(mt->logical_height0, level), 4);
|
||||
|
||||
BEGIN_BATCH(4);
|
||||
OUT_BATCH(_3DSTATE_DRAWING_RECTANGLE << 16 | (4 - 2));
|
||||
|
@@ -94,8 +94,6 @@ gen8_emit_vertices(struct brw_context *brw)
|
||||
if (brw->vb.nr_buffers) {
|
||||
assert(brw->vb.nr_buffers <= 33);
|
||||
|
||||
perf_debug("Missing MOCS setup for 3DSTATE_VERTEX_BUFFERS.");
|
||||
|
||||
BEGIN_BATCH(1 + 4*brw->vb.nr_buffers);
|
||||
OUT_BATCH((_3DSTATE_VERTEX_BUFFERS << 16) | (4*brw->vb.nr_buffers - 1));
|
||||
for (unsigned i = 0; i < brw->vb.nr_buffers; i++) {
|
||||
@@ -213,11 +211,9 @@ gen8_emit_index_buffer(struct brw_context *brw)
|
||||
if (index_buffer == NULL)
|
||||
return;
|
||||
|
||||
perf_debug("Missing MOCS setup for 3DSTATE_INDEX_BUFFER.");
|
||||
|
||||
BEGIN_BATCH(5);
|
||||
OUT_BATCH(CMD_INDEX_BUFFER << 16 | (5 - 2));
|
||||
OUT_BATCH(brw_get_index_type(index_buffer->type) << 8);
|
||||
OUT_BATCH(brw_get_index_type(index_buffer->type) << 8 | BDW_MOCS_WB);
|
||||
OUT_RELOC64(brw->ib.bo, I915_GEM_DOMAIN_VERTEX, 0, 0);
|
||||
OUT_BATCH(brw->ib.bo->size);
|
||||
ADVANCE_BATCH();
|
||||
|
@@ -31,8 +31,6 @@
|
||||
*/
|
||||
static void upload_state_base_address(struct brw_context *brw)
|
||||
{
|
||||
perf_debug("Missing MOCS setup for STATE_BASE_ADDRESS.");
|
||||
|
||||
BEGIN_BATCH(16);
|
||||
OUT_BATCH(CMD_STATE_BASE_ADDRESS << 16 | (16 - 2));
|
||||
/* General state base address: stateless DP read/write requests */
|
||||
|
@@ -207,9 +207,11 @@ gen8_update_texture_surface(struct gl_context *ctx,
|
||||
(firstImage->_BaseFormat == GL_DEPTH_COMPONENT ||
|
||||
firstImage->_BaseFormat == GL_DEPTH_STENCIL);
|
||||
|
||||
surf[7] = mt->fast_clear_color_value;
|
||||
|
||||
const int swizzle =
|
||||
unlikely(alpha_depth) ? SWIZZLE_XYZW : brw_get_texture_swizzle(ctx, tObj);
|
||||
surf[7] =
|
||||
surf[7] |=
|
||||
SET_FIELD(brw_swizzle_to_scs(GET_SWZ(swizzle, 0), false), GEN7_SURFACE_SCS_R) |
|
||||
SET_FIELD(brw_swizzle_to_scs(GET_SWZ(swizzle, 1), false), GEN7_SURFACE_SCS_G) |
|
||||
SET_FIELD(brw_swizzle_to_scs(GET_SWZ(swizzle, 2), false), GEN7_SURFACE_SCS_B) |
|
||||
|
@@ -443,14 +443,14 @@ gen8_vec4_generator::generate_pull_constant_load(vec4_instruction *inst,
|
||||
gen8_instruction *send = next_inst(BRW_OPCODE_SEND);
|
||||
gen8_set_dst(brw, send, dst);
|
||||
gen8_set_src0(brw, send, offset);
|
||||
gen8_set_dp_message(brw, send, GEN7_SFID_DATAPORT_DATA_CACHE,
|
||||
surf_index,
|
||||
GEN6_DATAPORT_READ_MESSAGE_OWORD_DUAL_BLOCK_READ,
|
||||
0, /* message control */
|
||||
1, /* mlen */
|
||||
1, /* rlen */
|
||||
false, /* no header */
|
||||
false); /* EOT */
|
||||
gen8_set_sampler_message(brw, send,
|
||||
surf_index,
|
||||
0, /* The LD message ignores the sampler unit. */
|
||||
GEN5_SAMPLER_MESSAGE_SAMPLE_LD,
|
||||
1, /* rlen */
|
||||
1, /* mlen */
|
||||
false, /* no header */
|
||||
BRW_SAMPLER_SIMD_MODE_SIMD4X2);
|
||||
|
||||
brw_mark_surface_used(&prog_data->base, surf_index);
|
||||
}
|
||||
|
@@ -180,11 +180,6 @@ _mesa_Clear( GLbitfield mask )
|
||||
return;
|
||||
}
|
||||
|
||||
if (ctx->DrawBuffer->Width == 0 || ctx->DrawBuffer->Height == 0 ||
|
||||
ctx->DrawBuffer->_Xmin >= ctx->DrawBuffer->_Xmax ||
|
||||
ctx->DrawBuffer->_Ymin >= ctx->DrawBuffer->_Ymax)
|
||||
return;
|
||||
|
||||
if (ctx->RasterDiscard)
|
||||
return;
|
||||
|
||||
|
@@ -847,6 +847,16 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
|
||||
v->value_int = ctx->Array.VAO->IndexBufferObj->Name;
|
||||
break;
|
||||
|
||||
/* ARB_vertex_array_bgra */
|
||||
case GL_COLOR_ARRAY_SIZE:
|
||||
array = &ctx->Array.VAO->VertexAttrib[VERT_ATTRIB_COLOR0];
|
||||
v->value_int = array->Format == GL_BGRA ? GL_BGRA : array->Size;
|
||||
break;
|
||||
case GL_SECONDARY_COLOR_ARRAY_SIZE:
|
||||
array = &ctx->Array.VAO->VertexAttrib[VERT_ATTRIB_COLOR1];
|
||||
v->value_int = array->Format == GL_BGRA ? GL_BGRA : array->Size;
|
||||
break;
|
||||
|
||||
/* ARB_copy_buffer */
|
||||
case GL_COPY_READ_BUFFER:
|
||||
v->value_int = ctx->CopyReadBuffer->Name;
|
||||
@@ -995,7 +1005,11 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
|
||||
break;
|
||||
/* GL_ARB_shader_atomic_counters */
|
||||
case GL_ATOMIC_COUNTER_BUFFER_BINDING:
|
||||
v->value_int = ctx->AtomicBuffer->Name;
|
||||
if (ctx->AtomicBuffer) {
|
||||
v->value_int = ctx->AtomicBuffer->Name;
|
||||
} else {
|
||||
v->value_int = 0;
|
||||
}
|
||||
break;
|
||||
/* GL_ARB_draw_indirect */
|
||||
case GL_DRAW_INDIRECT_BUFFER_BINDING:
|
||||
|
@@ -52,7 +52,7 @@ def print_header():
|
||||
(prime_factor, prime_step)
|
||||
|
||||
def print_params(params):
|
||||
print "static struct value_desc values[] = {"
|
||||
print "static const struct value_desc values[] = {"
|
||||
for p in params:
|
||||
print " { %s, %s }," % (p[0], p[1])
|
||||
|
||||
|
@@ -199,7 +199,7 @@ descriptor=[
|
||||
[ "NORMAL_ARRAY_TYPE", "ARRAY_ENUM(VertexAttrib[VERT_ATTRIB_NORMAL].Type), NO_EXTRA" ],
|
||||
[ "NORMAL_ARRAY_STRIDE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_NORMAL].Stride), NO_EXTRA" ],
|
||||
[ "COLOR_ARRAY", "ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_COLOR0].Enabled), NO_EXTRA" ],
|
||||
[ "COLOR_ARRAY_SIZE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR0].Size), NO_EXTRA" ],
|
||||
[ "COLOR_ARRAY_SIZE", "LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA" ],
|
||||
[ "COLOR_ARRAY_TYPE", "ARRAY_ENUM(VertexAttrib[VERT_ATTRIB_COLOR0].Type), NO_EXTRA" ],
|
||||
[ "COLOR_ARRAY_STRIDE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR0].Stride), NO_EXTRA" ],
|
||||
[ "TEXTURE_COORD_ARRAY", "LOC_CUSTOM, TYPE_BOOLEAN, offsetof(struct gl_client_array, Enabled), NO_EXTRA" ],
|
||||
@@ -552,7 +552,7 @@ descriptor=[
|
||||
[ "SECONDARY_COLOR_ARRAY", "ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_COLOR1].Enabled), NO_EXTRA" ],
|
||||
[ "SECONDARY_COLOR_ARRAY_TYPE", "ARRAY_ENUM(VertexAttrib[VERT_ATTRIB_COLOR1].Type), NO_EXTRA" ],
|
||||
[ "SECONDARY_COLOR_ARRAY_STRIDE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR1].Stride), NO_EXTRA" ],
|
||||
[ "SECONDARY_COLOR_ARRAY_SIZE", "ARRAY_INT(VertexAttrib[VERT_ATTRIB_COLOR1].Size), NO_EXTRA" ],
|
||||
[ "SECONDARY_COLOR_ARRAY_SIZE", "LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA" ],
|
||||
|
||||
# GL_EXT_fog_coord
|
||||
[ "CURRENT_FOG_COORDINATE", "CONTEXT_FLOAT(Current.Attrib[VERT_ATTRIB_FOG][0]), extra_flush_current" ],
|
||||
|
@@ -552,6 +552,7 @@ _mesa_clone_program(struct gl_context *ctx, const struct gl_program *prog)
|
||||
gpc->InputType = gp->InputType;
|
||||
gpc->Invocations = gp->Invocations;
|
||||
gpc->OutputType = gp->OutputType;
|
||||
gpc->UsesEndPrimitive = gp->UsesEndPrimitive;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@@ -679,32 +679,36 @@ st_translate_fragment_program(struct st_context *st,
|
||||
outputsWritten &= ~(1 << FRAG_RESULT_STENCIL);
|
||||
}
|
||||
|
||||
if (outputsWritten & BITFIELD64_BIT(FRAG_RESULT_SAMPLE_MASK)) {
|
||||
fs_output_semantic_name[fs_num_outputs] = TGSI_SEMANTIC_SAMPLEMASK;
|
||||
fs_output_semantic_index[fs_num_outputs] = 0;
|
||||
outputMapping[FRAG_RESULT_SAMPLE_MASK] = fs_num_outputs;
|
||||
fs_num_outputs++;
|
||||
outputsWritten &= ~(1 << FRAG_RESULT_SAMPLE_MASK);
|
||||
}
|
||||
|
||||
/* handle remaining outputs (color) */
|
||||
for (attr = 0; attr < FRAG_RESULT_MAX; attr++) {
|
||||
if (outputsWritten & BITFIELD64_BIT(attr)) {
|
||||
int semantic = TGSI_SEMANTIC_COLOR;
|
||||
switch (attr) {
|
||||
case FRAG_RESULT_DEPTH:
|
||||
case FRAG_RESULT_STENCIL:
|
||||
case FRAG_RESULT_SAMPLE_MASK:
|
||||
/* handled above */
|
||||
assert(0);
|
||||
break;
|
||||
case FRAG_RESULT_COLOR:
|
||||
write_all = GL_TRUE;
|
||||
break;
|
||||
case FRAG_RESULT_SAMPLE_MASK:
|
||||
semantic = TGSI_SEMANTIC_SAMPLEMASK;
|
||||
write_all = GL_TRUE; /* fallthrough */
|
||||
default:
|
||||
assert(attr == FRAG_RESULT_COLOR ||
|
||||
(FRAG_RESULT_DATA0 <= attr && attr < FRAG_RESULT_MAX));
|
||||
fs_output_semantic_name[fs_num_outputs] = TGSI_SEMANTIC_COLOR;
|
||||
fs_output_semantic_index[fs_num_outputs] = numColors;
|
||||
outputMapping[attr] = fs_num_outputs;
|
||||
numColors++;
|
||||
break;
|
||||
}
|
||||
|
||||
assert(attr == FRAG_RESULT_COLOR ||
|
||||
attr == FRAG_RESULT_SAMPLE_MASK ||
|
||||
(FRAG_RESULT_DATA0 <= attr && attr < FRAG_RESULT_MAX));
|
||||
fs_output_semantic_name[fs_num_outputs] = semantic;
|
||||
fs_output_semantic_index[fs_num_outputs] = numColors;
|
||||
outputMapping[attr] = fs_num_outputs;
|
||||
numColors++;
|
||||
|
||||
fs_num_outputs++;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user