Compare commits
91 Commits
mesa-9.0.2
...
9.0
Author | SHA1 | Date | |
---|---|---|---|
|
1041bfe6dd | ||
|
ba73bea5d0 | ||
|
4d07d52e27 | ||
|
18973c7f0f | ||
|
ee30fd0ea0 | ||
|
3d80d54bc9 | ||
|
205f537b5a | ||
|
c864835b3d | ||
|
fde69f8500 | ||
|
f75b27a53e | ||
|
183a28a34a | ||
|
f84fe6aa2e | ||
|
be7048477a | ||
|
4e35ffa762 | ||
|
15693b7925 | ||
|
dddc5df519 | ||
|
e11ef54a92 | ||
|
2de8874ec3 | ||
|
d47020b6d4 | ||
|
52c711e5b2 | ||
|
71e3ee38ac | ||
|
fdfb299c22 | ||
|
2389fcc802 | ||
|
cef854dba7 | ||
|
adcf0a0cf4 | ||
|
663e41547a | ||
|
d40df80732 | ||
|
914368538e | ||
|
c760677c85 | ||
|
a1cb12c1fb | ||
|
d32aff91c1 | ||
|
d4fc90c129 | ||
|
5fdc42fb87 | ||
|
527b3b8555 | ||
|
9d4ab9a663 | ||
|
dca04373c2 | ||
|
a8f8287154 | ||
|
d2d3cd2be7 | ||
|
f4e33c551d | ||
|
8d38c72298 | ||
|
3fa0423c02 | ||
|
6b745a4e24 | ||
|
998f402af5 | ||
|
63f8589430 | ||
|
1151cdfa9e | ||
|
ffaa1c92e9 | ||
|
765221c0d5 | ||
|
c10c3eab4c | ||
|
2cde1e592e | ||
|
96c1678c3a | ||
|
af41a1d491 | ||
|
3a39c3cb67 | ||
|
938b156d82 | ||
|
cd95b67347 | ||
|
439842e434 | ||
|
3bdb758934 | ||
|
dcb6a7ccbb | ||
|
e8830f5a40 | ||
|
e6e58cfa9d | ||
|
5f8a8716b6 | ||
|
460096f5da | ||
|
25e34c3526 | ||
|
794c133dfb | ||
|
9ae069dbbd | ||
|
4a0423e1bd | ||
|
e582e35227 | ||
|
37be707f57 | ||
|
b086d9ced7 | ||
|
ce22054074 | ||
|
b7af6550b1 | ||
|
738d1ae3b5 | ||
|
3479fdef2f | ||
|
ebd4883a0c | ||
|
78222e6363 | ||
|
1e8de8437a | ||
|
d9c7fcff8f | ||
|
bc7112746d | ||
|
29bc8e7d8f | ||
|
de150e2478 | ||
|
a3d2e3e061 | ||
|
0ba14013f6 | ||
|
a474b455ac | ||
|
457eab5a9b | ||
|
871da78263 | ||
|
d02343e501 | ||
|
e479370164 | ||
|
42df904f88 | ||
|
3ebfd3f774 | ||
|
b922999a40 | ||
|
0f687f8455 | ||
|
f3374c6dda |
@@ -54,7 +54,7 @@ distclean-local:
|
||||
|
||||
# Rules for making release tarballs
|
||||
|
||||
PACKAGE_VERSION=9.0.2
|
||||
PACKAGE_VERSION=9.0.3
|
||||
PACKAGE_DIR = Mesa-$(PACKAGE_VERSION)
|
||||
PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
|
||||
|
||||
|
@@ -13,3 +13,29 @@ b5891286202987dfc2606ac716050c0ee426de11 intel: Fix yet-another-bug in intel_tex
|
||||
|
||||
# Introduces performance regressions for other games... don't cherry-pick for now
|
||||
fa58644855e44830e0b91dc627703c236fa6712a r600g: fix abysmal performance in Reaction Quake
|
||||
|
||||
# i965 guardband clipping is disabled in 9.0, so no need to fix bugs in it
|
||||
23e7b81f2d742d292d77b53ac9cf72c3d89fc798 i965: Use fewer temporary variables in c
|
||||
lip setup.
|
||||
d411bbd5bd895617e265e023213895100e4509ef i965: Disable the GB clip test when a li
|
||||
mited viewport is set.
|
||||
|
||||
# Candidates for 9.1
|
||||
1559994cba380a4e87a5e8dbb04b0a7475711756 i965: Fix assignment instead of comparison in asserts.
|
||||
5c86a728d4f688c0fe7fbf9f4b8f88060b65c4ee r600g: fix htile buffer leak
|
||||
a06f03d795153ce060d99aafb61d10c27a47efc1 r300g: always put MSAA resources in VRAM
|
||||
a8a5055f2dea1960898763d17f28043577c3e64e radeonsi: Fix draws using user index buffer.
|
||||
257006e2a4201c11ca5f800a74ac4aaf62a7bfc1 r600g/llvm: Select the correct GPU type for RV670
|
||||
e5fb7347a72118bf06dfabaa453208578c7ad876 radeonsi: Adapt to sample intrinsics changes.
|
||||
120efeef8b51c16924dafa6bbeb017a856db911b radeonsi: Improve packing of texture address parameters.
|
||||
6bcb8238446060db665425d9f63eb0c1b3ba9f68 radeonsi: Enable texture arrays.
|
||||
6455d40b7ec09e3a3923c9b78952dc29627afed1 radeonsi: Remove spurious traces of R16G16B16 support.
|
||||
2db1f73849260cf8e5a7e390d04f5f26141a0b37 builtin_compiler/build: Don't use *_FOR_BUILD when not cross compiling
|
||||
11bd1b0f589bfeab8fcad5c70adf4c8a665eebc9 gallium/egl: Fix include dirs for VPATH build
|
||||
b92900d26a54ef997f2920d6a7371bb7c9caabf8 mesa/glsl: Separate parsing logic from _mesa_get_uniform_location.
|
||||
b4db34cc4c047427a21efb9bde03d7e125f70e55 glsl: Rename uniform_field_visitor to program_resource_visitor.
|
||||
53febac02c382fa163a9ad7280fc5f4d2707a665 glsl: Use parse_program_resource_name to parse transform feedback varyings.
|
||||
99b78337e38308480ee491493b045179f10ed579 glsl: Support transform feedback of varying structs.
|
||||
83e4407f443fb6baeccf9aefee291c82adcaa58b radeonsi: add support for Oland chips
|
||||
af0af75881ea99452086afd6907780de77af6e96 radeonsi: default PA_SC_RASTER_CONFIG to 0
|
||||
4161d70bba567e6e73d5e9e993a74d81930d0e72 radeonsi: add Oland pci ids
|
||||
|
@@ -10,7 +10,7 @@ CONFIG_NAME = default
|
||||
# Version info
|
||||
MESA_MAJOR=9
|
||||
MESA_MINOR=0
|
||||
MESA_TINY=2
|
||||
MESA_TINY=3
|
||||
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
|
||||
|
||||
# external projects. This should be useless now that we use libdrm.
|
||||
|
24
configure.ac
24
configure.ac
@@ -6,7 +6,7 @@ dnl Tell the user about autoconf.html in the --help output
|
||||
m4_divert_once([HELP_END], [
|
||||
See docs/autoconf.html for more details on the options for Mesa.])
|
||||
|
||||
AC_INIT([Mesa], [9.0.2],
|
||||
AC_INIT([Mesa], [9.0.3],
|
||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa])
|
||||
AC_CONFIG_AUX_DIR([bin])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
@@ -50,6 +50,7 @@ AM_PROG_CC_C_O
|
||||
AM_PROG_AS
|
||||
AC_CHECK_PROGS([MAKE], [gmake make])
|
||||
AC_CHECK_PROGS([PYTHON2], [python2 python])
|
||||
AX_PYTHON_MODULE([libxml2], [needed])
|
||||
AC_PROG_SED
|
||||
AC_PROG_MKDIR_P
|
||||
AC_PATH_PROG([MKDEP], [makedepend])
|
||||
@@ -671,6 +672,17 @@ if test "x$enable_opengl" = xno -a \
|
||||
AC_MSG_ERROR([at least one API should be enabled])
|
||||
fi
|
||||
|
||||
# Building OpenGL ES1 and/or ES2 without OpenGL is not supported on mesa 9.0.x
|
||||
if test "x$enable_opengl" = xno -a \
|
||||
"x$enable_gles1" = xyes; then
|
||||
AC_MSG_ERROR([Building OpenGL ES1 without OpenGL is not supported])
|
||||
fi
|
||||
|
||||
if test "x$enable_opengl" = xno -a \
|
||||
"x$enable_gles2" = xyes; then
|
||||
AC_MSG_ERROR([Building OpenGL ES2 without OpenGL is not supported])
|
||||
fi
|
||||
|
||||
API_DEFINES=""
|
||||
if test "x$enable_opengl" = xno; then
|
||||
API_DEFINES="$API_DEFINES -DFEATURE_GL=0"
|
||||
@@ -694,6 +706,16 @@ if test "x$enable_dri$enable_xlib_glx" = xyesyes; then
|
||||
AC_MSG_ERROR([DRI and Xlib-GLX cannot be built together])
|
||||
fi
|
||||
|
||||
if test "x$enable_opengl$enable_xlib_glx" = xnoyes; then
|
||||
AC_MSG_ERROR([Xlib-GLX cannot be built without OpenGL])
|
||||
fi
|
||||
|
||||
# Disable GLX if OpenGL is not enabled
|
||||
if test "x$enable_glx$enable_opengl" = xyesno; then
|
||||
AC_MSG_WARN([OpenGL not enabled, disabling GLX])
|
||||
enable_glx=no
|
||||
fi
|
||||
|
||||
# Disable GLX if DRI and Xlib-GLX are not enabled
|
||||
if test "x$enable_glx" = xyes -a \
|
||||
"x$enable_dri" = xno -a \
|
||||
|
@@ -9,6 +9,22 @@
|
||||
|
||||
<h1>News</h1>
|
||||
|
||||
<h2>February 21, 2013</h2>
|
||||
|
||||
<p>
|
||||
<a href="relnotes-9.0.3.html">Mesa 9.0.3</a> is released.
|
||||
This is a bug fix release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>January 22, 2013</h2>
|
||||
|
||||
<p>
|
||||
<a href="relnotes-9.0.2.html">Mesa 9.0.2</a> is released.
|
||||
This is a bug fix release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>November 16, 2012</h2>
|
||||
|
||||
<p>
|
||||
|
@@ -23,7 +23,9 @@ because GL_ARB_compatibility is not supported.
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
TBD
|
||||
5ae216ca9fecfa349f14ecb83aa3f124 MesaLib-9.0.2.tar.gz
|
||||
dc45d1192203e418163e0017640e1cfc MesaLib-9.0.2.tar.bz2
|
||||
93d40ec77d656dd04b561ba203ffbb91 MesaLib-9.0.2.zip
|
||||
</pre>
|
||||
|
||||
<h2>New features</h2>
|
||||
|
239
docs/relnotes-9.0.3.html
Normal file
239
docs/relnotes-9.0.3.html
Normal file
@@ -0,0 +1,239 @@
|
||||
<!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>
|
||||
|
||||
<h1>Mesa 9.0.3 Release Notes / February 21th, 2013</h1>
|
||||
|
||||
<p>
|
||||
Mesa 9.0.3 is a bug fix release which fixes bugs found since the 9.0.2 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 9.0 implements the OpenGL 3.1 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.1. OpenGL
|
||||
3.1 is <strong>only</strong> available if requested at context creation
|
||||
because GL_ARB_compatibility is not supported.
|
||||
</p>
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
168384ac0101f4600a15edd3561acdc7 MesaLib-9.0.3.tar.gz
|
||||
d7515cc5116c72ac63d735655bd63689 MesaLib-9.0.3.tar.bz2
|
||||
a2e1c794572440fd0d839a7d7dfea00c MesaLib-9.0.3.zip
|
||||
</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=25201">Bug 25201</a> - Pink artifacts on objects in the distance in ETQW/Quake 4</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=31598">Bug 31598</a> - configure: Doesn't check for python libxml2</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=40404">Bug 40404</a> - [softpipe] piglit glsl-max-varyings regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=47220">Bug 47220</a> - [bisected] Oglc pxconv-gettex(basic.allCases) regressed</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=48629">Bug 48629</a> - [bisected i965]Oglc shad-compiler(advanced.TestLessThani) regressed</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=54240">Bug 54240</a> - [swrast] piglit fbo-generatemipmap-filtering regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=56920">Bug 56920</a> - [sandybridge][uxa] graphics very glitchy and always flickering</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=57166">Bug 57166</a> - [GM45] Chrome experiment "Stars" crash: brw_fs_emit.cpp:708: brw_reg brw_reg_from_fs_reg(fs_reg*): Assertion „!"not reached"“ failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=57746">Bug 57746</a> - build test failure: nouveau_fbo.c:198:3: error: too few arguments to function 'nouveau_renderbuffer_del'</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=57754">Bug 57754</a> - [swrast] Mesa 9.1-devel implementation error: Unable to delete renderbuffer, no context</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=58680">Bug 58680</a> - [IVB] Graphical glitches in 0 A.D</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=58972">Bug 58972</a> - [softpipe] util/u_tile.c:795:pipe_put_tile_z: Assertion `0' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=59364">Bug 59364</a> - [bisected] Mesa build fails: clientattrib.c:33:22: fatal error: indirect.h: No such file or directory</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=59700">Bug 59700</a> - [ILK/SNB/IVB Bisected]Oglc vertexshader(advanced.TestLightsTwoSided) causes GPU hung</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=59873">Bug 59873</a> - [swrast] piglit ext_framebuffer_multisample-interpolation 0 centroid-edges regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60052">Bug 60052</a> - [Bisected]Piglit glx_extension_string_sanity fail</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=60172">Bug 60172</a> - Planeshift: triangles where grass would be</li>
|
||||
|
||||
<!-- <li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=">Bug </a> - </li> -->
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
<p>The full set of changes can be viewed by using the following GIT command:</p>
|
||||
|
||||
<pre>
|
||||
git log mesa-9.0.2..mesa-9.0.3
|
||||
</pre>
|
||||
|
||||
<p>Adam Jackson (1):</p>
|
||||
<ul>
|
||||
<li>r200: Fix probable thinko in r200EmitArrays</li>
|
||||
</ul>
|
||||
|
||||
<p>Andreas Boll (7):</p>
|
||||
<ul>
|
||||
<li>docs: Add 9.0.2 release md5sums</li>
|
||||
<li>docs: add news item for 9.0.2 release</li>
|
||||
<li>configure.ac: Allow OpenGL ES1 and ES2 only with enabled OpenGL</li>
|
||||
<li>build: require python module libxml2</li>
|
||||
<li>cherry-ignore: Ignore candidates for the 9.1 branch.</li>
|
||||
<li>mesa: Bump version to 9.0.3</li>
|
||||
<li>docs: Add 9.0.3 release notes</li>
|
||||
</ul>
|
||||
|
||||
<p>Anuj Phogat (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Fix GL_LUMINANCE handling for textures in glGetTexImage</li>
|
||||
</ul>
|
||||
|
||||
<p>Brian Paul (29):</p>
|
||||
<ul>
|
||||
<li>st/glx: accept GLX_SAMPLE_BUFFERS/SAMPLES_ARB == 0</li>
|
||||
<li>draw: set precalc_flat flag for AA lines too</li>
|
||||
<li>softpipe: fix up FS variant unbinding / deletion</li>
|
||||
<li>softpipe: fix unreliable FS variant binding bug</li>
|
||||
<li>xlib: handle _mesa_initialize_visual()'s return value</li>
|
||||
<li>xlib: allow GLX_DONT_CARE for glXChooseFBConfig() attribute values</li>
|
||||
<li>st/glx: allow GLX_DONT_CARE for glXChooseFBConfig() attribute values</li>
|
||||
<li>util: fix addressing bug in pipe_put_tile_z() for PIPE_FORMAT_Z32_FLOAT</li>
|
||||
<li>util: add get/put_tile_z() support for PIPE_FORMAT_Z32_FLOAT_S8X24_UINT</li>
|
||||
<li>mesa: use GLbitfield64 when copying program inputs</li>
|
||||
<li>svga: add NULL pointer check in svga_create_sampler_state()</li>
|
||||
<li>vbo: add a null pointer check to handle OOM instead of crashing</li>
|
||||
<li>osmesa: use _mesa_generate_mipmap() for mipmap generation, not meta</li>
|
||||
<li>xlib: use _mesa_generate_mipmap() for mipmap generation, not meta</li>
|
||||
<li>st/mesa: set ctx->Const.MaxSamples = 0, not 1</li>
|
||||
<li>mesa: fix-up and use _mesa_delete_renderbuffer()</li>
|
||||
<li>mesa: pass context parameter to gl_renderbuffer::Delete()</li>
|
||||
<li>st/mesa: fix context use-after-free problem in st_renderbuffer_delete()</li>
|
||||
<li>dri_glx: fix use after free report</li>
|
||||
<li>mesa: remove warning message in _mesa_reference_renderbuffer_()</li>
|
||||
<li>st/mesa: add null pointer check in st_renderbuffer_delete()</li>
|
||||
<li>util: add some defensive coding in u_upload_alloc()</li>
|
||||
<li>st/mesa: do proper error checking for u_upload_alloc() calls</li>
|
||||
<li>util: add new error checking code in vbuf helper</li>
|
||||
<li>mesa: don't enable GL_EXT_framebuffer_multisample for software drivers</li>
|
||||
<li>st/mesa: only enable GL_EXT_framebuffer_multisample if GL_MAX_SAMPLES >= 2</li>
|
||||
<li>mesa: don't expose IBM_rasterpos_clip in a core context</li>
|
||||
<li>svga: fix sRGB rendering</li>
|
||||
<li>nouveau: Fix build.</li>
|
||||
</ul>
|
||||
|
||||
<p>Chad Versace (1):</p>
|
||||
<ul>
|
||||
<li>i965/disasm: Fix horizontal stride of dest registers</li>
|
||||
</ul>
|
||||
|
||||
<p>Eric Anholt (5):</p>
|
||||
<ul>
|
||||
<li>i965/fs: Fix the gen6-specific if handling for 80ecb8f15b9ad7d6edc</li>
|
||||
<li>i965/fs: Don't generate saturates over existing variable values.</li>
|
||||
<li>i965: Actually add support for GL_ANY_SAMPLES_PASSED from GL_ARB_oq2.</li>
|
||||
<li>i965/vs: Try again when we've successfully spilled a reg.</li>
|
||||
<li>i965/gen7: Set up all samplers even if samplers are sparsely used.</li>
|
||||
</ul>
|
||||
|
||||
<p>Frank Henigman (1):</p>
|
||||
<ul>
|
||||
<li>mesa: add bounds checking for uniform array access</li>
|
||||
</ul>
|
||||
|
||||
<p>Jerome Glisse (1):</p>
|
||||
<ul>
|
||||
<li>r600g: add cs memory usage accounting and limit it v3 (backport for mesa 9.0)</li>
|
||||
</ul>
|
||||
|
||||
<p>Jordan Justen (1):</p>
|
||||
<ul>
|
||||
<li>unpack: support unpacking MESA_FORMAT_ARGB2101010</li>
|
||||
</ul>
|
||||
|
||||
<p>José Fonseca (2):</p>
|
||||
<ul>
|
||||
<li>mesa/st: Don't use 4bits for GL_UNSIGNED_BYTE_3_3_2(_REV)</li>
|
||||
<li>draw: Properly limit vertex buffer fetches on draw arrays.</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (19):</p>
|
||||
<ul>
|
||||
<li>i965: Fix primitive restart on Haswell.</li>
|
||||
<li>i965: Refactor texture swizzle generation into a helper.</li>
|
||||
<li>i965: Do texture swizzling in hardware on Haswell.</li>
|
||||
<li>i965: Lower textureGrad() with samplerCubeShadow.</li>
|
||||
<li>i965: Use Haswell's sample_d_c for textureGrad with shadow samplers.</li>
|
||||
<li>i965: Add chipset limits for Haswell GT1/GT2.</li>
|
||||
<li>cherry-ignore: Ignore i965 guardband bug fixes.</li>
|
||||
<li>i965: Add missing _NEW_BUFFERS dirty bit in Gen7 SBE state.</li>
|
||||
<li>i965/vs: Create a 'lod_type' temporary for ir->lod_info.lod->type.</li>
|
||||
<li>i965/vs: Set LOD to 0 for ordinary texture() calls.</li>
|
||||
<li>i965/vs: Store texturing results into a vec4 temporary.</li>
|
||||
<li>cherry-ignore: Ignore candidates for the 9.1 branch.</li>
|
||||
<li>mesa: Disable GL_NV_primitive_restart extension in core contexts.</li>
|
||||
<li>glsl: Track UBO block names in the symbol table.</li>
|
||||
<li>build: Fix build on systems where /usr/bin/python isn't python 2.</li>
|
||||
<li>i965: Refactor Gen6+ SF attribute override code.</li>
|
||||
<li>i965: Compute the maximum SF source attribute.</li>
|
||||
<li>i965: Fix the SF Vertex URB Read Length calculation for Sandybridge.</li>
|
||||
<li>i965: Fix the SF Vertex URB Read Length calculation for Gen7 platforms.</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (3):</p>
|
||||
<ul>
|
||||
<li>r600g: fix int->bool conversion in fence_signalled</li>
|
||||
<li>gallium/u_upload_mgr: fix a serious memory leak</li>
|
||||
<li>r300g: fix blending with blend color and RGBA formats</li>
|
||||
</ul>
|
||||
|
||||
<p>Matt Turner (3):</p>
|
||||
<ul>
|
||||
<li>mesa: Return 0 for XFB_VARYING_MAX_LENGTH if no varyings</li>
|
||||
<li>mesa: Set transform feedback's default buffer mode to INTERLEAVED_ATTRIBS</li>
|
||||
<li>mesa/uniform_query: Don't write to *params if there is an error</li>
|
||||
</ul>
|
||||
|
||||
<p>Michel Dänzer (1):</p>
|
||||
<ul>
|
||||
<li>configure.ac: GLX cannot work without OpenGL</li>
|
||||
</ul>
|
||||
|
||||
<p>Paul Berry (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Allow glReadBuffer(GL_NONE) for winsys framebuffers.</li>
|
||||
</ul>
|
||||
|
||||
<p>Roland Scheidegger (1):</p>
|
||||
<ul>
|
||||
<li>softpipe: fix using optimized filter function</li>
|
||||
</ul>
|
||||
|
||||
<p>Stefan Dösinger (3):</p>
|
||||
<ul>
|
||||
<li>meta: Disable GL_FRAGMENT_SHADER_ATI in MESA_META_SHADER</li>
|
||||
<li>radeon: Initialize swrast before setting limits</li>
|
||||
<li>r200: Initialize swrast before setting limits</li>
|
||||
</ul>
|
||||
|
||||
<p>Zack Rusin (2):</p>
|
||||
<ul>
|
||||
<li>glx: only advertise GLX_INTEL_swap_event if it's supported</li>
|
||||
<li>DRI2: Don't disable GLX_INTEL_swap_event unconditionally</li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -14,6 +14,7 @@ The release notes summarize what's new or changed in each Mesa release.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="relnotes-9.0.3.html">9.0.3 release notes</a>
|
||||
<li><a href="relnotes-9.0.2.html">9.0.2 release notes</a>
|
||||
<li><a href="relnotes-9.0.1.html">9.0.1 release notes</a>
|
||||
<li><a href="relnotes-9.0.html">9.0 release notes</a>
|
||||
|
49
m4/ax_python_module.m4
Normal file
49
m4/ax_python_module.m4
Normal file
@@ -0,0 +1,49 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_python_module.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_PYTHON_MODULE(modname[, fatal])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Checks for Python module.
|
||||
#
|
||||
# If fatal is non-empty then absence of a module will trigger an error.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Andrew Collier
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 6
|
||||
|
||||
AU_ALIAS([AC_PYTHON_MODULE], [AX_PYTHON_MODULE])
|
||||
AC_DEFUN([AX_PYTHON_MODULE],[
|
||||
if test -z $PYTHON2;
|
||||
then
|
||||
PYTHON2="python"
|
||||
fi
|
||||
PYTHON_NAME=`basename $PYTHON2`
|
||||
AC_MSG_CHECKING($PYTHON_NAME module: $1)
|
||||
$PYTHON2 -c "import $1" 2>/dev/null
|
||||
if test $? -eq 0;
|
||||
then
|
||||
AC_MSG_RESULT(yes)
|
||||
eval AS_TR_CPP(HAVE_PYMOD_$1)=yes
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
eval AS_TR_CPP(HAVE_PYMOD_$1)=no
|
||||
#
|
||||
if test -n "$2"
|
||||
then
|
||||
AC_MSG_ERROR(failed to find required module $1)
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
])
|
@@ -195,6 +195,7 @@ static struct draw_stage *validate_pipeline( struct draw_stage *stage )
|
||||
if (rast->line_smooth && draw->pipeline.aaline) {
|
||||
draw->pipeline.aaline->next = next;
|
||||
next = draw->pipeline.aaline;
|
||||
precalc_flat = TRUE;
|
||||
}
|
||||
|
||||
if (rast->point_smooth && draw->pipeline.aapoint) {
|
||||
|
@@ -189,7 +189,7 @@ draw_pt_fetch_run_linear(struct pt_fetch *fetch,
|
||||
((char *)draw->pt.user.vbuffer[i] +
|
||||
draw->pt.vertex_buffer[i].buffer_offset),
|
||||
draw->pt.vertex_buffer[i].stride,
|
||||
draw->pt.user.max_index + draw->pt.user.eltBias);
|
||||
draw->pt.max_index);
|
||||
}
|
||||
|
||||
translate->run( translate,
|
||||
|
@@ -701,6 +701,28 @@ pipe_get_tile_z(struct pipe_context *pipe,
|
||||
}
|
||||
}
|
||||
break;
|
||||
case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
|
||||
{
|
||||
const float *ptrc = (const float *)(map + y * pt->stride + x*8);
|
||||
for (i = 0; i < h; i++) {
|
||||
for (j = 0; j < w; j++) {
|
||||
/* convert float Z to 32-bit Z */
|
||||
if (ptrc[j] <= 0.0) {
|
||||
pDest[j*2] = 0;
|
||||
}
|
||||
else if (ptrc[j] >= 1.0) {
|
||||
pDest[j*2] = 0xffffffff;
|
||||
}
|
||||
else {
|
||||
double z = ptrc[j] * 0xffffffff;
|
||||
pDest[j*2] = (uint) z;
|
||||
}
|
||||
}
|
||||
pDest += dstStride;
|
||||
ptrc += pt->stride/4;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
@@ -810,7 +832,7 @@ pipe_put_tile_z(struct pipe_context *pipe,
|
||||
break;
|
||||
case PIPE_FORMAT_Z32_FLOAT:
|
||||
{
|
||||
float *pDest = (float *) (map + y * pt->stride + x*2);
|
||||
float *pDest = (float *) (map + y * pt->stride + x*4);
|
||||
for (i = 0; i < h; i++) {
|
||||
for (j = 0; j < w; j++) {
|
||||
/* convert 32-bit integer Z to float Z */
|
||||
@@ -822,6 +844,20 @@ pipe_put_tile_z(struct pipe_context *pipe,
|
||||
}
|
||||
}
|
||||
break;
|
||||
case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
|
||||
{
|
||||
float *pDest = (float *) (map + y * pt->stride + x*8);
|
||||
for (i = 0; i < h; i++) {
|
||||
for (j = 0; j < w; j++) {
|
||||
/* convert 32-bit integer Z to float Z */
|
||||
const double scale = 1.0 / 0xffffffffU;
|
||||
pDest[j*2] = ptrc[j] * scale;
|
||||
}
|
||||
pDest += pt->stride/4;
|
||||
ptrc += srcStride;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
|
@@ -164,6 +164,13 @@ enum pipe_error u_upload_alloc( struct u_upload_mgr *upload,
|
||||
unsigned alloc_offset = align(min_out_offset, upload->alignment);
|
||||
unsigned offset;
|
||||
|
||||
/* Init these return values here in case we fail below to make
|
||||
* sure the caller doesn't get garbage values.
|
||||
*/
|
||||
*out_offset = ~0;
|
||||
pipe_resource_reference(outbuf, NULL);
|
||||
*ptr = NULL;
|
||||
|
||||
/* Make sure we have enough space in the upload buffer
|
||||
* for the sub-allocation. */
|
||||
if (MAX2(upload->offset, alloc_offset) + alloc_size > upload->size) {
|
||||
@@ -183,8 +190,7 @@ enum pipe_error u_upload_alloc( struct u_upload_mgr *upload,
|
||||
PIPE_TRANSFER_UNSYNCHRONIZED,
|
||||
&upload->transfer);
|
||||
if (!upload->map) {
|
||||
pipe_resource_reference(outbuf, NULL);
|
||||
*ptr = NULL;
|
||||
upload->transfer = NULL;
|
||||
return PIPE_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
|
@@ -256,7 +256,7 @@ void u_vbuf_destroy(struct u_vbuf *mgr)
|
||||
FREE(mgr);
|
||||
}
|
||||
|
||||
static void
|
||||
static enum pipe_error
|
||||
u_vbuf_translate_buffers(struct u_vbuf *mgr, struct translate_key *key,
|
||||
unsigned vb_mask, unsigned out_vb,
|
||||
int start_vertex, unsigned num_vertices,
|
||||
@@ -267,7 +267,8 @@ u_vbuf_translate_buffers(struct u_vbuf *mgr, struct translate_key *key,
|
||||
struct pipe_transfer *vb_transfer[PIPE_MAX_ATTRIBS] = {0};
|
||||
struct pipe_resource *out_buffer = NULL;
|
||||
uint8_t *out_map;
|
||||
unsigned i, out_offset;
|
||||
unsigned out_offset, i;
|
||||
enum pipe_error err;
|
||||
|
||||
/* Get a translate object. */
|
||||
tr = translate_cache_find(mgr->translate_cache, key);
|
||||
@@ -311,6 +312,14 @@ u_vbuf_translate_buffers(struct u_vbuf *mgr, struct translate_key *key,
|
||||
|
||||
assert((ib->buffer || ib->user_buffer) && ib->index_size);
|
||||
|
||||
/* Create and map the output buffer. */
|
||||
err = u_upload_alloc(mgr->uploader, 0,
|
||||
key->output_stride * num_indices,
|
||||
&out_offset, &out_buffer,
|
||||
(void**)&out_map);
|
||||
if (err != PIPE_OK)
|
||||
return err;
|
||||
|
||||
if (ib->user_buffer) {
|
||||
map = (uint8_t*)ib->user_buffer + offset;
|
||||
} else {
|
||||
@@ -319,12 +328,6 @@ u_vbuf_translate_buffers(struct u_vbuf *mgr, struct translate_key *key,
|
||||
PIPE_TRANSFER_READ, &transfer);
|
||||
}
|
||||
|
||||
/* Create and map the output buffer. */
|
||||
u_upload_alloc(mgr->uploader, 0,
|
||||
key->output_stride * num_indices,
|
||||
&out_offset, &out_buffer,
|
||||
(void**)&out_map);
|
||||
|
||||
switch (ib->index_size) {
|
||||
case 4:
|
||||
tr->run_elts(tr, (unsigned*)map, num_indices, 0, out_map);
|
||||
@@ -342,11 +345,13 @@ u_vbuf_translate_buffers(struct u_vbuf *mgr, struct translate_key *key,
|
||||
}
|
||||
} else {
|
||||
/* Create and map the output buffer. */
|
||||
u_upload_alloc(mgr->uploader,
|
||||
key->output_stride * start_vertex,
|
||||
key->output_stride * num_vertices,
|
||||
&out_offset, &out_buffer,
|
||||
(void**)&out_map);
|
||||
err = u_upload_alloc(mgr->uploader,
|
||||
key->output_stride * start_vertex,
|
||||
key->output_stride * num_vertices,
|
||||
&out_offset, &out_buffer,
|
||||
(void**)&out_map);
|
||||
if (err != PIPE_OK)
|
||||
return err;
|
||||
|
||||
out_offset -= key->output_stride * start_vertex;
|
||||
|
||||
@@ -368,6 +373,8 @@ u_vbuf_translate_buffers(struct u_vbuf *mgr, struct translate_key *key,
|
||||
pipe_resource_reference(
|
||||
&mgr->real_vertex_buffer[out_vb].buffer, NULL);
|
||||
mgr->real_vertex_buffer[out_vb].buffer = out_buffer;
|
||||
|
||||
return PIPE_OK;
|
||||
}
|
||||
|
||||
static boolean
|
||||
@@ -512,11 +519,14 @@ u_vbuf_translate_begin(struct u_vbuf *mgr,
|
||||
/* Translate buffers. */
|
||||
for (type = 0; type < VB_NUM; type++) {
|
||||
if (key[type].nr_elements) {
|
||||
u_vbuf_translate_buffers(mgr, &key[type], mask[type],
|
||||
mgr->fallback_vbs[type],
|
||||
start[type], num[type],
|
||||
start_index, num_indices, min_index,
|
||||
unroll_indices && type == VB_VERTEX);
|
||||
enum pipe_error err;
|
||||
err = u_vbuf_translate_buffers(mgr, &key[type], mask[type],
|
||||
mgr->fallback_vbs[type],
|
||||
start[type], num[type],
|
||||
start_index, num_indices, min_index,
|
||||
unroll_indices && type == VB_VERTEX);
|
||||
if (err != PIPE_OK)
|
||||
return FALSE;
|
||||
|
||||
/* Fixup the stride for constant attribs. */
|
||||
if (type == VB_CONST) {
|
||||
@@ -775,7 +785,7 @@ void u_vbuf_set_index_buffer(struct u_vbuf *mgr,
|
||||
pipe->set_index_buffer(pipe, ib);
|
||||
}
|
||||
|
||||
static void
|
||||
static enum pipe_error
|
||||
u_vbuf_upload_buffers(struct u_vbuf *mgr,
|
||||
int start_vertex, unsigned num_vertices,
|
||||
int start_instance, unsigned num_instances)
|
||||
@@ -840,6 +850,7 @@ u_vbuf_upload_buffers(struct u_vbuf *mgr,
|
||||
unsigned start, end = end_offset[i];
|
||||
struct pipe_vertex_buffer *real_vb;
|
||||
const uint8_t *ptr;
|
||||
enum pipe_error err;
|
||||
|
||||
if (!end) {
|
||||
continue;
|
||||
@@ -851,11 +862,15 @@ u_vbuf_upload_buffers(struct u_vbuf *mgr,
|
||||
real_vb = &mgr->real_vertex_buffer[i];
|
||||
ptr = mgr->vertex_buffer[i].user_buffer;
|
||||
|
||||
u_upload_data(mgr->uploader, start, end - start, ptr + start,
|
||||
&real_vb->buffer_offset, &real_vb->buffer);
|
||||
err = u_upload_data(mgr->uploader, start, end - start, ptr + start,
|
||||
&real_vb->buffer_offset, &real_vb->buffer);
|
||||
if (err != PIPE_OK)
|
||||
return err;
|
||||
|
||||
real_vb->buffer_offset -= start;
|
||||
}
|
||||
|
||||
return PIPE_OK;
|
||||
}
|
||||
|
||||
static boolean u_vbuf_need_minmax_index(struct u_vbuf *mgr)
|
||||
@@ -1048,11 +1063,13 @@ void u_vbuf_draw_vbo(struct u_vbuf *mgr, const struct pipe_draw_info *info)
|
||||
if (unroll_indices ||
|
||||
mgr->incompatible_vb_mask ||
|
||||
mgr->ve->incompatible_elem_mask) {
|
||||
/* XXX check the return value */
|
||||
u_vbuf_translate_begin(mgr, start_vertex, num_vertices,
|
||||
info->start_instance, info->instance_count,
|
||||
info->start, info->count, min_index,
|
||||
unroll_indices);
|
||||
if (!u_vbuf_translate_begin(mgr, start_vertex, num_vertices,
|
||||
info->start_instance, info->instance_count,
|
||||
info->start, info->count, min_index,
|
||||
unroll_indices)) {
|
||||
debug_warn_once("u_vbuf_translate_begin() failed");
|
||||
return;
|
||||
}
|
||||
|
||||
user_vb_mask &= ~(mgr->incompatible_vb_mask |
|
||||
mgr->ve->incompatible_vb_mask_all);
|
||||
@@ -1060,8 +1077,12 @@ void u_vbuf_draw_vbo(struct u_vbuf *mgr, const struct pipe_draw_info *info)
|
||||
|
||||
/* Upload user buffers. */
|
||||
if (user_vb_mask) {
|
||||
u_vbuf_upload_buffers(mgr, start_vertex, num_vertices,
|
||||
info->start_instance, info->instance_count);
|
||||
if (u_vbuf_upload_buffers(mgr, start_vertex, num_vertices,
|
||||
info->start_instance,
|
||||
info->instance_count) != PIPE_OK) {
|
||||
debug_warn_once("u_vbuf_upload_buffers() failed");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -430,6 +430,7 @@ nvc0_screen_create(struct nouveau_device *dev)
|
||||
chan = screen->base.channel;
|
||||
push = screen->base.pushbuf;
|
||||
push->user_priv = screen;
|
||||
push->rsvd_kick = 5;
|
||||
|
||||
screen->base.vidmem_bindings |= PIPE_BIND_CONSTANT_BUFFER |
|
||||
PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER;
|
||||
|
@@ -467,6 +467,7 @@ static void r300_set_blend_color(struct pipe_context* pipe,
|
||||
(struct r300_blend_color_state*)r300->blend_color_state.state;
|
||||
struct pipe_blend_color c;
|
||||
enum pipe_format format = fb->nr_cbufs ? fb->cbufs[0]->format : 0;
|
||||
float tmp;
|
||||
CB_LOCALS;
|
||||
|
||||
state->state = *color; /* Save it, so that we can reuse it in set_fb_state */
|
||||
@@ -493,6 +494,13 @@ static void r300_set_blend_color(struct pipe_context* pipe,
|
||||
c.color[2] = c.color[3];
|
||||
break;
|
||||
|
||||
case PIPE_FORMAT_R8G8B8A8_UNORM:
|
||||
case PIPE_FORMAT_R8G8B8X8_UNORM:
|
||||
tmp = c.color[0];
|
||||
c.color[0] = c.color[2];
|
||||
c.color[2] = tmp;
|
||||
break;
|
||||
|
||||
default:;
|
||||
}
|
||||
}
|
||||
@@ -903,6 +911,9 @@ r300_set_framebuffer_state(struct pipe_context* pipe,
|
||||
/* Need to reset clamping or colormask. */
|
||||
r300_mark_atom_dirty(r300, &r300->blend_state);
|
||||
|
||||
/* Re-swizzle the blend color. */
|
||||
r300_set_blend_color(pipe, &((struct r300_blend_color_state*)r300->blend_color_state.state)->state);
|
||||
|
||||
/* If zsbuf is set from NULL to non-NULL or vice versa.. */
|
||||
if (!!old_state->zsbuf != !!state->zsbuf) {
|
||||
r300_mark_atom_dirty(r300, &r300->dsa_state);
|
||||
|
@@ -1721,6 +1721,8 @@ static void evergreen_set_framebuffer_state(struct pipe_context *ctx,
|
||||
res = (struct r600_resource*)surf->base.texture;
|
||||
rtex = (struct r600_texture*)res;
|
||||
|
||||
r600_context_add_resource_size(ctx, state->cbufs[i]->texture);
|
||||
|
||||
if (!surf->color_initialized) {
|
||||
evergreen_init_color_surface(rctx, surf);
|
||||
}
|
||||
@@ -1787,6 +1789,8 @@ static void evergreen_set_framebuffer_state(struct pipe_context *ctx,
|
||||
surf = (struct r600_surface*)state->zsbuf;
|
||||
res = (struct r600_resource*)surf->base.texture;
|
||||
|
||||
r600_context_add_resource_size(ctx, state->zsbuf->texture);
|
||||
|
||||
if (!surf->depth_initialized) {
|
||||
evergreen_init_depth_surface(rctx, surf);
|
||||
}
|
||||
|
@@ -635,6 +635,16 @@ void r600_need_cs_space(struct r600_context *ctx, unsigned num_dw,
|
||||
{
|
||||
struct r600_atom *state;
|
||||
|
||||
if (!ctx->ws->cs_memory_below_limit(ctx->cs, ctx->vram, ctx->gtt)) {
|
||||
ctx->gtt = 0;
|
||||
ctx->vram = 0;
|
||||
r600_flush(&ctx->context, NULL, RADEON_FLUSH_ASYNC);
|
||||
return;
|
||||
}
|
||||
/* all will be accounted once relocation are emited */
|
||||
ctx->gtt = 0;
|
||||
ctx->vram = 0;
|
||||
|
||||
/* The number of dwords we already used in the CS so far. */
|
||||
num_dw += ctx->cs->cdw;
|
||||
|
||||
@@ -953,6 +963,8 @@ void r600_context_flush(struct r600_context *ctx, unsigned flags)
|
||||
|
||||
ctx->pm4_dirty_cdwords = 0;
|
||||
ctx->flags = 0;
|
||||
ctx->gtt = 0;
|
||||
ctx->vram = 0;
|
||||
|
||||
/* Begin a new CS. */
|
||||
r600_emit_atom(ctx, &ctx->start_cs_cmd.atom);
|
||||
|
@@ -725,7 +725,7 @@ static boolean r600_fence_signalled(struct pipe_screen *pscreen,
|
||||
struct r600_screen *rscreen = (struct r600_screen *)pscreen;
|
||||
struct r600_fence *rfence = (struct r600_fence*)fence;
|
||||
|
||||
return rscreen->fences.data[rfence->index];
|
||||
return rscreen->fences.data[rfence->index] != 0;
|
||||
}
|
||||
|
||||
static boolean r600_fence_finish(struct pipe_screen *pscreen,
|
||||
|
@@ -371,6 +371,10 @@ struct r600_context {
|
||||
|
||||
unsigned default_ps_gprs, default_vs_gprs;
|
||||
|
||||
/* current unaccounted memory usage */
|
||||
uint64_t vram;
|
||||
uint64_t gtt;
|
||||
|
||||
/* States based on r600_atom. */
|
||||
struct list_head dirty_states;
|
||||
struct r600_command_buffer start_cs_cmd; /* invariant state mostly */
|
||||
@@ -886,4 +890,28 @@ static INLINE uint64_t r600_resource_va(struct pipe_screen *screen, struct pipe_
|
||||
return rscreen->ws->buffer_get_virtual_address(rresource->cs_buf);
|
||||
}
|
||||
|
||||
static INLINE void r600_context_add_resource_size(struct pipe_context *ctx, struct pipe_resource *r)
|
||||
{
|
||||
struct r600_context *rctx = (struct r600_context *)ctx;
|
||||
struct r600_resource *rr = (struct r600_resource *)r;
|
||||
|
||||
if (r == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* The idea is to compute a gross estimate of memory requirement of
|
||||
* each draw call. After each draw call, memory will be precisely
|
||||
* accounted. So the uncertainty is only on the current draw call.
|
||||
* In practice this gave very good estimate (+/- 10% of the target
|
||||
* memory limit).
|
||||
*/
|
||||
if (rr->domains & RADEON_DOMAIN_GTT) {
|
||||
rctx->gtt += rr->buf->size;
|
||||
}
|
||||
if (rr->domains & RADEON_DOMAIN_VRAM) {
|
||||
rctx->vram += rr->buf->size;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -1615,6 +1615,8 @@ static void r600_set_framebuffer_state(struct pipe_context *ctx,
|
||||
res = (struct r600_resource*)surf->base.texture;
|
||||
rtex = (struct r600_texture*)res;
|
||||
|
||||
r600_context_add_resource_size(ctx, state->cbufs[i]->texture);
|
||||
|
||||
if (!surf->color_initialized || force_cmask_fmask) {
|
||||
r600_init_color_surface(rctx, surf, force_cmask_fmask);
|
||||
if (force_cmask_fmask) {
|
||||
@@ -1673,6 +1675,8 @@ static void r600_set_framebuffer_state(struct pipe_context *ctx,
|
||||
surf = (struct r600_surface*)state->zsbuf;
|
||||
res = (struct r600_resource*)surf->base.texture;
|
||||
|
||||
r600_context_add_resource_size(ctx, state->zsbuf->texture);
|
||||
|
||||
if (!surf->depth_initialized) {
|
||||
r600_init_depth_surface(rctx, surf);
|
||||
}
|
||||
|
@@ -504,7 +504,8 @@ void r600_set_index_buffer(struct pipe_context *ctx,
|
||||
|
||||
if (ib) {
|
||||
pipe_resource_reference(&rctx->index_buffer.buffer, ib->buffer);
|
||||
memcpy(&rctx->index_buffer, ib, sizeof(*ib));
|
||||
memcpy(&rctx->index_buffer, ib, sizeof(*ib));
|
||||
r600_context_add_resource_size(ctx, ib->buffer);
|
||||
} else {
|
||||
pipe_resource_reference(&rctx->index_buffer.buffer, NULL);
|
||||
}
|
||||
@@ -549,6 +550,7 @@ void r600_set_vertex_buffers(struct pipe_context *ctx, unsigned count,
|
||||
vb[i].buffer_offset = input[i].buffer_offset;
|
||||
pipe_resource_reference(&vb[i].buffer, input[i].buffer);
|
||||
new_buffer_mask |= 1 << i;
|
||||
r600_context_add_resource_size(ctx, input[i].buffer);
|
||||
} else {
|
||||
pipe_resource_reference(&vb[i].buffer, NULL);
|
||||
disable_mask |= 1 << i;
|
||||
@@ -648,6 +650,7 @@ void r600_set_sampler_views(struct pipe_context *pipe,
|
||||
|
||||
pipe_sampler_view_reference((struct pipe_sampler_view **)&dst->views.views[i], views[i]);
|
||||
new_mask |= 1 << i;
|
||||
r600_context_add_resource_size(pipe, views[i]->texture);
|
||||
} else {
|
||||
pipe_sampler_view_reference((struct pipe_sampler_view **)&dst->views.views[i], NULL);
|
||||
disable_mask |= 1 << i;
|
||||
@@ -822,6 +825,8 @@ void r600_bind_ps_shader(struct pipe_context *ctx, void *state)
|
||||
rctx->ps_shader = (struct r600_pipe_shader_selector *)state;
|
||||
r600_context_pipe_state_set(rctx, &rctx->ps_shader->current->rstate);
|
||||
|
||||
r600_context_add_resource_size(ctx, (struct pipe_resource *)rctx->ps_shader->current->bo);
|
||||
|
||||
if (rctx->chip_class <= R700) {
|
||||
bool multiwrite = rctx->ps_shader->current->shader.fs_write_all;
|
||||
|
||||
@@ -848,6 +853,8 @@ void r600_bind_vs_shader(struct pipe_context *ctx, void *state)
|
||||
if (state) {
|
||||
r600_context_pipe_state_set(rctx, &rctx->vs_shader->current->rstate);
|
||||
|
||||
r600_context_add_resource_size(ctx, (struct pipe_resource *)rctx->vs_shader->current->bo);
|
||||
|
||||
if (rctx->chip_class < EVERGREEN && rctx->ps_shader)
|
||||
r600_adjust_gprs(rctx);
|
||||
}
|
||||
@@ -957,10 +964,13 @@ void r600_set_constant_buffer(struct pipe_context *ctx, uint shader, uint index,
|
||||
} else {
|
||||
u_upload_data(rctx->uploader, 0, input->buffer_size, ptr, &cb->buffer_offset, &cb->buffer);
|
||||
}
|
||||
/* account it in gtt */
|
||||
rctx->gtt += input->buffer_size;
|
||||
} else {
|
||||
/* Setup the hw buffer. */
|
||||
cb->buffer_offset = input->buffer_offset;
|
||||
pipe_resource_reference(&cb->buffer, input->buffer);
|
||||
r600_context_add_resource_size(ctx, input->buffer);
|
||||
}
|
||||
|
||||
state->enabled_mask |= 1 << index;
|
||||
@@ -1023,6 +1033,7 @@ void r600_set_so_targets(struct pipe_context *ctx,
|
||||
/* Set the new targets. */
|
||||
for (i = 0; i < num_targets; i++) {
|
||||
pipe_so_target_reference((struct pipe_stream_output_target**)&rctx->so_targets[i], targets[i]);
|
||||
r600_context_add_resource_size(ctx, targets[i]->buffer);
|
||||
}
|
||||
for (; i < rctx->num_so_targets; i++) {
|
||||
pipe_so_target_reference((struct pipe_stream_output_target**)&rctx->so_targets[i], NULL);
|
||||
|
@@ -66,14 +66,11 @@ exec_prepare( const struct sp_fragment_shader_variant *var,
|
||||
{
|
||||
/*
|
||||
* Bind tokens/shader to the interpreter's machine state.
|
||||
* Avoid redundant binding.
|
||||
*/
|
||||
if (machine->Tokens != var->tokens) {
|
||||
tgsi_exec_machine_bind_shader( machine,
|
||||
var->tokens,
|
||||
PIPE_MAX_SAMPLERS,
|
||||
samplers );
|
||||
}
|
||||
tgsi_exec_machine_bind_shader(machine,
|
||||
var->tokens,
|
||||
PIPE_MAX_SAMPLERS,
|
||||
samplers);
|
||||
}
|
||||
|
||||
|
||||
@@ -180,8 +177,13 @@ exec_run( const struct sp_fragment_shader_variant *var,
|
||||
|
||||
|
||||
static void
|
||||
exec_delete( struct sp_fragment_shader_variant *var )
|
||||
exec_delete(struct sp_fragment_shader_variant *var,
|
||||
struct tgsi_exec_machine *machine)
|
||||
{
|
||||
if (machine->Tokens == var->tokens) {
|
||||
tgsi_exec_machine_bind_shader(machine, NULL, 0, NULL);
|
||||
}
|
||||
|
||||
FREE( (void *) var->tokens );
|
||||
FREE(var);
|
||||
}
|
||||
|
@@ -148,13 +148,6 @@ shade_quads(struct quad_stage *qs,
|
||||
static void
|
||||
shade_begin(struct quad_stage *qs)
|
||||
{
|
||||
struct softpipe_context *softpipe = qs->softpipe;
|
||||
|
||||
softpipe->fs_variant->prepare( softpipe->fs_variant,
|
||||
softpipe->fs_machine,
|
||||
(struct tgsi_sampler **)
|
||||
softpipe->tgsi.samplers_list[PIPE_SHADER_FRAGMENT] );
|
||||
|
||||
qs->next->begin(qs->next);
|
||||
}
|
||||
|
||||
|
@@ -88,7 +88,8 @@ struct sp_fragment_shader_variant
|
||||
struct quad_header *quad);
|
||||
|
||||
/* Deletes this instance of the object */
|
||||
void (*delete)(struct sp_fragment_shader_variant *shader);
|
||||
void (*delete)(struct sp_fragment_shader_variant *shader,
|
||||
struct tgsi_exec_machine *machine);
|
||||
|
||||
struct sp_fragment_shader_variant *next;
|
||||
};
|
||||
|
@@ -242,6 +242,12 @@ update_fragment_shader(struct softpipe_context *softpipe, unsigned prim)
|
||||
if (softpipe->fs) {
|
||||
softpipe->fs_variant = softpipe_find_fs_variant(softpipe,
|
||||
softpipe->fs, &key);
|
||||
|
||||
/* prepare the TGSI interpreter for FS execution */
|
||||
softpipe->fs_variant->prepare(softpipe->fs_variant,
|
||||
softpipe->fs_machine,
|
||||
(struct tgsi_sampler **) softpipe->
|
||||
tgsi.samplers_list[PIPE_SHADER_FRAGMENT]);
|
||||
}
|
||||
else {
|
||||
softpipe->fs_variant = NULL;
|
||||
|
@@ -38,7 +38,6 @@
|
||||
#include "draw/draw_vs.h"
|
||||
#include "draw/draw_gs.h"
|
||||
#include "tgsi/tgsi_dump.h"
|
||||
#include "tgsi/tgsi_exec.h"
|
||||
#include "tgsi/tgsi_scan.h"
|
||||
#include "tgsi/tgsi_parse.h"
|
||||
|
||||
@@ -182,13 +181,6 @@ softpipe_delete_fs_state(struct pipe_context *pipe, void *fs)
|
||||
|
||||
assert(fs != softpipe->fs);
|
||||
|
||||
if (softpipe->fs_machine->Tokens == state->shader.tokens) {
|
||||
/* unbind the shader from the tgsi executor if we're
|
||||
* deleting it.
|
||||
*/
|
||||
tgsi_exec_machine_bind_shader(softpipe->fs_machine, NULL, 0, NULL);
|
||||
}
|
||||
|
||||
/* delete variants */
|
||||
for (var = state->variants; var; var = next_var) {
|
||||
next_var = var->next;
|
||||
@@ -200,7 +192,7 @@ softpipe_delete_fs_state(struct pipe_context *pipe, void *fs)
|
||||
draw_delete_fragment_shader(softpipe->draw, var->draw_shader);
|
||||
#endif
|
||||
|
||||
var->delete(var);
|
||||
var->delete(var, softpipe->fs_machine);
|
||||
}
|
||||
|
||||
draw_delete_fragment_shader(softpipe->draw, state->draw_shader);
|
||||
|
@@ -2680,6 +2680,7 @@ sp_create_sampler_variant( const struct pipe_sampler_state *sampler,
|
||||
|
||||
case PIPE_TEX_MIPFILTER_LINEAR:
|
||||
if (key.bits.is_pot &&
|
||||
key.bits.target == PIPE_TEXTURE_2D &&
|
||||
sampler->min_img_filter == sampler->mag_img_filter &&
|
||||
sampler->normalized_coords &&
|
||||
sampler->wrap_s == PIPE_TEX_WRAP_REPEAT &&
|
||||
|
@@ -98,6 +98,9 @@ svga_create_sampler_state(struct pipe_context *pipe,
|
||||
struct svga_context *svga = svga_context(pipe);
|
||||
struct svga_sampler_state *cso = CALLOC_STRUCT( svga_sampler_state );
|
||||
|
||||
if (!cso)
|
||||
return NULL;
|
||||
|
||||
cso->mipfilter = translate_mip_filter(sampler->min_mip_filter);
|
||||
cso->magfilter = translate_img_filter( sampler->mag_img_filter );
|
||||
cso->minfilter = translate_img_filter( sampler->min_img_filter );
|
||||
|
@@ -23,6 +23,7 @@
|
||||
*
|
||||
**********************************************************/
|
||||
|
||||
#include "util/u_format.h"
|
||||
#include "util/u_inlines.h"
|
||||
#include "util/u_memory.h"
|
||||
#include "pipe/p_defines.h"
|
||||
@@ -248,6 +249,16 @@ emit_rss(struct svga_context *svga, unsigned dirty)
|
||||
EMIT_RS_FLOAT( svga, bias, DEPTHBIAS, fail );
|
||||
}
|
||||
|
||||
if (dirty & SVGA_NEW_FRAME_BUFFER) {
|
||||
/* XXX: we only look at the first color buffer's sRGB state */
|
||||
float gamma = 1.0f;
|
||||
if (svga->curr.framebuffer.cbufs[0] &&
|
||||
util_format_is_srgb(svga->curr.framebuffer.cbufs[0]->format)) {
|
||||
gamma = 2.2f;
|
||||
}
|
||||
EMIT_RS_FLOAT(svga, gamma, OUTPUTGAMMA, fail);
|
||||
}
|
||||
|
||||
if (dirty & SVGA_NEW_RAST) {
|
||||
/* bitmask of the enabled clip planes */
|
||||
unsigned enabled = svga->curr.rast->templ.clip_plane_enable;
|
||||
|
@@ -687,6 +687,20 @@ choose_visual( Display *dpy, int screen, const int *list, GLboolean fbConfig )
|
||||
|
||||
while (*parselist) {
|
||||
|
||||
if (fbConfig &&
|
||||
parselist[1] == GLX_DONT_CARE &&
|
||||
parselist[0] != GLX_LEVEL) {
|
||||
/* For glXChooseFBConfig(), skip attributes whose value is
|
||||
* GLX_DONT_CARE, unless it's GLX_LEVEL (which can legitimately be
|
||||
* a negative value).
|
||||
*
|
||||
* From page 17 (23 of the pdf) of the GLX 1.4 spec:
|
||||
* GLX DONT CARE may be specified for all attributes except GLX LEVEL.
|
||||
*/
|
||||
parselist += 2;
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (*parselist) {
|
||||
case GLX_USE_GL:
|
||||
if (fbConfig) {
|
||||
@@ -832,11 +846,13 @@ choose_visual( Display *dpy, int screen, const int *list, GLboolean fbConfig )
|
||||
* GLX_ARB_multisample
|
||||
*/
|
||||
case GLX_SAMPLE_BUFFERS_ARB:
|
||||
/* ms not supported */
|
||||
return NULL;
|
||||
case GLX_SAMPLES_ARB:
|
||||
/* ms not supported */
|
||||
return NULL;
|
||||
parselist++;
|
||||
if (*parselist++ != 0) {
|
||||
/* ms not supported */
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
|
||||
/*
|
||||
* FBConfig attribs.
|
||||
|
@@ -366,6 +366,16 @@ static boolean radeon_drm_cs_validate(struct radeon_winsys_cs *rcs)
|
||||
return status;
|
||||
}
|
||||
|
||||
static boolean radeon_drm_cs_memory_below_limit(struct radeon_winsys_cs *rcs, uint64_t vram, uint64_t gtt)
|
||||
{
|
||||
struct radeon_drm_cs *cs = radeon_drm_cs(rcs);
|
||||
boolean status =
|
||||
(cs->csc->used_gart + gtt) < cs->ws->info.gart_size * 0.7 &&
|
||||
(cs->csc->used_vram + vram) < cs->ws->info.vram_size * 0.7;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static void radeon_drm_cs_write_reloc(struct radeon_winsys_cs *rcs,
|
||||
struct radeon_winsys_cs_handle *buf)
|
||||
{
|
||||
@@ -549,6 +559,7 @@ void radeon_drm_cs_init_functions(struct radeon_drm_winsys *ws)
|
||||
ws->base.cs_destroy = radeon_drm_cs_destroy;
|
||||
ws->base.cs_add_reloc = radeon_drm_cs_add_reloc;
|
||||
ws->base.cs_validate = radeon_drm_cs_validate;
|
||||
ws->base.cs_memory_below_limit = radeon_drm_cs_memory_below_limit;
|
||||
ws->base.cs_write_reloc = radeon_drm_cs_write_reloc;
|
||||
ws->base.cs_flush = radeon_drm_cs_flush;
|
||||
ws->base.cs_set_flush_callback = radeon_drm_cs_set_flush;
|
||||
|
@@ -308,6 +308,16 @@ struct radeon_winsys {
|
||||
*/
|
||||
boolean (*cs_validate)(struct radeon_winsys_cs *cs);
|
||||
|
||||
/**
|
||||
* Return TRUE if there is enough memory in VRAM and GTT for the relocs
|
||||
* added so far.
|
||||
*
|
||||
* \param cs A command stream to validate.
|
||||
* \param vram VRAM memory size pending to be use
|
||||
* \param gtt GTT memory size pending to be use
|
||||
*/
|
||||
boolean (*cs_memory_below_limit)(struct radeon_winsys_cs *cs, uint64_t vram, uint64_t gtt);
|
||||
|
||||
/**
|
||||
* Write a relocated dword to a command buffer.
|
||||
*
|
||||
|
@@ -481,6 +481,7 @@ create_dumb(struct gbm_device *gbm,
|
||||
bo->base.base.width = width;
|
||||
bo->base.base.height = height;
|
||||
bo->base.base.stride = create_arg.pitch;
|
||||
bo->base.base.format = format;
|
||||
bo->base.base.handle.u32 = create_arg.handle;
|
||||
bo->handle = create_arg.handle;
|
||||
bo->size = create_arg.size;
|
||||
@@ -529,6 +530,7 @@ gbm_dri_bo_create(struct gbm_device *gbm,
|
||||
bo->base.base.gbm = gbm;
|
||||
bo->base.base.width = width;
|
||||
bo->base.base.height = height;
|
||||
bo->base.base.format = format;
|
||||
|
||||
switch (format) {
|
||||
case GBM_FORMAT_RGB565:
|
||||
|
@@ -4039,6 +4039,12 @@ ast_uniform_block::hir(exec_list *instructions,
|
||||
struct gl_uniform_block *ubo = get_next_uniform_block(state);
|
||||
ubo->Name = ralloc_strdup(state->uniform_blocks, this->block_name);
|
||||
|
||||
if (!state->symbols->add_uniform_block(ubo)) {
|
||||
YYLTYPE loc = this->get_location();
|
||||
_mesa_glsl_error(&loc, state, "Uniform block name `%s' already taken in "
|
||||
"the current scope.\n", ubo->Name);
|
||||
}
|
||||
|
||||
unsigned int num_variables = 0;
|
||||
foreach_list_typed(ast_declarator_list, decl_list, link, &declarations) {
|
||||
foreach_list_const(node, &decl_list->declarations) {
|
||||
|
@@ -41,13 +41,15 @@ public:
|
||||
ralloc_free(entry);
|
||||
}
|
||||
|
||||
symbol_table_entry(ir_variable *v) : v(v), f(0), t(0) {}
|
||||
symbol_table_entry(ir_function *f) : v(0), f(f), t(0) {}
|
||||
symbol_table_entry(const glsl_type *t) : v(0), f(0), t(t) {}
|
||||
symbol_table_entry(ir_variable *v) : v(v), f(0), t(0), u(0) {}
|
||||
symbol_table_entry(ir_function *f) : v(0), f(f), t(0), u(0) {}
|
||||
symbol_table_entry(const glsl_type *t) : v(0), f(0), t(t), u(0) {}
|
||||
symbol_table_entry(struct gl_uniform_block *u) : v(0), f(0), t(0), u(u) {}
|
||||
|
||||
ir_variable *v;
|
||||
ir_function *f;
|
||||
const glsl_type *t;
|
||||
struct gl_uniform_block *u;
|
||||
};
|
||||
|
||||
glsl_symbol_table::glsl_symbol_table()
|
||||
@@ -132,6 +134,12 @@ bool glsl_symbol_table::add_function(ir_function *f)
|
||||
return _mesa_symbol_table_add_symbol(table, -1, f->name, entry) == 0;
|
||||
}
|
||||
|
||||
bool glsl_symbol_table::add_uniform_block(struct gl_uniform_block *u)
|
||||
{
|
||||
symbol_table_entry *entry = new(mem_ctx) symbol_table_entry(u);
|
||||
return _mesa_symbol_table_add_symbol(table, -1, u->Name, entry) == 0;
|
||||
}
|
||||
|
||||
void glsl_symbol_table::add_global_function(ir_function *f)
|
||||
{
|
||||
symbol_table_entry *entry = new(mem_ctx) symbol_table_entry(f);
|
||||
|
@@ -98,6 +98,7 @@ public:
|
||||
bool add_variable(ir_variable *v);
|
||||
bool add_type(const char *name, const glsl_type *t);
|
||||
bool add_function(ir_function *f);
|
||||
bool add_uniform_block(struct gl_uniform_block *u);
|
||||
/*@}*/
|
||||
|
||||
/**
|
||||
|
@@ -43,6 +43,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#include <X11/extensions/Xext.h>
|
||||
#include <X11/extensions/extutil.h>
|
||||
#include "xf86dristr.h"
|
||||
#include <limits.h>
|
||||
|
||||
static XExtensionInfo _xf86dri_info_data;
|
||||
static XExtensionInfo *xf86dri_info = &_xf86dri_info_data;
|
||||
@@ -201,7 +202,11 @@ XF86DRIOpenConnection(Display * dpy, int screen, drm_handle_t * hSAREA,
|
||||
}
|
||||
|
||||
if (rep.length) {
|
||||
if (!(*busIdString = (char *) Xcalloc(rep.busIdStringLength + 1, 1))) {
|
||||
if (rep.busIdStringLength < INT_MAX)
|
||||
*busIdString = (char *) Xcalloc(rep.busIdStringLength + 1, 1);
|
||||
else
|
||||
*busIdString = NULL;
|
||||
if (*busIdString == NULL) {
|
||||
_XEatData(dpy, ((rep.busIdStringLength + 3) & ~3));
|
||||
UnlockDisplay(dpy);
|
||||
SyncHandle();
|
||||
@@ -300,9 +305,11 @@ XF86DRIGetClientDriverName(Display * dpy, int screen,
|
||||
*ddxDriverPatchVersion = rep.ddxDriverPatchVersion;
|
||||
|
||||
if (rep.length) {
|
||||
if (!
|
||||
(*clientDriverName =
|
||||
(char *) Xcalloc(rep.clientDriverNameLength + 1, 1))) {
|
||||
if (rep.clientDriverNameLength < INT_MAX)
|
||||
*clientDriverName = (char *) Xcalloc(rep.clientDriverNameLength + 1, 1);
|
||||
else
|
||||
*clientDriverName = NULL;
|
||||
if (*clientDriverName == NULL) {
|
||||
_XEatData(dpy, ((rep.clientDriverNameLength + 3) & ~3));
|
||||
UnlockDisplay(dpy);
|
||||
SyncHandle();
|
||||
|
@@ -132,8 +132,6 @@ apple_glx_swap_buffers(void *ptr)
|
||||
{
|
||||
struct apple_glx_context *ac = ptr;
|
||||
|
||||
/* This may not be needed with CGLFlushDrawable: */
|
||||
glFlush();
|
||||
apple_cgl.flush_drawable(ac->context_obj);
|
||||
}
|
||||
|
||||
|
@@ -951,7 +951,8 @@ static const struct glx_context_vtable dri2_context_vtable = {
|
||||
};
|
||||
|
||||
static void
|
||||
dri2BindExtensions(struct dri2_screen *psc, const __DRIextension **extensions)
|
||||
dri2BindExtensions(struct dri2_screen *psc, const __DRIextension **extensions,
|
||||
const char *driverName)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -960,8 +961,17 @@ dri2BindExtensions(struct dri2_screen *psc, const __DRIextension **extensions)
|
||||
__glXEnableDirectExtension(&psc->base, "GLX_MESA_swap_control");
|
||||
__glXEnableDirectExtension(&psc->base, "GLX_SGI_make_current_read");
|
||||
|
||||
/* FIXME: if DRI2 version supports it... */
|
||||
__glXEnableDirectExtension(&psc->base, "GLX_INTEL_swap_event");
|
||||
/*
|
||||
* GLX_INTEL_swap_event is broken on the server side, where it's
|
||||
* currently unconditionally enabled. This completely breaks
|
||||
* systems running on drivers which don't support that extension.
|
||||
* There's no way to test for its presence on this side, so instead
|
||||
* of disabling it uncondtionally, just disable it for drivers
|
||||
* which are known to not support it.
|
||||
*/
|
||||
if (strcmp(driverName, "vmwgfx") != 0) {
|
||||
__glXEnableDirectExtension(&psc->base, "GLX_INTEL_swap_event");
|
||||
}
|
||||
|
||||
if (psc->dri2->base.version >= 3) {
|
||||
const unsigned mask = psc->dri2->getAPIMask(psc->driScreen);
|
||||
@@ -1104,7 +1114,7 @@ dri2CreateScreen(int screen, struct glx_display * priv)
|
||||
}
|
||||
|
||||
extensions = psc->core->getExtensions(psc->driScreen);
|
||||
dri2BindExtensions(psc, extensions);
|
||||
dri2BindExtensions(psc, extensions, driverName);
|
||||
|
||||
configs = driConvertConfigs(psc->core, psc->base.configs, driver_configs);
|
||||
visuals = driConvertConfigs(psc->core, psc->base.visuals, driver_configs);
|
||||
|
@@ -865,7 +865,6 @@ driCreateScreen(int screen, struct glx_display *priv)
|
||||
}
|
||||
|
||||
psc->driver = driOpenDriver(driverName);
|
||||
Xfree(driverName);
|
||||
if (psc->driver == NULL)
|
||||
goto cleanup;
|
||||
|
||||
@@ -913,11 +912,15 @@ driCreateScreen(int screen, struct glx_display *priv)
|
||||
psp->setSwapInterval = driSetSwapInterval;
|
||||
psp->getSwapInterval = driGetSwapInterval;
|
||||
|
||||
free(driverName);
|
||||
|
||||
return &psc->base;
|
||||
|
||||
cleanup:
|
||||
CriticalErrorMessageF("failed to load driver: %s\n", driverName);
|
||||
|
||||
free(driverName);
|
||||
|
||||
if (psc->driver)
|
||||
dlclose(psc->driver);
|
||||
glx_screen_cleanup(&psc->base);
|
||||
|
@@ -133,6 +133,7 @@ struct save_state
|
||||
struct gl_vertex_program *VertexProgram;
|
||||
GLboolean FragmentProgramEnabled;
|
||||
struct gl_fragment_program *FragmentProgram;
|
||||
GLboolean ATIFragmentShaderEnabled;
|
||||
struct gl_shader_program *VertexShader;
|
||||
struct gl_shader_program *GeometryShader;
|
||||
struct gl_shader_program *FragmentShader;
|
||||
@@ -626,6 +627,11 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
|
||||
_mesa_set_enable(ctx, GL_FRAGMENT_PROGRAM_ARB, GL_FALSE);
|
||||
}
|
||||
|
||||
if (ctx->API == API_OPENGL && ctx->Extensions.ATI_fragment_shader) {
|
||||
save->ATIFragmentShaderEnabled = ctx->ATIFragmentShader.Enabled;
|
||||
_mesa_set_enable(ctx, GL_FRAGMENT_SHADER_ATI, GL_FALSE);
|
||||
}
|
||||
|
||||
if (ctx->Extensions.ARB_shader_objects) {
|
||||
_mesa_reference_shader_program(ctx, &save->VertexShader,
|
||||
ctx->Shader.CurrentVertexProgram);
|
||||
@@ -942,6 +948,11 @@ _mesa_meta_end(struct gl_context *ctx)
|
||||
_mesa_reference_fragprog(ctx, &save->FragmentProgram, NULL);
|
||||
}
|
||||
|
||||
if (ctx->API == API_OPENGL && ctx->Extensions.ATI_fragment_shader) {
|
||||
_mesa_set_enable(ctx, GL_FRAGMENT_SHADER_ATI,
|
||||
save->ATIFragmentShaderEnabled);
|
||||
}
|
||||
|
||||
if (ctx->Extensions.ARB_vertex_shader)
|
||||
_mesa_use_shader_program(ctx, GL_VERTEX_SHADER, save->VertexShader);
|
||||
|
||||
@@ -3745,6 +3756,7 @@ decompress_texture_image(struct gl_context *ctx,
|
||||
/* read pixels from renderbuffer */
|
||||
{
|
||||
GLenum baseTexFormat = texImage->_BaseFormat;
|
||||
GLenum destBaseFormat = _mesa_base_tex_format(ctx, destFormat);
|
||||
|
||||
/* The pixel transfer state will be set to default values at this point
|
||||
* (see MESA_META_PIXEL_TRANSFER) so pixel transfer ops are effectively
|
||||
@@ -3753,9 +3765,19 @@ decompress_texture_image(struct gl_context *ctx,
|
||||
* returned as red and two-channel texture values are returned as
|
||||
* red/alpha.
|
||||
*/
|
||||
if (baseTexFormat == GL_LUMINANCE ||
|
||||
baseTexFormat == GL_LUMINANCE_ALPHA ||
|
||||
baseTexFormat == GL_INTENSITY) {
|
||||
if ((baseTexFormat == GL_LUMINANCE ||
|
||||
baseTexFormat == GL_LUMINANCE_ALPHA ||
|
||||
baseTexFormat == GL_INTENSITY) ||
|
||||
/* If we're reading back an RGB(A) texture (using glGetTexImage) as
|
||||
* luminance then we need to return L=tex(R).
|
||||
*/
|
||||
((baseTexFormat == GL_RGBA ||
|
||||
baseTexFormat == GL_RGB ||
|
||||
baseTexFormat == GL_RG) &&
|
||||
(destBaseFormat == GL_LUMINANCE ||
|
||||
destBaseFormat == GL_LUMINANCE_ALPHA ||
|
||||
destBaseFormat == GL_LUMINANCE_INTEGER_EXT ||
|
||||
destBaseFormat == GL_LUMINANCE_ALPHA_INTEGER_EXT))) {
|
||||
/* Green and blue must be zero */
|
||||
_mesa_PixelTransferf(GL_GREEN_SCALE, 0.0f);
|
||||
_mesa_PixelTransferf(GL_BLUE_SCALE, 0.0f);
|
||||
|
@@ -290,7 +290,23 @@ brwCreateContext(int api,
|
||||
}
|
||||
|
||||
/* WM maximum threads is number of EUs times number of threads per EU. */
|
||||
if (intel->gen >= 7) {
|
||||
assert(intel->gen <= 7);
|
||||
|
||||
if (intel->is_haswell) {
|
||||
if (intel->gt == 1) {
|
||||
brw->max_wm_threads = 102;
|
||||
brw->max_vs_threads = 70;
|
||||
brw->urb.size = 128;
|
||||
brw->urb.max_vs_entries = 640;
|
||||
brw->urb.max_gs_entries = 256;
|
||||
} else if (intel->gt == 2) {
|
||||
brw->max_wm_threads = 204;
|
||||
brw->max_vs_threads = 280;
|
||||
brw->urb.size = 256;
|
||||
brw->urb.max_vs_entries = 1664;
|
||||
brw->urb.max_gs_entries = 640;
|
||||
}
|
||||
} else if (intel->gen == 7) {
|
||||
if (intel->gt == 1) {
|
||||
brw->max_wm_threads = 48;
|
||||
brw->max_vs_threads = 36;
|
||||
|
@@ -838,6 +838,7 @@ enum brw_message_target {
|
||||
#define GEN5_SAMPLER_MESSAGE_SAMPLE_LOD_COMPARE 6
|
||||
#define GEN5_SAMPLER_MESSAGE_SAMPLE_LD 7
|
||||
#define GEN5_SAMPLER_MESSAGE_SAMPLE_RESINFO 10
|
||||
#define HSW_SAMPLER_MESSAGE_SAMPLE_DERIV_COMPARE 20
|
||||
#define GEN7_SAMPLER_MESSAGE_SAMPLE_LD_MCS 29
|
||||
#define GEN7_SAMPLER_MESSAGE_SAMPLE_LD2DMS 30
|
||||
#define GEN7_SAMPLER_MESSAGE_SAMPLE_LD2DSS 31
|
||||
@@ -1037,6 +1038,9 @@ enum brw_message_target {
|
||||
# define GEN6_URB_GS_ENTRIES_SHIFT 8
|
||||
# define GEN6_URB_GS_SIZE_SHIFT 0
|
||||
|
||||
#define _3DSTATE_VF 0x780c /* GEN7.5+ */
|
||||
#define HSW_CUT_INDEX_ENABLE (1 << 8)
|
||||
|
||||
#define _3DSTATE_URB_VS 0x7830 /* GEN7+ */
|
||||
#define _3DSTATE_URB_HS 0x7831 /* GEN7+ */
|
||||
#define _3DSTATE_URB_DS 0x7832 /* GEN7+ */
|
||||
|
@@ -539,7 +539,9 @@ static int dest (FILE *file, struct brw_instruction *inst)
|
||||
if (inst->bits1.da1.dest_subreg_nr)
|
||||
format (file, ".%d", inst->bits1.da1.dest_subreg_nr /
|
||||
reg_type_size[inst->bits1.da1.dest_reg_type]);
|
||||
format (file, "<%d>", inst->bits1.da1.dest_horiz_stride);
|
||||
string (file, "<");
|
||||
err |= control (file, "horiz stride", horiz_stride, inst->bits1.da1.dest_horiz_stride, NULL);
|
||||
string (file, ">");
|
||||
err |= control (file, "dest reg encoding", reg_encoding, inst->bits1.da1.dest_reg_type, NULL);
|
||||
}
|
||||
else
|
||||
@@ -550,8 +552,9 @@ static int dest (FILE *file, struct brw_instruction *inst)
|
||||
reg_type_size[inst->bits1.ia1.dest_reg_type]);
|
||||
if (inst->bits1.ia1.dest_indirect_offset)
|
||||
format (file, " %d", inst->bits1.ia1.dest_indirect_offset);
|
||||
string (file, "]");
|
||||
format (file, "<%d>", inst->bits1.ia1.dest_horiz_stride);
|
||||
string (file, "]<");
|
||||
err |= control (file, "horiz stride", horiz_stride, inst->bits1.ia1.dest_horiz_stride, NULL);
|
||||
string (file, ">");
|
||||
err |= control (file, "dest reg encoding", reg_encoding, inst->bits1.ia1.dest_reg_type, NULL);
|
||||
}
|
||||
}
|
||||
|
@@ -882,7 +882,7 @@ static void brw_emit_index_buffer(struct brw_context *brw)
|
||||
if (index_buffer == NULL)
|
||||
return;
|
||||
|
||||
if (brw->prim_restart.enable_cut_index) {
|
||||
if (brw->prim_restart.enable_cut_index && !intel->is_haswell) {
|
||||
cut_index_setting = BRW_CUT_INDEX_ENABLE;
|
||||
} else {
|
||||
cut_index_setting = 0;
|
||||
|
@@ -312,8 +312,13 @@ fs_visitor::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src)
|
||||
msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_RESINFO;
|
||||
break;
|
||||
case SHADER_OPCODE_TXD:
|
||||
/* There is no sample_d_c message; comparisons are done manually */
|
||||
msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_DERIVS;
|
||||
if (inst->shadow_compare) {
|
||||
/* Gen7.5+. Otherwise, lowered by brw_lower_texture_gradients(). */
|
||||
assert(intel->is_haswell);
|
||||
msg_type = HSW_SAMPLER_MESSAGE_SAMPLE_DERIV_COMPARE;
|
||||
} else {
|
||||
msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_DERIVS;
|
||||
}
|
||||
break;
|
||||
case SHADER_OPCODE_TXF:
|
||||
msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_LD;
|
||||
|
@@ -201,6 +201,7 @@ fs_visitor::try_emit_saturate(ir_expression *ir)
|
||||
*/
|
||||
fs_inst *modify = get_instruction_generating_reg(pre_inst, last_inst, src);
|
||||
if (!modify || modify->regs_written() != 1) {
|
||||
this->result = fs_reg(this, ir->type);
|
||||
fs_inst *inst = emit(BRW_OPCODE_MOV, this->result, src);
|
||||
inst->saturate = true;
|
||||
} else {
|
||||
@@ -1609,28 +1610,14 @@ fs_visitor::emit_if_gen6(ir_if *ir)
|
||||
|
||||
switch (expr->operation) {
|
||||
case ir_unop_logic_not:
|
||||
inst = emit(BRW_OPCODE_IF, temp, op[0], fs_reg(0));
|
||||
inst->conditional_mod = BRW_CONDITIONAL_Z;
|
||||
return;
|
||||
|
||||
case ir_binop_logic_xor:
|
||||
inst = emit(BRW_OPCODE_IF, reg_null_d, op[0], op[1]);
|
||||
inst->conditional_mod = BRW_CONDITIONAL_NZ;
|
||||
return;
|
||||
|
||||
case ir_binop_logic_or:
|
||||
temp = fs_reg(this, glsl_type::bool_type);
|
||||
emit(BRW_OPCODE_OR, temp, op[0], op[1]);
|
||||
inst = emit(BRW_OPCODE_IF, reg_null_d, temp, fs_reg(0));
|
||||
inst->conditional_mod = BRW_CONDITIONAL_NZ;
|
||||
return;
|
||||
|
||||
case ir_binop_logic_and:
|
||||
temp = fs_reg(this, glsl_type::bool_type);
|
||||
emit(BRW_OPCODE_AND, temp, op[0], op[1]);
|
||||
inst = emit(BRW_OPCODE_IF, reg_null_d, temp, fs_reg(0));
|
||||
inst->conditional_mod = BRW_CONDITIONAL_NZ;
|
||||
return;
|
||||
/* For operations on bool arguments, only the low bit of the bool is
|
||||
* valid, and the others are undefined. Fall back to the condition
|
||||
* code path.
|
||||
*/
|
||||
break;
|
||||
|
||||
case ir_unop_f2b:
|
||||
inst = emit(BRW_OPCODE_IF, reg_null_f, op[0], fs_reg(0));
|
||||
@@ -1650,6 +1637,9 @@ fs_visitor::emit_if_gen6(ir_if *ir)
|
||||
case ir_binop_all_equal:
|
||||
case ir_binop_nequal:
|
||||
case ir_binop_any_nequal:
|
||||
resolve_bool_comparison(expr->operands[0], &op[0]);
|
||||
resolve_bool_comparison(expr->operands[1], &op[1]);
|
||||
|
||||
inst = emit(BRW_OPCODE_IF, reg_null_d, op[0], op[1]);
|
||||
inst->conditional_mod =
|
||||
brw_conditional_for_comparison(expr->operation);
|
||||
@@ -1661,13 +1651,11 @@ fs_visitor::emit_if_gen6(ir_if *ir)
|
||||
fail("bad condition\n");
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
ir->condition->accept(this);
|
||||
|
||||
fs_inst *inst = emit(BRW_OPCODE_IF, reg_null_d, this->result, fs_reg(0));
|
||||
inst->conditional_mod = BRW_CONDITIONAL_NZ;
|
||||
emit_bool_to_cond_code(ir->condition);
|
||||
fs_inst *inst = emit(BRW_OPCODE_IF);
|
||||
inst->predicated = true;
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "glsl/ir.h"
|
||||
#include "glsl/ir_builder.h"
|
||||
#include "program/prog_instruction.h"
|
||||
|
||||
using namespace ir_builder;
|
||||
|
||||
@@ -89,10 +90,6 @@ lower_texture_grad_visitor::visit_leave(ir_texture *ir)
|
||||
if (ir->op != ir_txd || !ir->shadow_comparitor)
|
||||
return visit_continue;
|
||||
|
||||
/* Cubes are broken. Avoid assertion failures when swizzling. */
|
||||
if (ir->sampler->type->sampler_dimensionality == GLSL_SAMPLER_DIM_CUBE)
|
||||
return visit_continue;
|
||||
|
||||
void *mem_ctx = ralloc_parent(ir);
|
||||
|
||||
const glsl_type *grad_type = ir->lod_info.grad.dPdx->type;
|
||||
@@ -106,8 +103,14 @@ lower_texture_grad_visitor::visit_leave(ir_texture *ir)
|
||||
txs->lod_info.lod = new(mem_ctx) ir_constant(0);
|
||||
ir_variable *size =
|
||||
new(mem_ctx) ir_variable(grad_type, "size", ir_var_temporary);
|
||||
emit(size, expr(ir_unop_i2f,
|
||||
swizzle_for_size(txs, grad_type->vector_elements)));
|
||||
if (ir->sampler->type->sampler_dimensionality == GLSL_SAMPLER_DIM_CUBE) {
|
||||
base_ir->insert_before(size);
|
||||
base_ir->insert_before(assign(size, expr(ir_unop_i2f, txs), WRITEMASK_XY));
|
||||
base_ir->insert_before(assign(size, new(mem_ctx) ir_constant(1.0f), WRITEMASK_Z));
|
||||
} else {
|
||||
emit(size, expr(ir_unop_i2f,
|
||||
swizzle_for_size(txs, grad_type->vector_elements)));
|
||||
}
|
||||
|
||||
/* Scale the gradients by width and height. Effectively, the incoming
|
||||
* gradients are s'(x,y), t'(x,y), and r'(x,y) from equation 3.19 in the
|
||||
|
@@ -29,8 +29,11 @@
|
||||
#include "main/bufferobj.h"
|
||||
|
||||
#include "brw_context.h"
|
||||
#include "brw_defines.h"
|
||||
#include "brw_draw.h"
|
||||
|
||||
#include "intel_batchbuffer.h"
|
||||
|
||||
/**
|
||||
* Check if the hardware's cut index support can handle the primitive
|
||||
* restart index value.
|
||||
@@ -39,6 +42,12 @@ static bool
|
||||
can_cut_index_handle_restart_index(struct gl_context *ctx,
|
||||
const struct _mesa_index_buffer *ib)
|
||||
{
|
||||
struct intel_context *intel = intel_context(ctx);
|
||||
|
||||
/* Haswell supports an arbitrary cut index. */
|
||||
if (intel->is_haswell)
|
||||
return true;
|
||||
|
||||
bool cut_index_will_work;
|
||||
|
||||
switch (ib->type) {
|
||||
@@ -176,3 +185,30 @@ brw_handle_primitive_restart(struct gl_context *ctx,
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
haswell_upload_cut_index(struct brw_context *brw)
|
||||
{
|
||||
struct intel_context *intel = &brw->intel;
|
||||
struct gl_context *ctx = &intel->ctx;
|
||||
|
||||
/* Don't trigger on Ivybridge */
|
||||
if (!intel->is_haswell)
|
||||
return;
|
||||
|
||||
const unsigned cut_index_setting =
|
||||
ctx->Array.PrimitiveRestart ? HSW_CUT_INDEX_ENABLE : 0;
|
||||
|
||||
BEGIN_BATCH(2);
|
||||
OUT_BATCH(_3DSTATE_VF << 16 | cut_index_setting | (2 - 2));
|
||||
OUT_BATCH(ctx->Array.RestartIndex);
|
||||
ADVANCE_BATCH();
|
||||
}
|
||||
|
||||
const struct brw_tracked_state haswell_cut_index = {
|
||||
.dirty = {
|
||||
.mesa = _NEW_TRANSFORM,
|
||||
.brw = 0,
|
||||
.cache = 0,
|
||||
},
|
||||
.emit = haswell_upload_cut_index,
|
||||
};
|
||||
|
@@ -225,9 +225,30 @@ brwProgramStringNotify(struct gl_context *ctx,
|
||||
}
|
||||
}
|
||||
|
||||
brw_add_texrect_params(prog);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
brw_add_texrect_params(struct gl_program *prog)
|
||||
{
|
||||
for (int texunit = 0; texunit < BRW_MAX_TEX_UNIT; texunit++) {
|
||||
if (!(prog->TexturesUsed[texunit] & (1 << TEXTURE_RECT_INDEX)))
|
||||
continue;
|
||||
|
||||
int tokens[STATE_LENGTH] = {
|
||||
STATE_INTERNAL,
|
||||
STATE_TEXRECT_SCALE,
|
||||
texunit,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
_mesa_add_state_reference(prog->Parameters, (gl_state_index *)tokens);
|
||||
}
|
||||
}
|
||||
|
||||
/* Per-thread scratch space is a power-of-two multiple of 1KB. */
|
||||
int
|
||||
brw_get_scratch_size(int size)
|
||||
|
@@ -47,5 +47,6 @@ void brw_populate_sampler_prog_key_data(struct gl_context *ctx,
|
||||
struct brw_sampler_prog_key_data *key);
|
||||
bool brw_debug_recompile_sampler_key(const struct brw_sampler_prog_key_data *old_key,
|
||||
const struct brw_sampler_prog_key_data *key);
|
||||
void brw_add_texrect_params(struct gl_program *prog);
|
||||
|
||||
#endif
|
||||
|
@@ -191,6 +191,16 @@ brw_queryobj_get_results(struct gl_context *ctx,
|
||||
}
|
||||
break;
|
||||
|
||||
case GL_ANY_SAMPLES_PASSED:
|
||||
/* Set true if any of the sub-queries passed. */
|
||||
for (i = query->first_index; i <= query->last_index; i++) {
|
||||
if (results[i * 2 + 1] != results[i * 2]) {
|
||||
query->Base.Result = GL_TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case GL_PRIMITIVES_GENERATED:
|
||||
case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:
|
||||
/* We don't actually query the hardware for this value, so query->bo
|
||||
@@ -247,6 +257,7 @@ brw_begin_query(struct gl_context *ctx, struct gl_query_object *q)
|
||||
write_timestamp(intel, query->bo, 0);
|
||||
break;
|
||||
|
||||
case GL_ANY_SAMPLES_PASSED:
|
||||
case GL_SAMPLES_PASSED_ARB:
|
||||
/* Reset our driver's tracking of query state. */
|
||||
drm_intel_bo_unreference(query->bo);
|
||||
@@ -302,6 +313,7 @@ brw_end_query(struct gl_context *ctx, struct gl_query_object *q)
|
||||
intel_batchbuffer_flush(intel);
|
||||
break;
|
||||
|
||||
case GL_ANY_SAMPLES_PASSED:
|
||||
case GL_SAMPLES_PASSED_ARB:
|
||||
/* Flush the batchbuffer in case it has writes to our query BO.
|
||||
* Have later queries write to a new query BO so that further rendering
|
||||
|
@@ -132,7 +132,8 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
|
||||
lower_if_to_cond_assign(shader->ir, 16);
|
||||
|
||||
do_lower_texture_projection(shader->ir);
|
||||
brw_lower_texture_gradients(shader->ir);
|
||||
if (intel->gen < 8 && !intel->is_haswell)
|
||||
brw_lower_texture_gradients(shader->ir);
|
||||
do_vec_index_to_cond_assign(shader->ir);
|
||||
brw_do_cubemap_normalize(shader->ir);
|
||||
lower_noise(shader->ir);
|
||||
@@ -203,6 +204,8 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
|
||||
|
||||
_mesa_reference_program(ctx, &shader->base.Program, prog);
|
||||
|
||||
brw_add_texrect_params(prog);
|
||||
|
||||
/* This has to be done last. Any operation that can cause
|
||||
* prog->ParameterValues to get reallocated (e.g., anything that adds a
|
||||
* program constant) has to happen before creating this linkage.
|
||||
|
@@ -133,6 +133,7 @@ extern const struct brw_tracked_state gen7_wm_constants;
|
||||
extern const struct brw_tracked_state gen7_wm_constant_surface;
|
||||
extern const struct brw_tracked_state gen7_wm_state;
|
||||
extern const struct brw_tracked_state gen7_wm_surfaces;
|
||||
extern const struct brw_tracked_state haswell_cut_index;
|
||||
|
||||
/* brw_misc_state.c */
|
||||
uint32_t
|
||||
@@ -201,6 +202,8 @@ GLuint translate_tex_format(gl_format mesa_format,
|
||||
GLenum depth_mode,
|
||||
GLenum srgb_decode);
|
||||
|
||||
int brw_get_texture_swizzle(const struct gl_texture_object *t);
|
||||
|
||||
/* gen7_wm_surface_state.c */
|
||||
void gen7_set_surface_tiling(struct gen7_surface_state *surf, uint32_t tiling);
|
||||
void gen7_set_surface_msaa(struct gen7_surface_state *surf,
|
||||
@@ -229,7 +232,7 @@ void upload_default_color(struct brw_context *brw,
|
||||
/* gen6_sf_state.c */
|
||||
uint32_t
|
||||
get_attr_override(struct brw_vue_map *vue_map, int urb_entry_read_offset,
|
||||
int fs_attr, bool two_side_color);
|
||||
int fs_attr, bool two_side_color, uint32_t *max_source_attr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -246,6 +246,8 @@ const struct brw_tracked_state *gen7_atoms[] =
|
||||
&brw_indices,
|
||||
&brw_index_buffer,
|
||||
&brw_vertices,
|
||||
|
||||
&haswell_cut_index,
|
||||
};
|
||||
|
||||
|
||||
|
@@ -312,8 +312,8 @@ public:
|
||||
int setup_attributes(int payload_reg);
|
||||
int setup_uniforms(int payload_reg);
|
||||
void setup_payload();
|
||||
void reg_allocate_trivial();
|
||||
void reg_allocate();
|
||||
bool reg_allocate_trivial();
|
||||
bool reg_allocate();
|
||||
void evaluate_spill_costs(float *spill_costs, bool *no_spill);
|
||||
int choose_spill_reg(struct ra_graph *g);
|
||||
void spill_reg(int spill_reg);
|
||||
|
@@ -381,8 +381,13 @@ vec4_visitor::generate_tex(vec4_instruction *inst,
|
||||
}
|
||||
break;
|
||||
case SHADER_OPCODE_TXD:
|
||||
/* There is no sample_d_c message; comparisons are done manually. */
|
||||
msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_DERIVS;
|
||||
if (inst->shadow_compare) {
|
||||
/* Gen7.5+. Otherwise, lowered by brw_lower_texture_gradients(). */
|
||||
assert(intel->is_haswell);
|
||||
msg_type = HSW_SAMPLER_MESSAGE_SAMPLE_DERIV_COMPARE;
|
||||
} else {
|
||||
msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_DERIVS;
|
||||
}
|
||||
break;
|
||||
case SHADER_OPCODE_TXF:
|
||||
msg_type = GEN5_SAMPLER_MESSAGE_SAMPLE_LD;
|
||||
@@ -824,7 +829,10 @@ vec4_visitor::run()
|
||||
}
|
||||
}
|
||||
|
||||
reg_allocate();
|
||||
while (!reg_allocate()) {
|
||||
if (failed)
|
||||
break;
|
||||
}
|
||||
|
||||
if (failed)
|
||||
return false;
|
||||
|
@@ -41,7 +41,7 @@ assign(unsigned int *reg_hw_locations, reg *reg)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
bool
|
||||
vec4_visitor::reg_allocate_trivial()
|
||||
{
|
||||
unsigned int hw_reg_mapping[this->virtual_grf_count];
|
||||
@@ -90,7 +90,10 @@ vec4_visitor::reg_allocate_trivial()
|
||||
if (prog_data->total_grf > max_grf) {
|
||||
fail("Ran out of regs on trivial allocator (%d/%d)\n",
|
||||
prog_data->total_grf, max_grf);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -139,7 +142,7 @@ brw_alloc_reg_set_for_classes(struct brw_context *brw,
|
||||
ra_set_finalize(brw->vs.regs);
|
||||
}
|
||||
|
||||
void
|
||||
bool
|
||||
vec4_visitor::reg_allocate()
|
||||
{
|
||||
unsigned int hw_reg_mapping[virtual_grf_count];
|
||||
@@ -151,10 +154,8 @@ vec4_visitor::reg_allocate()
|
||||
/* Using the trivial allocator can be useful in debugging undefined
|
||||
* register access as a result of broken optimization passes.
|
||||
*/
|
||||
if (0) {
|
||||
reg_allocate_trivial();
|
||||
return;
|
||||
}
|
||||
if (0)
|
||||
return reg_allocate_trivial();
|
||||
|
||||
calculate_live_intervals();
|
||||
|
||||
@@ -213,7 +214,7 @@ vec4_visitor::reg_allocate()
|
||||
spill_reg(reg);
|
||||
}
|
||||
ralloc_free(g);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Get the chosen virtual registers for each node, and map virtual
|
||||
@@ -239,6 +240,8 @@ vec4_visitor::reg_allocate()
|
||||
}
|
||||
|
||||
ralloc_free(g);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -1853,13 +1853,19 @@ vec4_visitor::visit(ir_texture *ir)
|
||||
shadow_comparitor = this->result;
|
||||
}
|
||||
|
||||
const glsl_type *lod_type;
|
||||
src_reg lod, dPdx, dPdy;
|
||||
switch (ir->op) {
|
||||
case ir_tex:
|
||||
lod = src_reg(0.0f);
|
||||
lod_type = glsl_type::float_type;
|
||||
break;
|
||||
case ir_txf:
|
||||
case ir_txl:
|
||||
case ir_txs:
|
||||
ir->lod_info.lod->accept(this);
|
||||
lod = this->result;
|
||||
lod_type = ir->lod_info.lod->type;
|
||||
break;
|
||||
case ir_txd:
|
||||
ir->lod_info.grad.dPdx->accept(this);
|
||||
@@ -1867,8 +1873,9 @@ vec4_visitor::visit(ir_texture *ir)
|
||||
|
||||
ir->lod_info.grad.dPdy->accept(this);
|
||||
dPdy = this->result;
|
||||
|
||||
lod_type = ir->lod_info.grad.dPdx->type;
|
||||
break;
|
||||
case ir_tex:
|
||||
case ir_txb:
|
||||
break;
|
||||
}
|
||||
@@ -1898,6 +1905,7 @@ vec4_visitor::visit(ir_texture *ir)
|
||||
inst->mlen = inst->header_present + 1; /* always at least one */
|
||||
inst->sampler = sampler;
|
||||
inst->dst = dst_reg(this, ir->type);
|
||||
inst->dst.writemask = WRITEMASK_XYZW;
|
||||
inst->shadow_compare = ir->shadow_comparitor != NULL;
|
||||
|
||||
if (ir->offset != NULL && ir->op != ir_txf)
|
||||
@@ -1908,8 +1916,7 @@ vec4_visitor::visit(ir_texture *ir)
|
||||
|
||||
if (ir->op == ir_txs) {
|
||||
int writemask = intel->gen == 4 ? WRITEMASK_W : WRITEMASK_X;
|
||||
emit(MOV(dst_reg(MRF, param_base, ir->lod_info.lod->type, writemask),
|
||||
lod));
|
||||
emit(MOV(dst_reg(MRF, param_base, lod_type, writemask), lod));
|
||||
} else {
|
||||
int i, coord_mask = 0, zero_mask = 0;
|
||||
/* Load the coordinate */
|
||||
@@ -1952,7 +1959,7 @@ vec4_visitor::visit(ir_texture *ir)
|
||||
}
|
||||
|
||||
/* Load the LOD info */
|
||||
if (ir->op == ir_txl) {
|
||||
if (ir->op == ir_tex || ir->op == ir_txl) {
|
||||
int mrf, writemask;
|
||||
if (intel->gen >= 5) {
|
||||
mrf = param_base + 1;
|
||||
@@ -1967,12 +1974,12 @@ vec4_visitor::visit(ir_texture *ir)
|
||||
mrf = param_base;
|
||||
writemask = WRITEMASK_Z;
|
||||
}
|
||||
emit(MOV(dst_reg(MRF, mrf, ir->lod_info.lod->type, writemask), lod));
|
||||
emit(MOV(dst_reg(MRF, mrf, lod_type, writemask), lod));
|
||||
} else if (ir->op == ir_txf) {
|
||||
emit(MOV(dst_reg(MRF, param_base, ir->lod_info.lod->type, WRITEMASK_W),
|
||||
emit(MOV(dst_reg(MRF, param_base, lod_type, WRITEMASK_W),
|
||||
lod));
|
||||
} else if (ir->op == ir_txd) {
|
||||
const glsl_type *type = ir->lod_info.grad.dPdx->type;
|
||||
const glsl_type *type = lod_type;
|
||||
|
||||
if (intel->gen >= 5) {
|
||||
dPdx.swizzle = BRW_SWIZZLE4(SWIZZLE_X,SWIZZLE_X,SWIZZLE_Y,SWIZZLE_Y);
|
||||
@@ -2004,13 +2011,16 @@ vec4_visitor::visit(ir_texture *ir)
|
||||
void
|
||||
vec4_visitor::swizzle_result(ir_texture *ir, src_reg orig_val, int sampler)
|
||||
{
|
||||
this->result = orig_val;
|
||||
|
||||
int s = c->key.tex.swizzles[sampler];
|
||||
|
||||
this->result = src_reg(this, ir->type);
|
||||
dst_reg swizzled_result(this->result);
|
||||
|
||||
if (ir->op == ir_txs || ir->type == glsl_type::float_type
|
||||
|| s == SWIZZLE_NOOP)
|
||||
|| s == SWIZZLE_NOOP) {
|
||||
emit(MOV(swizzled_result, orig_val));
|
||||
return;
|
||||
}
|
||||
|
||||
int zero_mask = 0, one_mask = 0, copy_mask = 0;
|
||||
int swizzle[4];
|
||||
@@ -2030,9 +2040,6 @@ vec4_visitor::swizzle_result(ir_texture *ir, src_reg orig_val, int sampler)
|
||||
}
|
||||
}
|
||||
|
||||
this->result = src_reg(this, ir->type);
|
||||
dst_reg swizzled_result(this->result);
|
||||
|
||||
if (copy_mask) {
|
||||
orig_val.swizzle = BRW_SWIZZLE4(swizzle[0], swizzle[1], swizzle[2], swizzle[3]);
|
||||
swizzled_result.writemask = copy_mask;
|
||||
|
@@ -436,6 +436,8 @@ brw_populate_sampler_prog_key_data(struct gl_context *ctx,
|
||||
const struct gl_program *prog,
|
||||
struct brw_sampler_prog_key_data *key)
|
||||
{
|
||||
struct intel_context *intel = intel_context(ctx);
|
||||
|
||||
for (int s = 0; s < MAX_SAMPLERS; s++) {
|
||||
key->swizzles[s] = SWIZZLE_NOOP;
|
||||
|
||||
@@ -449,49 +451,16 @@ brw_populate_sampler_prog_key_data(struct gl_context *ctx,
|
||||
const struct gl_texture_object *t = unit->_Current;
|
||||
const struct gl_texture_image *img = t->Image[0][t->BaseLevel];
|
||||
struct gl_sampler_object *sampler = _mesa_get_samplerobj(ctx, unit_id);
|
||||
int swizzles[SWIZZLE_NIL + 1] = {
|
||||
SWIZZLE_X,
|
||||
SWIZZLE_Y,
|
||||
SWIZZLE_Z,
|
||||
SWIZZLE_W,
|
||||
SWIZZLE_ZERO,
|
||||
SWIZZLE_ONE,
|
||||
SWIZZLE_NIL
|
||||
};
|
||||
|
||||
if (img->_BaseFormat == GL_DEPTH_COMPONENT ||
|
||||
img->_BaseFormat == GL_DEPTH_STENCIL) {
|
||||
/* We handle GL_DEPTH_TEXTURE_MODE here instead of as surface
|
||||
* format overrides because shadow comparison always returns the
|
||||
* result of the comparison in all channels anyway.
|
||||
*/
|
||||
switch (t->DepthMode) {
|
||||
case GL_ALPHA:
|
||||
swizzles[0] = SWIZZLE_ZERO;
|
||||
swizzles[1] = SWIZZLE_ZERO;
|
||||
swizzles[2] = SWIZZLE_ZERO;
|
||||
swizzles[3] = SWIZZLE_X;
|
||||
break;
|
||||
case GL_LUMINANCE:
|
||||
swizzles[0] = SWIZZLE_X;
|
||||
swizzles[1] = SWIZZLE_X;
|
||||
swizzles[2] = SWIZZLE_X;
|
||||
swizzles[3] = SWIZZLE_ONE;
|
||||
break;
|
||||
case GL_INTENSITY:
|
||||
swizzles[0] = SWIZZLE_X;
|
||||
swizzles[1] = SWIZZLE_X;
|
||||
swizzles[2] = SWIZZLE_X;
|
||||
swizzles[3] = SWIZZLE_X;
|
||||
break;
|
||||
case GL_RED:
|
||||
swizzles[0] = SWIZZLE_X;
|
||||
swizzles[1] = SWIZZLE_ZERO;
|
||||
swizzles[2] = SWIZZLE_ZERO;
|
||||
swizzles[3] = SWIZZLE_ONE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
const bool alpha_depth = t->DepthMode == GL_ALPHA &&
|
||||
(img->_BaseFormat == GL_DEPTH_COMPONENT ||
|
||||
img->_BaseFormat == GL_DEPTH_STENCIL);
|
||||
|
||||
/* Haswell handles texture swizzling as surface format overrides
|
||||
* (except for GL_ALPHA); all other platforms need MOVs in the shader.
|
||||
*/
|
||||
if (!intel->is_haswell || alpha_depth)
|
||||
key->swizzles[s] = brw_get_texture_swizzle(t);
|
||||
|
||||
if (img->InternalFormat == GL_YCBCR_MESA) {
|
||||
key->yuvtex_mask |= 1 << s;
|
||||
@@ -499,12 +468,6 @@ brw_populate_sampler_prog_key_data(struct gl_context *ctx,
|
||||
key->yuvtex_swap_mask |= 1 << s;
|
||||
}
|
||||
|
||||
key->swizzles[s] =
|
||||
MAKE_SWIZZLE4(swizzles[GET_SWZ(t->_Swizzle, 0)],
|
||||
swizzles[GET_SWZ(t->_Swizzle, 1)],
|
||||
swizzles[GET_SWZ(t->_Swizzle, 2)],
|
||||
swizzles[GET_SWZ(t->_Swizzle, 3)]);
|
||||
|
||||
if (sampler->MinFilter != GL_NEAREST &&
|
||||
sampler->MagFilter != GL_NEAREST) {
|
||||
if (sampler->WrapS == GL_CLAMP)
|
||||
|
@@ -653,6 +653,62 @@ brw_get_surface_num_multisamples(unsigned num_samples)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Compute the combination of DEPTH_TEXTURE_MODE and EXT_texture_swizzle
|
||||
* swizzling.
|
||||
*/
|
||||
int
|
||||
brw_get_texture_swizzle(const struct gl_texture_object *t)
|
||||
{
|
||||
const struct gl_texture_image *img = t->Image[0][t->BaseLevel];
|
||||
|
||||
int swizzles[SWIZZLE_NIL + 1] = {
|
||||
SWIZZLE_X,
|
||||
SWIZZLE_Y,
|
||||
SWIZZLE_Z,
|
||||
SWIZZLE_W,
|
||||
SWIZZLE_ZERO,
|
||||
SWIZZLE_ONE,
|
||||
SWIZZLE_NIL
|
||||
};
|
||||
|
||||
if (img->_BaseFormat == GL_DEPTH_COMPONENT ||
|
||||
img->_BaseFormat == GL_DEPTH_STENCIL) {
|
||||
switch (t->DepthMode) {
|
||||
case GL_ALPHA:
|
||||
swizzles[0] = SWIZZLE_ZERO;
|
||||
swizzles[1] = SWIZZLE_ZERO;
|
||||
swizzles[2] = SWIZZLE_ZERO;
|
||||
swizzles[3] = SWIZZLE_X;
|
||||
break;
|
||||
case GL_LUMINANCE:
|
||||
swizzles[0] = SWIZZLE_X;
|
||||
swizzles[1] = SWIZZLE_X;
|
||||
swizzles[2] = SWIZZLE_X;
|
||||
swizzles[3] = SWIZZLE_ONE;
|
||||
break;
|
||||
case GL_INTENSITY:
|
||||
swizzles[0] = SWIZZLE_X;
|
||||
swizzles[1] = SWIZZLE_X;
|
||||
swizzles[2] = SWIZZLE_X;
|
||||
swizzles[3] = SWIZZLE_X;
|
||||
break;
|
||||
case GL_RED:
|
||||
swizzles[0] = SWIZZLE_X;
|
||||
swizzles[1] = SWIZZLE_ZERO;
|
||||
swizzles[2] = SWIZZLE_ZERO;
|
||||
swizzles[3] = SWIZZLE_ONE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return MAKE_SWIZZLE4(swizzles[GET_SWZ(t->_Swizzle, 0)],
|
||||
swizzles[GET_SWZ(t->_Swizzle, 1)],
|
||||
swizzles[GET_SWZ(t->_Swizzle, 2)],
|
||||
swizzles[GET_SWZ(t->_Swizzle, 3)]);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
brw_update_buffer_texture_surface(struct gl_context *ctx,
|
||||
unsigned unit,
|
||||
|
@@ -54,9 +54,8 @@
|
||||
*/
|
||||
uint32_t
|
||||
get_attr_override(struct brw_vue_map *vue_map, int urb_entry_read_offset,
|
||||
int fs_attr, bool two_side_color)
|
||||
int fs_attr, bool two_side_color, uint32_t *max_source_attr)
|
||||
{
|
||||
int attr_override, slot;
|
||||
int vs_attr = _mesa_frag_attrib_to_vert_result(fs_attr);
|
||||
if (vs_attr < 0 || vs_attr == VERT_RESULT_HPOS) {
|
||||
/* These attributes will be overwritten by the fragment shader's
|
||||
@@ -67,7 +66,7 @@ get_attr_override(struct brw_vue_map *vue_map, int urb_entry_read_offset,
|
||||
}
|
||||
|
||||
/* Find the VUE slot for this attribute. */
|
||||
slot = vue_map->vert_result_to_slot[vs_attr];
|
||||
int slot = vue_map->vert_result_to_slot[vs_attr];
|
||||
|
||||
/* If there was only a back color written but not front, use back
|
||||
* as the color instead of undefined
|
||||
@@ -89,23 +88,29 @@ get_attr_override(struct brw_vue_map *vue_map, int urb_entry_read_offset,
|
||||
* Each increment of urb_entry_read_offset represents a 256-bit value, so
|
||||
* it counts for two 128-bit VUE slots.
|
||||
*/
|
||||
attr_override = slot - 2 * urb_entry_read_offset;
|
||||
assert (attr_override >= 0 && attr_override < 32);
|
||||
int source_attr = slot - 2 * urb_entry_read_offset;
|
||||
assert(source_attr >= 0 && source_attr < 32);
|
||||
|
||||
/* If we are doing two-sided color, and the VUE slot following this one
|
||||
* represents a back-facing color, then we need to instruct the SF unit to
|
||||
* do back-facing swizzling.
|
||||
*/
|
||||
if (two_side_color) {
|
||||
if (vue_map->slot_to_vert_result[slot] == VERT_RESULT_COL0 &&
|
||||
vue_map->slot_to_vert_result[slot+1] == VERT_RESULT_BFC0)
|
||||
attr_override |= (ATTRIBUTE_SWIZZLE_INPUTATTR_FACING << ATTRIBUTE_SWIZZLE_SHIFT);
|
||||
else if (vue_map->slot_to_vert_result[slot] == VERT_RESULT_COL1 &&
|
||||
vue_map->slot_to_vert_result[slot+1] == VERT_RESULT_BFC1)
|
||||
attr_override |= (ATTRIBUTE_SWIZZLE_INPUTATTR_FACING << ATTRIBUTE_SWIZZLE_SHIFT);
|
||||
bool swizzling = two_side_color &&
|
||||
((vue_map->slot_to_vert_result[slot] == VERT_RESULT_COL0 &&
|
||||
vue_map->slot_to_vert_result[slot+1] == VERT_RESULT_BFC0) ||
|
||||
(vue_map->slot_to_vert_result[slot] == VERT_RESULT_COL1 &&
|
||||
vue_map->slot_to_vert_result[slot+1] == VERT_RESULT_BFC1));
|
||||
|
||||
/* Update max_source_attr. If swizzling, the SF will read this slot + 1. */
|
||||
if (*max_source_attr < source_attr + swizzling)
|
||||
*max_source_attr = source_attr + swizzling;
|
||||
|
||||
if (swizzling) {
|
||||
return source_attr |
|
||||
(ATTRIBUTE_SWIZZLE_INPUTATTR_FACING << ATTRIBUTE_SWIZZLE_SHIFT);
|
||||
}
|
||||
|
||||
return attr_override;
|
||||
return source_attr;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -113,7 +118,6 @@ upload_sf_state(struct brw_context *brw)
|
||||
{
|
||||
struct intel_context *intel = &brw->intel;
|
||||
struct gl_context *ctx = &intel->ctx;
|
||||
uint32_t urb_entry_read_length;
|
||||
/* BRW_NEW_FRAGMENT_PROGRAM */
|
||||
uint32_t num_outputs = _mesa_bitcount_64(brw->fragment_program->Base.InputsRead);
|
||||
/* _NEW_LIGHT */
|
||||
@@ -130,21 +134,7 @@ upload_sf_state(struct brw_context *brw)
|
||||
uint16_t attr_overrides[FRAG_ATTRIB_MAX];
|
||||
uint32_t point_sprite_origin;
|
||||
|
||||
/* CACHE_NEW_VS_PROG */
|
||||
urb_entry_read_length = ((brw->vs.prog_data->vue_map.num_slots + 1) / 2 -
|
||||
urb_entry_read_offset);
|
||||
if (urb_entry_read_length == 0) {
|
||||
/* Setting the URB entry read length to 0 causes undefined behavior, so
|
||||
* if we have no URB data to read, set it to 1.
|
||||
*/
|
||||
urb_entry_read_length = 1;
|
||||
}
|
||||
|
||||
dw1 =
|
||||
GEN6_SF_SWIZZLE_ENABLE |
|
||||
num_outputs << GEN6_SF_NUM_OUTPUTS_SHIFT |
|
||||
urb_entry_read_length << GEN6_SF_URB_ENTRY_READ_LENGTH_SHIFT |
|
||||
urb_entry_read_offset << GEN6_SF_URB_ENTRY_READ_OFFSET_SHIFT;
|
||||
dw1 = GEN6_SF_SWIZZLE_ENABLE | num_outputs << GEN6_SF_NUM_OUTPUTS_SHIFT;
|
||||
|
||||
dw2 = GEN6_SF_STATISTICS_ENABLE |
|
||||
GEN6_SF_VIEWPORT_TRANSFORM_ENABLE;
|
||||
@@ -280,6 +270,7 @@ upload_sf_state(struct brw_context *brw)
|
||||
/* Create the mapping from the FS inputs we produce to the VS outputs
|
||||
* they source from.
|
||||
*/
|
||||
uint32_t max_source_attr = 0;
|
||||
for (; attr < FRAG_ATTRIB_MAX; attr++) {
|
||||
enum glsl_interp_qualifier interp_qualifier =
|
||||
brw->fragment_program->InterpQualifier[attr];
|
||||
@@ -315,12 +306,30 @@ upload_sf_state(struct brw_context *brw)
|
||||
attr_overrides[input_index++] =
|
||||
get_attr_override(&brw->vs.prog_data->vue_map,
|
||||
urb_entry_read_offset, attr,
|
||||
ctx->VertexProgram._TwoSideEnabled);
|
||||
ctx->VertexProgram._TwoSideEnabled,
|
||||
&max_source_attr);
|
||||
}
|
||||
|
||||
for (; input_index < FRAG_ATTRIB_MAX; input_index++)
|
||||
attr_overrides[input_index] = 0;
|
||||
|
||||
/* From the Sandy Bridge PRM, Volume 2, Part 1, documentation for
|
||||
* 3DSTATE_SF DWord 1 bits 15:11, "Vertex URB Entry Read Length":
|
||||
*
|
||||
* "This field should be set to the minimum length required to read the
|
||||
* maximum source attribute. The maximum source attribute is indicated
|
||||
* by the maximum value of the enabled Attribute # Source Attribute if
|
||||
* Attribute Swizzle Enable is set, Number of Output Attributes-1 if
|
||||
* enable is not set.
|
||||
* read_length = ceiling((max_source_attr + 1) / 2)
|
||||
*
|
||||
* [errata] Corruption/Hang possible if length programmed larger than
|
||||
* recommended"
|
||||
*/
|
||||
uint32_t urb_entry_read_length = ALIGN(max_source_attr + 1, 2) / 2;
|
||||
dw1 |= urb_entry_read_length << GEN6_SF_URB_ENTRY_READ_LENGTH_SHIFT |
|
||||
urb_entry_read_offset << GEN6_SF_URB_ENTRY_READ_OFFSET_SHIFT;
|
||||
|
||||
BEGIN_BATCH(20);
|
||||
OUT_BATCH(_3DSTATE_SF << 16 | (20 - 2));
|
||||
OUT_BATCH(dw1);
|
||||
|
@@ -195,7 +195,7 @@ gen7_upload_samplers(struct brw_context *brw)
|
||||
|
||||
GLbitfield SamplersUsed = vs->SamplersUsed | fs->SamplersUsed;
|
||||
|
||||
brw->sampler.count = _mesa_bitcount(SamplersUsed);
|
||||
brw->sampler.count = _mesa_fls(SamplersUsed);
|
||||
|
||||
if (brw->sampler.count == 0)
|
||||
return;
|
||||
|
@@ -34,7 +34,6 @@ upload_sbe_state(struct brw_context *brw)
|
||||
{
|
||||
struct intel_context *intel = &brw->intel;
|
||||
struct gl_context *ctx = &intel->ctx;
|
||||
uint32_t urb_entry_read_length;
|
||||
/* BRW_NEW_FRAGMENT_PROGRAM */
|
||||
uint32_t num_outputs = _mesa_bitcount_64(brw->fragment_program->Base.InputsRead);
|
||||
/* _NEW_LIGHT */
|
||||
@@ -48,22 +47,8 @@ upload_sbe_state(struct brw_context *brw)
|
||||
bool render_to_fbo = _mesa_is_user_fbo(ctx->DrawBuffer);
|
||||
uint32_t point_sprite_origin;
|
||||
|
||||
/* CACHE_NEW_VS_PROG */
|
||||
urb_entry_read_length = ((brw->vs.prog_data->vue_map.num_slots + 1) / 2 -
|
||||
urb_entry_read_offset);
|
||||
if (urb_entry_read_length == 0) {
|
||||
/* Setting the URB entry read length to 0 causes undefined behavior, so
|
||||
* if we have no URB data to read, set it to 1.
|
||||
*/
|
||||
urb_entry_read_length = 1;
|
||||
}
|
||||
|
||||
/* FINISHME: Attribute Swizzle Control Mode? */
|
||||
dw1 =
|
||||
GEN7_SBE_SWIZZLE_ENABLE |
|
||||
num_outputs << GEN7_SBE_NUM_OUTPUTS_SHIFT |
|
||||
urb_entry_read_length << GEN7_SBE_URB_ENTRY_READ_LENGTH_SHIFT |
|
||||
urb_entry_read_offset << GEN7_SBE_URB_ENTRY_READ_OFFSET_SHIFT;
|
||||
dw1 = GEN7_SBE_SWIZZLE_ENABLE | num_outputs << GEN7_SBE_NUM_OUTPUTS_SHIFT;
|
||||
|
||||
/* _NEW_POINT
|
||||
*
|
||||
@@ -84,6 +69,7 @@ upload_sbe_state(struct brw_context *brw)
|
||||
/* Create the mapping from the FS inputs we produce to the VS outputs
|
||||
* they source from.
|
||||
*/
|
||||
uint32_t max_source_attr = 0;
|
||||
for (; attr < FRAG_ATTRIB_MAX; attr++) {
|
||||
enum glsl_interp_qualifier interp_qualifier =
|
||||
brw->fragment_program->InterpQualifier[attr];
|
||||
@@ -118,9 +104,25 @@ upload_sbe_state(struct brw_context *brw)
|
||||
attr_overrides[input_index++] =
|
||||
get_attr_override(&brw->vs.prog_data->vue_map,
|
||||
urb_entry_read_offset, attr,
|
||||
ctx->VertexProgram._TwoSideEnabled);
|
||||
ctx->VertexProgram._TwoSideEnabled,
|
||||
&max_source_attr);
|
||||
}
|
||||
|
||||
/* From the Ivy Bridge PRM, Volume 2, Part 1, documentation for
|
||||
* 3DSTATE_SBE DWord 1 bits 15:11, "Vertex URB Entry Read Length":
|
||||
*
|
||||
* "This field should be set to the minimum length required to read the
|
||||
* maximum source attribute. The maximum source attribute is indicated
|
||||
* by the maximum value of the enabled Attribute # Source Attribute if
|
||||
* Attribute Swizzle Enable is set, Number of Output Attributes-1 if
|
||||
* enable is not set.
|
||||
*
|
||||
* read_length = ceiling((max_source_attr + 1) / 2)"
|
||||
*/
|
||||
uint32_t urb_entry_read_length = ALIGN(max_source_attr + 1, 2) / 2;
|
||||
dw1 |= urb_entry_read_length << GEN7_SBE_URB_ENTRY_READ_LENGTH_SHIFT |
|
||||
urb_entry_read_offset << GEN7_SBE_URB_ENTRY_READ_OFFSET_SHIFT;
|
||||
|
||||
for (; input_index < FRAG_ATTRIB_MAX; input_index++)
|
||||
attr_overrides[input_index] = 0;
|
||||
|
||||
@@ -142,7 +144,8 @@ upload_sbe_state(struct brw_context *brw)
|
||||
|
||||
const struct brw_tracked_state gen7_sbe_state = {
|
||||
.dirty = {
|
||||
.mesa = (_NEW_LIGHT |
|
||||
.mesa = (_NEW_BUFFERS |
|
||||
_NEW_LIGHT |
|
||||
_NEW_POINT |
|
||||
_NEW_PROGRAM),
|
||||
.brw = (BRW_NEW_CONTEXT |
|
||||
|
@@ -35,6 +35,32 @@
|
||||
#include "brw_defines.h"
|
||||
#include "brw_wm.h"
|
||||
|
||||
/**
|
||||
* Convert an swizzle enumeration (i.e. SWIZZLE_X) to one of the Gen7.5+
|
||||
* "Shader Channel Select" enumerations (i.e. HSW_SCS_RED)
|
||||
*/
|
||||
static unsigned
|
||||
swizzle_to_scs(GLenum swizzle)
|
||||
{
|
||||
switch (swizzle) {
|
||||
case SWIZZLE_X:
|
||||
return HSW_SCS_RED;
|
||||
case SWIZZLE_Y:
|
||||
return HSW_SCS_GREEN;
|
||||
case SWIZZLE_Z:
|
||||
return HSW_SCS_BLUE;
|
||||
case SWIZZLE_W:
|
||||
return HSW_SCS_ALPHA;
|
||||
case SWIZZLE_ZERO:
|
||||
return HSW_SCS_ZERO;
|
||||
case SWIZZLE_ONE:
|
||||
return HSW_SCS_ONE;
|
||||
}
|
||||
|
||||
assert(!"Should not get here: invalid swizzle mode");
|
||||
return HSW_SCS_ZERO;
|
||||
}
|
||||
|
||||
void
|
||||
gen7_set_surface_tiling(struct gen7_surface_state *surf, uint32_t tiling)
|
||||
{
|
||||
@@ -343,10 +369,21 @@ gen7_update_texture_surface(struct gl_context *ctx,
|
||||
*/
|
||||
|
||||
if (brw->intel.is_haswell) {
|
||||
surf->ss7.shader_channel_select_r = HSW_SCS_RED;
|
||||
surf->ss7.shader_channel_select_g = HSW_SCS_GREEN;
|
||||
surf->ss7.shader_channel_select_b = HSW_SCS_BLUE;
|
||||
surf->ss7.shader_channel_select_a = HSW_SCS_ALPHA;
|
||||
/* Handling GL_ALPHA as a surface format override breaks 1.30+ style
|
||||
* texturing functions that return a float, as our code generation always
|
||||
* selects the .x channel (which would always be 0).
|
||||
*/
|
||||
const bool alpha_depth = tObj->DepthMode == GL_ALPHA &&
|
||||
(firstImage->_BaseFormat == GL_DEPTH_COMPONENT ||
|
||||
firstImage->_BaseFormat == GL_DEPTH_STENCIL);
|
||||
|
||||
const int swizzle =
|
||||
unlikely(alpha_depth) ? SWIZZLE_XYZW : brw_get_texture_swizzle(tObj);
|
||||
|
||||
surf->ss7.shader_channel_select_r = swizzle_to_scs(GET_SWZ(swizzle, 0));
|
||||
surf->ss7.shader_channel_select_g = swizzle_to_scs(GET_SWZ(swizzle, 1));
|
||||
surf->ss7.shader_channel_select_b = swizzle_to_scs(GET_SWZ(swizzle, 2));
|
||||
surf->ss7.shader_channel_select_a = swizzle_to_scs(GET_SWZ(swizzle, 3));
|
||||
}
|
||||
|
||||
/* Emit relocation to surface contents */
|
||||
|
@@ -87,7 +87,7 @@ intel_new_framebuffer(struct gl_context * ctx, GLuint name)
|
||||
|
||||
/** Called by gl_renderbuffer::Delete() */
|
||||
static void
|
||||
intel_delete_renderbuffer(struct gl_renderbuffer *rb)
|
||||
intel_delete_renderbuffer(struct gl_context *ctx, struct gl_renderbuffer *rb)
|
||||
{
|
||||
struct intel_renderbuffer *irb = intel_renderbuffer(rb);
|
||||
|
||||
@@ -95,7 +95,7 @@ intel_delete_renderbuffer(struct gl_renderbuffer *rb)
|
||||
|
||||
intel_miptree_release(&irb->mt);
|
||||
|
||||
free(irb);
|
||||
_mesa_delete_renderbuffer(ctx, rb);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -573,12 +573,14 @@ intel_miptree_match_image(struct intel_mipmap_tree *mt,
|
||||
if (target_to_target(image->TexObject->Target) != mt->target)
|
||||
return false;
|
||||
|
||||
if (image->TexFormat != mt->format &&
|
||||
!(image->TexFormat == MESA_FORMAT_S8_Z24 &&
|
||||
mt->format == MESA_FORMAT_X8_Z24 &&
|
||||
mt->stencil_mt)) {
|
||||
gl_format mt_format = mt->format;
|
||||
if (mt->format == MESA_FORMAT_X8_Z24 && mt->stencil_mt)
|
||||
mt_format = MESA_FORMAT_S8_Z24;
|
||||
if (mt->wraps_etc1)
|
||||
mt_format = MESA_FORMAT_RGBX8888_REV;
|
||||
|
||||
if (image->TexFormat != mt_format)
|
||||
return false;
|
||||
}
|
||||
|
||||
intel_miptree_get_dimensions_for_image(image, &width, &height, &depth);
|
||||
|
||||
|
@@ -102,12 +102,12 @@ nouveau_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb,
|
||||
}
|
||||
|
||||
static void
|
||||
nouveau_renderbuffer_del(struct gl_renderbuffer *rb)
|
||||
nouveau_renderbuffer_del(struct gl_context *ctx, struct gl_renderbuffer *rb)
|
||||
{
|
||||
struct nouveau_surface *s = &to_nouveau_renderbuffer(rb)->surface;
|
||||
|
||||
nouveau_surface_ref(NULL, s);
|
||||
FREE(rb);
|
||||
_mesa_delete_renderbuffer(ctx, rb);
|
||||
}
|
||||
|
||||
static struct gl_renderbuffer *
|
||||
@@ -195,7 +195,7 @@ nouveau_renderbuffer_dri_new(GLenum format, __DRIdrawable *drawable)
|
||||
rb->AllocStorage = nouveau_renderbuffer_dri_storage;
|
||||
|
||||
if (!set_renderbuffer_format(rb, format)) {
|
||||
nouveau_renderbuffer_del(rb);
|
||||
nouveau_renderbuffer_del(NULL, rb);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@@ -289,13 +289,20 @@ GLboolean r200CreateContext( gl_api api,
|
||||
rmesa->radeon.swtcl.RenderIndex = ~0;
|
||||
rmesa->radeon.hw.all_dirty = 1;
|
||||
|
||||
ctx = rmesa->radeon.glCtx;
|
||||
/* Initialize the software rasterizer and helper modules.
|
||||
*/
|
||||
_swrast_CreateContext( ctx );
|
||||
_vbo_CreateContext( ctx );
|
||||
_tnl_CreateContext( ctx );
|
||||
_swsetup_CreateContext( ctx );
|
||||
_ae_create_context( ctx );
|
||||
|
||||
/* Set the maximum texture size small enough that we can guarentee that
|
||||
* all texture units can bind a maximal texture and have all of them in
|
||||
* texturable memory at once. Depending on the allow_large_textures driconf
|
||||
* setting allow larger textures.
|
||||
*/
|
||||
|
||||
ctx = rmesa->radeon.glCtx;
|
||||
ctx->Const.MaxTextureUnits = driQueryOptioni (&rmesa->radeon.optionCache,
|
||||
"texture_units");
|
||||
ctx->Const.MaxTextureImageUnits = ctx->Const.MaxTextureUnits;
|
||||
@@ -345,14 +352,6 @@ GLboolean r200CreateContext( gl_api api,
|
||||
|
||||
_mesa_set_mvp_with_dp4( ctx, GL_TRUE );
|
||||
|
||||
/* Initialize the software rasterizer and helper modules.
|
||||
*/
|
||||
_swrast_CreateContext( ctx );
|
||||
_vbo_CreateContext( ctx );
|
||||
_tnl_CreateContext( ctx );
|
||||
_swsetup_CreateContext( ctx );
|
||||
_ae_create_context( ctx );
|
||||
|
||||
/* Install the customized pipeline:
|
||||
*/
|
||||
_tnl_destroy_pipeline( ctx );
|
||||
|
@@ -166,8 +166,9 @@ void r200EmitArrays( struct gl_context *ctx, GLubyte *vimap_rev )
|
||||
/* fallthrough */
|
||||
case 4:
|
||||
vfmt0 |= R200_VTX_W1;
|
||||
break;
|
||||
/* fallthrough */
|
||||
}
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
emitsize = 0;
|
||||
|
@@ -251,13 +251,21 @@ r100CreateContext( gl_api api,
|
||||
rmesa->radeon.swtcl.RenderIndex = ~0;
|
||||
rmesa->radeon.hw.all_dirty = GL_TRUE;
|
||||
|
||||
ctx = rmesa->radeon.glCtx;
|
||||
/* Initialize the software rasterizer and helper modules.
|
||||
*/
|
||||
_swrast_CreateContext( ctx );
|
||||
_vbo_CreateContext( ctx );
|
||||
_tnl_CreateContext( ctx );
|
||||
_swsetup_CreateContext( ctx );
|
||||
_ae_create_context( ctx );
|
||||
|
||||
/* Set the maximum texture size small enough that we can guarentee that
|
||||
* all texture units can bind a maximal texture and have all of them in
|
||||
* texturable memory at once. Depending on the allow_large_textures driconf
|
||||
* setting allow larger textures.
|
||||
*/
|
||||
|
||||
ctx = rmesa->radeon.glCtx;
|
||||
ctx->Const.MaxTextureUnits = driQueryOptioni (&rmesa->radeon.optionCache,
|
||||
"texture_units");
|
||||
ctx->Const.MaxTextureImageUnits = ctx->Const.MaxTextureUnits;
|
||||
@@ -307,14 +315,6 @@ r100CreateContext( gl_api api,
|
||||
|
||||
_mesa_set_mvp_with_dp4( ctx, GL_TRUE );
|
||||
|
||||
/* Initialize the software rasterizer and helper modules.
|
||||
*/
|
||||
_swrast_CreateContext( ctx );
|
||||
_vbo_CreateContext( ctx );
|
||||
_tnl_CreateContext( ctx );
|
||||
_swsetup_CreateContext( ctx );
|
||||
_ae_create_context( ctx );
|
||||
|
||||
/* Install the customized pipeline:
|
||||
*/
|
||||
_tnl_destroy_pipeline( ctx );
|
||||
|
@@ -54,7 +54,7 @@ radeon_new_framebuffer(struct gl_context *ctx, GLuint name)
|
||||
}
|
||||
|
||||
static void
|
||||
radeon_delete_renderbuffer(struct gl_renderbuffer *rb)
|
||||
radeon_delete_renderbuffer(struct gl_context *ctx, struct gl_renderbuffer *rb)
|
||||
{
|
||||
struct radeon_renderbuffer *rrb = radeon_renderbuffer(rb);
|
||||
|
||||
@@ -67,7 +67,7 @@ radeon_delete_renderbuffer(struct gl_renderbuffer *rb)
|
||||
if (rrb && rrb->bo) {
|
||||
radeon_bo_unref(rrb->bo);
|
||||
}
|
||||
free(rrb);
|
||||
_mesa_delete_renderbuffer(ctx, rb);
|
||||
}
|
||||
|
||||
#if defined(RADEON_R100)
|
||||
|
@@ -261,14 +261,14 @@ choose_pixel_format(const struct gl_config *v)
|
||||
}
|
||||
|
||||
static void
|
||||
swrast_delete_renderbuffer(struct gl_renderbuffer *rb)
|
||||
swrast_delete_renderbuffer(struct gl_context *ctx, struct gl_renderbuffer *rb)
|
||||
{
|
||||
struct dri_swrast_renderbuffer *xrb = dri_swrast_renderbuffer(rb);
|
||||
|
||||
TRACE;
|
||||
|
||||
free(xrb->Base.Buffer);
|
||||
free(xrb);
|
||||
_mesa_delete_renderbuffer(ctx, rb);
|
||||
}
|
||||
|
||||
/* see bytes_per_line in libGL */
|
||||
|
@@ -41,6 +41,7 @@
|
||||
#include "main/framebuffer.h"
|
||||
#include "main/imports.h"
|
||||
#include "main/macros.h"
|
||||
#include "main/mipmap.h"
|
||||
#include "main/mtypes.h"
|
||||
#include "main/renderbuffer.h"
|
||||
#include "swrast/swrast.h"
|
||||
@@ -386,9 +387,9 @@ compute_row_addresses( OSMesaContext osmesa )
|
||||
* Don't use _mesa_delete_renderbuffer since we can't free rb->Buffer.
|
||||
*/
|
||||
static void
|
||||
osmesa_delete_renderbuffer(struct gl_renderbuffer *rb)
|
||||
osmesa_delete_renderbuffer(struct gl_context *ctx, struct gl_renderbuffer *rb)
|
||||
{
|
||||
free(rb);
|
||||
_mesa_delete_renderbuffer(ctx, rb);
|
||||
}
|
||||
|
||||
|
||||
@@ -780,6 +781,8 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
|
||||
ctx->Driver.MapRenderbuffer = osmesa_MapRenderbuffer;
|
||||
ctx->Driver.UnmapRenderbuffer = osmesa_UnmapRenderbuffer;
|
||||
|
||||
ctx->Driver.GenerateMipmap = _mesa_generate_mipmap;
|
||||
|
||||
/* Extend the software rasterizer with our optimized line and triangle
|
||||
* drawing functions.
|
||||
*/
|
||||
|
@@ -900,9 +900,9 @@ static void read_rgba_pixels_16(struct gl_context *ctx,
|
||||
|
||||
|
||||
static void
|
||||
wmesa_delete_renderbuffer(struct gl_renderbuffer *rb)
|
||||
wmesa_delete_renderbuffer(struct gl_context *ctx, struct gl_renderbuffer *rb)
|
||||
{
|
||||
free(rb);
|
||||
_mesa_delete_renderbuffer(ctx, rb);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -917,6 +917,20 @@ choose_visual( Display *dpy, int screen, const int *list, GLboolean fbConfig )
|
||||
|
||||
while (*parselist) {
|
||||
|
||||
if (fbConfig &&
|
||||
parselist[1] == GLX_DONT_CARE &&
|
||||
parselist[0] != GLX_LEVEL) {
|
||||
/* For glXChooseFBConfig(), skip attributes whose value is
|
||||
* GLX_DONT_CARE (-1), unless it's GLX_LEVEL (which can legitimately be
|
||||
* a negative value).
|
||||
*
|
||||
* From page 17 (23 of the pdf) of the GLX 1.4 spec:
|
||||
* GLX DONT CARE may be specified for all attributes except GLX LEVEL.
|
||||
*/
|
||||
parselist += 2;
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (*parselist) {
|
||||
case GLX_USE_GL:
|
||||
if (fbConfig) {
|
||||
|
@@ -844,15 +844,18 @@ XMesaVisual XMesaCreateVisual( XMesaDisplay *display,
|
||||
alpha_bits = v->mesa_visual.alphaBits;
|
||||
}
|
||||
|
||||
_mesa_initialize_visual( &v->mesa_visual,
|
||||
db_flag, stereo_flag,
|
||||
red_bits, green_bits,
|
||||
blue_bits, alpha_bits,
|
||||
depth_size,
|
||||
stencil_size,
|
||||
accum_red_size, accum_green_size,
|
||||
accum_blue_size, accum_alpha_size,
|
||||
0 );
|
||||
if (!_mesa_initialize_visual(&v->mesa_visual,
|
||||
db_flag, stereo_flag,
|
||||
red_bits, green_bits,
|
||||
blue_bits, alpha_bits,
|
||||
depth_size,
|
||||
stencil_size,
|
||||
accum_red_size, accum_green_size,
|
||||
accum_blue_size, accum_alpha_size,
|
||||
0)) {
|
||||
FREE(v);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* XXX minor hack */
|
||||
v->mesa_visual.level = level;
|
||||
|
@@ -235,7 +235,7 @@ alloc_back_buffer(XMesaBuffer b, GLuint width, GLuint height)
|
||||
|
||||
|
||||
static void
|
||||
xmesa_delete_renderbuffer(struct gl_renderbuffer *rb)
|
||||
xmesa_delete_renderbuffer(struct gl_context *ctx, struct gl_renderbuffer *rb)
|
||||
{
|
||||
/* XXX Note: the ximage or Pixmap attached to this renderbuffer
|
||||
* should probably get freed here, but that's currently done in
|
||||
|
@@ -34,6 +34,7 @@
|
||||
#include "main/colormac.h"
|
||||
#include "main/fbobject.h"
|
||||
#include "main/macros.h"
|
||||
#include "main/mipmap.h"
|
||||
#include "main/image.h"
|
||||
#include "main/imports.h"
|
||||
#include "main/mtypes.h"
|
||||
@@ -872,6 +873,8 @@ xmesa_init_driver_functions( XMesaVisual xmvisual,
|
||||
driver->MapRenderbuffer = xmesa_MapRenderbuffer;
|
||||
driver->UnmapRenderbuffer = xmesa_UnmapRenderbuffer;
|
||||
|
||||
driver->GenerateMipmap = _mesa_generate_mipmap;
|
||||
|
||||
#if ENABLE_EXT_timer_query
|
||||
driver->NewQueryObject = xmesa_new_query_object;
|
||||
driver->BeginQuery = xmesa_begin_query;
|
||||
|
@@ -534,8 +534,8 @@ _mesa_ReadBuffer(GLenum buffer)
|
||||
if (MESA_VERBOSE & VERBOSE_API)
|
||||
_mesa_debug(ctx, "glReadBuffer %s\n", _mesa_lookup_enum_by_nr(buffer));
|
||||
|
||||
if (_mesa_is_user_fbo(fb) && buffer == GL_NONE) {
|
||||
/* This is legal for user-created framebuffer objects */
|
||||
if (buffer == GL_NONE) {
|
||||
/* This is legal--it means that no buffer should be bound for reading. */
|
||||
srcBuffer = -1;
|
||||
}
|
||||
else {
|
||||
|
@@ -288,7 +288,7 @@ static const struct extension extension_table[] = {
|
||||
{ "GL_ATI_texture_float", o(ARB_texture_float), GL, 2002 },
|
||||
{ "GL_ATI_texture_mirror_once", o(ATI_texture_mirror_once), GL, 2006 },
|
||||
{ "GL_IBM_multimode_draw_arrays", o(IBM_multimode_draw_arrays), GL, 1998 },
|
||||
{ "GL_IBM_rasterpos_clip", o(IBM_rasterpos_clip), GL, 1996 },
|
||||
{ "GL_IBM_rasterpos_clip", o(IBM_rasterpos_clip), GLL, 1996 },
|
||||
{ "GL_IBM_texture_mirrored_repeat", o(dummy_true), GLL, 1998 },
|
||||
{ "GL_INGR_blend_func_separate", o(EXT_blend_func_separate), GLL, 1999 },
|
||||
{ "GL_MESA_pack_invert", o(MESA_pack_invert), GL, 2002 },
|
||||
@@ -308,7 +308,7 @@ static const struct extension extension_table[] = {
|
||||
{ "GL_NV_light_max_exponent", o(NV_light_max_exponent), GLL, 1999 },
|
||||
{ "GL_NV_packed_depth_stencil", o(EXT_packed_depth_stencil), GL, 2000 },
|
||||
{ "GL_NV_point_sprite", o(NV_point_sprite), GL, 2001 },
|
||||
{ "GL_NV_primitive_restart", o(NV_primitive_restart), GL, 2002 },
|
||||
{ "GL_NV_primitive_restart", o(NV_primitive_restart), GLL, 2002 },
|
||||
{ "GL_NV_read_buffer", o(dummy_true), ES2, 2011 },
|
||||
{ "GL_NV_texgen_reflection", o(NV_texgen_reflection), GLL, 1999 },
|
||||
{ "GL_NV_texture_barrier", o(NV_texture_barrier), GL, 2009 },
|
||||
@@ -471,9 +471,6 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
|
||||
#endif
|
||||
#if FEATURE_EXT_framebuffer_blit
|
||||
ctx->Extensions.EXT_framebuffer_blit = GL_TRUE;
|
||||
#endif
|
||||
#if FEATURE_ARB_framebuffer_object
|
||||
ctx->Extensions.EXT_framebuffer_multisample = GL_TRUE;
|
||||
#endif
|
||||
ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE;
|
||||
#if FEATURE_EXT_pixel_buffer_object
|
||||
|
@@ -77,7 +77,7 @@ static struct gl_framebuffer IncompleteFramebuffer;
|
||||
|
||||
|
||||
static void
|
||||
delete_dummy_renderbuffer(struct gl_renderbuffer *rb)
|
||||
delete_dummy_renderbuffer(struct gl_context *ctx, struct gl_renderbuffer *rb)
|
||||
{
|
||||
/* no op */
|
||||
}
|
||||
|
@@ -2623,6 +2623,20 @@ unpack_int_rgba_ABGR2101010_UINT(const GLuint *src, GLuint dst[][4], GLuint n)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
unpack_int_rgba_ARGB2101010(const GLuint *src, GLuint dst[][4], GLuint n)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
GLuint tmp = src[i];
|
||||
dst[i][0] = (tmp >> 20) & 0x3ff;
|
||||
dst[i][1] = (tmp >> 10) & 0x3ff;
|
||||
dst[i][2] = (tmp >> 0) & 0x3ff;
|
||||
dst[i][3] = (tmp >> 30) & 0x3;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_mesa_unpack_uint_rgba_row(gl_format format, GLuint n,
|
||||
const void *src, GLuint dst[][4])
|
||||
@@ -2798,6 +2812,10 @@ _mesa_unpack_uint_rgba_row(gl_format format, GLuint n,
|
||||
unpack_int_rgba_ABGR2101010_UINT(src, dst, n);
|
||||
break;
|
||||
|
||||
case MESA_FORMAT_ARGB2101010:
|
||||
unpack_int_rgba_ARGB2101010(src, dst, n);
|
||||
break;
|
||||
|
||||
default:
|
||||
_mesa_problem(NULL, "%s: bad format %s", __FUNCTION__,
|
||||
_mesa_get_format_name(format));
|
||||
|
@@ -2618,7 +2618,7 @@ struct gl_renderbuffer
|
||||
gl_format Format; /**< The actual renderbuffer memory format */
|
||||
|
||||
/** Delete this renderbuffer */
|
||||
void (*Delete)(struct gl_renderbuffer *rb);
|
||||
void (*Delete)(struct gl_context *ctx, struct gl_renderbuffer *rb);
|
||||
|
||||
/** Allocate new storage for this renderbuffer */
|
||||
GLboolean (*AllocStorage)(struct gl_context *ctx,
|
||||
|
@@ -75,11 +75,15 @@ _mesa_new_renderbuffer(struct gl_context *ctx, GLuint name)
|
||||
/**
|
||||
* Delete a gl_framebuffer.
|
||||
* This is the default function for renderbuffer->Delete().
|
||||
* Drivers which subclass gl_renderbuffer should probably implement their
|
||||
* own delete function. But the driver might also call this function to
|
||||
* free the object in the end.
|
||||
*/
|
||||
void
|
||||
_mesa_delete_renderbuffer(struct gl_renderbuffer *rb)
|
||||
_mesa_delete_renderbuffer(struct gl_context *ctx, struct gl_renderbuffer *rb)
|
||||
{
|
||||
/* no-op */
|
||||
_glthread_DESTROY_MUTEX(rb->Mutex);
|
||||
free(rb);
|
||||
}
|
||||
|
||||
|
||||
@@ -155,7 +159,8 @@ _mesa_reference_renderbuffer_(struct gl_renderbuffer **ptr,
|
||||
_glthread_UNLOCK_MUTEX(oldRb->Mutex);
|
||||
|
||||
if (deleteFlag) {
|
||||
oldRb->Delete(oldRb);
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
oldRb->Delete(ctx, oldRb);
|
||||
}
|
||||
|
||||
*ptr = NULL;
|
||||
|
@@ -40,7 +40,7 @@ extern struct gl_renderbuffer *
|
||||
_mesa_new_renderbuffer(struct gl_context *ctx, GLuint name);
|
||||
|
||||
extern void
|
||||
_mesa_delete_renderbuffer(struct gl_renderbuffer *rb);
|
||||
_mesa_delete_renderbuffer(struct gl_context *ctx, struct gl_renderbuffer *rb);
|
||||
|
||||
extern void
|
||||
_mesa_add_renderbuffer(struct gl_framebuffer *fb,
|
||||
|
@@ -186,25 +186,6 @@ validate_shader_target(const struct gl_context *ctx, GLenum type)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Find the length of the longest transform feedback varying name
|
||||
* which was specified with glTransformFeedbackVaryings().
|
||||
*/
|
||||
static GLint
|
||||
longest_feedback_varying_name(const struct gl_shader_program *shProg)
|
||||
{
|
||||
GLuint i;
|
||||
GLint max = 0;
|
||||
for (i = 0; i < shProg->TransformFeedback.NumVarying; i++) {
|
||||
GLint len = strlen(shProg->TransformFeedback.VaryingNames[i]);
|
||||
if (len > max)
|
||||
max = len;
|
||||
}
|
||||
return max;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static GLboolean
|
||||
is_program(struct gl_context *ctx, GLuint name)
|
||||
{
|
||||
@@ -549,11 +530,24 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, GLint *param
|
||||
break;
|
||||
*params = shProg->TransformFeedback.NumVarying;
|
||||
return;
|
||||
case GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH:
|
||||
case GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH: {
|
||||
unsigned i;
|
||||
GLint max_len = 0;
|
||||
if (!has_xfb)
|
||||
break;
|
||||
*params = longest_feedback_varying_name(shProg) + 1;
|
||||
|
||||
for (i = 0; i < shProg->TransformFeedback.NumVarying; i++) {
|
||||
/* Add one for the terminating NUL character.
|
||||
*/
|
||||
const GLint len = strlen(shProg->TransformFeedback.VaryingNames[i]) + 1;
|
||||
|
||||
if (len > max_len)
|
||||
max_len = len;
|
||||
}
|
||||
|
||||
*params = max_len;
|
||||
return;
|
||||
}
|
||||
case GL_TRANSFORM_FEEDBACK_BUFFER_MODE:
|
||||
if (!has_xfb)
|
||||
break;
|
||||
|
@@ -250,6 +250,8 @@ _mesa_init_shader_program(struct gl_context *ctx, struct gl_shader_program *prog
|
||||
prog->Geom.OutputType = GL_TRIANGLE_STRIP;
|
||||
#endif
|
||||
|
||||
prog->TransformFeedback.BufferMode = GL_INTERLEAVED_ATTRIBS;
|
||||
|
||||
prog->InfoLog = ralloc_strdup(prog, "");
|
||||
}
|
||||
|
||||
|
@@ -271,10 +271,11 @@ delete_framebuffer_cb(GLuint id, void *data, void *userData)
|
||||
static void
|
||||
delete_renderbuffer_cb(GLuint id, void *data, void *userData)
|
||||
{
|
||||
struct gl_context *ctx = (struct gl_context *) userData;
|
||||
struct gl_renderbuffer *rb = (struct gl_renderbuffer *) data;
|
||||
rb->RefCount = 0; /* see comment for FBOs above */
|
||||
if (rb->Delete)
|
||||
rb->Delete(rb);
|
||||
rb->Delete(ctx, rb);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -229,6 +229,8 @@ get_tex_rgba_compressed(struct gl_context *ctx, GLuint dimensions,
|
||||
const gl_format texFormat =
|
||||
_mesa_get_srgb_format_linear(texImage->TexFormat);
|
||||
const GLenum baseFormat = _mesa_get_format_base_format(texFormat);
|
||||
const GLenum destBaseFormat = _mesa_base_tex_format(ctx, format);
|
||||
GLenum rebaseFormat = GL_NONE;
|
||||
const GLuint width = texImage->Width;
|
||||
const GLuint height = texImage->Height;
|
||||
const GLuint depth = texImage->Depth;
|
||||
@@ -266,9 +268,31 @@ get_tex_rgba_compressed(struct gl_context *ctx, GLuint dimensions,
|
||||
}
|
||||
|
||||
if (baseFormat == GL_LUMINANCE ||
|
||||
baseFormat == GL_INTENSITY ||
|
||||
baseFormat == GL_LUMINANCE_ALPHA) {
|
||||
/* If a luminance (or intensity) texture is read back as RGB(A), the
|
||||
* returned value should be (L,0,0,1), not (L,L,L,1). Set rebaseFormat
|
||||
* here to get G=B=0.
|
||||
*/
|
||||
rebaseFormat = texImage->_BaseFormat;
|
||||
}
|
||||
else if ((baseFormat == GL_RGBA ||
|
||||
baseFormat == GL_RGB ||
|
||||
baseFormat == GL_RG) &&
|
||||
(destBaseFormat == GL_LUMINANCE ||
|
||||
destBaseFormat == GL_LUMINANCE_ALPHA ||
|
||||
destBaseFormat == GL_LUMINANCE_INTEGER_EXT ||
|
||||
destBaseFormat == GL_LUMINANCE_ALPHA_INTEGER_EXT)) {
|
||||
/* If we're reading back an RGB(A) texture as luminance then we need
|
||||
* to return L=tex(R). Note, that's different from glReadPixels which
|
||||
* returns L=R+G+B.
|
||||
*/
|
||||
rebaseFormat = GL_LUMINANCE_ALPHA; /* this covers GL_LUMINANCE too */
|
||||
}
|
||||
|
||||
if (rebaseFormat) {
|
||||
_mesa_rebase_rgba_float(width * height, (GLfloat (*)[4]) tempImage,
|
||||
baseFormat);
|
||||
rebaseFormat);
|
||||
}
|
||||
|
||||
srcRow = tempImage;
|
||||
@@ -332,7 +356,8 @@ get_tex_rgba_uncompressed(struct gl_context *ctx, GLuint dimensions,
|
||||
rebaseFormat = texImage->_BaseFormat;
|
||||
}
|
||||
else if ((texImage->_BaseFormat == GL_RGBA ||
|
||||
texImage->_BaseFormat == GL_RGB) &&
|
||||
texImage->_BaseFormat == GL_RGB ||
|
||||
texImage->_BaseFormat == GL_RG) &&
|
||||
(destBaseFormat == GL_LUMINANCE ||
|
||||
destBaseFormat == GL_LUMINANCE_ALPHA ||
|
||||
destBaseFormat == GL_LUMINANCE_INTEGER_EXT ||
|
||||
@@ -419,15 +444,6 @@ get_tex_rgba(struct gl_context *ctx, GLuint dimensions,
|
||||
transferOps |= IMAGE_CLAMP_BIT;
|
||||
}
|
||||
}
|
||||
/* This applies to RGB, RGBA textures. if the format is either LUMINANCE
|
||||
* or LUMINANCE ALPHA, luminance (L) is computed as L=R+G+B .we need to
|
||||
* clamp the sum to [0,1].
|
||||
*/
|
||||
else if ((format == GL_LUMINANCE ||
|
||||
format == GL_LUMINANCE_ALPHA) &&
|
||||
dataType == GL_UNSIGNED_NORMALIZED) {
|
||||
transferOps |= IMAGE_CLAMP_BIT;
|
||||
}
|
||||
|
||||
if (_mesa_is_format_compressed(texImage->TexFormat)) {
|
||||
get_tex_rgba_compressed(ctx, dimensions, format, type,
|
||||
|
@@ -97,12 +97,16 @@ _mesa_GetActiveUniformsiv(GLuint program,
|
||||
|
||||
for (i = 0; i < uniformCount; i++) {
|
||||
GLuint index = uniformIndices[i];
|
||||
const struct gl_uniform_storage *uni = &shProg->UniformStorage[index];
|
||||
|
||||
if (index >= shProg->NumUserUniformStorage) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniformsiv(index)");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < uniformCount; i++) {
|
||||
GLuint index = uniformIndices[i];
|
||||
const struct gl_uniform_storage *uni = &shProg->UniformStorage[index];
|
||||
|
||||
switch (pname) {
|
||||
case GL_UNIFORM_TYPE:
|
||||
@@ -237,11 +241,14 @@ validate_uniform_parameters(struct gl_context *ctx,
|
||||
return false;
|
||||
}
|
||||
|
||||
/* This case should be impossible. The implication is that a call like
|
||||
* glGetUniformLocation(prog, "foo[8]") was successful but "foo" is not an
|
||||
* array.
|
||||
/* If the uniform is an array, check that array_index is in bounds.
|
||||
* If not an array, check that array_index is zero.
|
||||
* array_index is unsigned so no need to check for less than zero.
|
||||
*/
|
||||
if (*array_index != 0 && shProg->UniformStorage[*loc].array_elements == 0) {
|
||||
unsigned limit = shProg->UniformStorage[*loc].array_elements;
|
||||
if (limit == 0)
|
||||
limit = 1;
|
||||
if (*array_index >= limit) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "%s(location=%d)",
|
||||
caller, location);
|
||||
return false;
|
||||
@@ -728,9 +735,6 @@ _mesa_uniform(struct gl_context *ctx, struct gl_shader_program *shProg,
|
||||
* will have already generated an error.
|
||||
*/
|
||||
if (uni->array_elements != 0) {
|
||||
if (offset >= uni->array_elements)
|
||||
return;
|
||||
|
||||
count = MIN2(count, (int) (uni->array_elements - offset));
|
||||
}
|
||||
|
||||
@@ -885,9 +889,6 @@ _mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg,
|
||||
* will have already generated an error.
|
||||
*/
|
||||
if (uni->array_elements != 0) {
|
||||
if (offset >= uni->array_elements)
|
||||
return;
|
||||
|
||||
count = MIN2(count, (int) (uni->array_elements - offset));
|
||||
}
|
||||
|
||||
@@ -1021,10 +1022,13 @@ _mesa_get_uniform_location(struct gl_context *ctx,
|
||||
if (!found)
|
||||
return GL_INVALID_INDEX;
|
||||
|
||||
/* Since array_elements is 0 for non-arrays, this causes look-ups of 'a[0]'
|
||||
* to (correctly) fail if 'a' is not an array.
|
||||
/* If the uniform is an array, fail if the index is out of bounds.
|
||||
* (A negative index is caught above.) This also fails if the uniform
|
||||
* is not an array, but the user is trying to index it, because
|
||||
* array_elements is zero and offset >= 0.
|
||||
*/
|
||||
if (array_lookup && shProg->UniformStorage[location].array_elements == 0) {
|
||||
if (array_lookup
|
||||
&& offset >= shProg->UniformStorage[location].array_elements) {
|
||||
return GL_INVALID_INDEX;
|
||||
}
|
||||
|
||||
|
@@ -34,8 +34,8 @@ struct gl_context;
|
||||
/* Mesa version */
|
||||
#define MESA_MAJOR 9
|
||||
#define MESA_MINOR 0
|
||||
#define MESA_PATCH 2
|
||||
#define MESA_VERSION_STRING "9.0.2"
|
||||
#define MESA_PATCH 3
|
||||
#define MESA_VERSION_STRING "9.0.3"
|
||||
|
||||
/* To make version comparison easy */
|
||||
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
|
||||
|
@@ -732,7 +732,7 @@ _mesa_combine_programs(struct gl_context *ctx,
|
||||
const GLuint newLength = lenA + lenB;
|
||||
GLboolean usedTemps[MAX_PROGRAM_TEMPS];
|
||||
GLuint firstTemp = 0;
|
||||
GLbitfield inputsB;
|
||||
GLbitfield64 inputsB;
|
||||
GLuint i;
|
||||
|
||||
ASSERT(progA->Target == progB->Target);
|
||||
@@ -760,7 +760,7 @@ _mesa_combine_programs(struct gl_context *ctx,
|
||||
if (newProg->Target == GL_FRAGMENT_PROGRAM_ARB) {
|
||||
const struct gl_fragment_program *fprogA, *fprogB;
|
||||
struct gl_fragment_program *newFprog;
|
||||
GLbitfield progB_inputsRead = progB->InputsRead;
|
||||
GLbitfield64 progB_inputsRead = progB->InputsRead;
|
||||
GLint progB_colorFile, progB_colorIndex;
|
||||
|
||||
fprogA = gl_fragment_program_const(progA);
|
||||
|
@@ -356,9 +356,8 @@ setup_bitmap_vertex_data(struct st_context *st, bool normalized,
|
||||
tBot = (GLfloat) height;
|
||||
}
|
||||
|
||||
u_upload_alloc(st->uploader, 0, 4 * sizeof(vertices[0]), vbuf_offset, vbuf,
|
||||
(void**)&vertices);
|
||||
if (!vbuf) {
|
||||
if (u_upload_alloc(st->uploader, 0, 4 * sizeof(vertices[0]),
|
||||
vbuf_offset, vbuf, (void **) &vertices) != PIPE_OK) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -142,9 +142,8 @@ draw_quad(struct st_context *st,
|
||||
GLuint i, offset;
|
||||
float (*vertices)[2][4]; /**< vertex pos + color */
|
||||
|
||||
u_upload_alloc(st->uploader, 0, 4 * sizeof(vertices[0]), &offset, &vbuf,
|
||||
(void**)&vertices);
|
||||
if (!vbuf) {
|
||||
if (u_upload_alloc(st->uploader, 0, 4 * sizeof(vertices[0]),
|
||||
&offset, &vbuf, (void **) &vertices) != PIPE_OK) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -398,6 +398,8 @@ internal_format(struct gl_context *ctx, GLenum format, GLenum type)
|
||||
|
||||
case GL_UNSIGNED_BYTE_3_3_2:
|
||||
case GL_UNSIGNED_BYTE_2_3_3_REV:
|
||||
return GL_R3_G3_B2;
|
||||
|
||||
case GL_UNSIGNED_SHORT_4_4_4_4:
|
||||
case GL_UNSIGNED_SHORT_4_4_4_4_REV:
|
||||
return GL_RGBA4;
|
||||
@@ -571,9 +573,8 @@ draw_quad(struct gl_context *ctx, GLfloat x0, GLfloat y0, GLfloat z,
|
||||
struct pipe_resource *buf = NULL;
|
||||
unsigned offset;
|
||||
|
||||
u_upload_alloc(st->uploader, 0, 4 * sizeof(verts[0]), &offset, &buf,
|
||||
(void**)&verts);
|
||||
if (!buf) {
|
||||
if (u_upload_alloc(st->uploader, 0, 4 * sizeof(verts[0]), &offset,
|
||||
&buf, (void **) &verts) != PIPE_OK) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -151,10 +151,9 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
|
||||
GLfloat *vbuf = NULL;
|
||||
GLuint attr;
|
||||
|
||||
u_upload_alloc(st->uploader, 0,
|
||||
numAttribs * 4 * 4 * sizeof(GLfloat),
|
||||
&offset, &vbuffer, (void**)&vbuf);
|
||||
if (!vbuffer) {
|
||||
if (u_upload_alloc(st->uploader, 0,
|
||||
numAttribs * 4 * 4 * sizeof(GLfloat),
|
||||
&offset, &vbuffer, (void **) &vbuf) != PIPE_OK) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -225,14 +225,16 @@ st_renderbuffer_alloc_storage(struct gl_context * ctx,
|
||||
* gl_renderbuffer::Delete()
|
||||
*/
|
||||
static void
|
||||
st_renderbuffer_delete(struct gl_renderbuffer *rb)
|
||||
st_renderbuffer_delete(struct gl_context *ctx, struct gl_renderbuffer *rb)
|
||||
{
|
||||
struct st_renderbuffer *strb = st_renderbuffer(rb);
|
||||
ASSERT(strb);
|
||||
pipe_surface_reference(&strb->surface, NULL);
|
||||
if (ctx) {
|
||||
struct st_context *st = st_context(ctx);
|
||||
pipe_surface_release(st->pipe, &strb->surface);
|
||||
}
|
||||
pipe_resource_reference(&strb->texture, NULL);
|
||||
free(strb->data);
|
||||
free(strb);
|
||||
_mesa_delete_renderbuffer(ctx, rb);
|
||||
}
|
||||
|
||||
|
||||
@@ -434,7 +436,7 @@ st_render_texture(struct gl_context *ctx,
|
||||
|
||||
pipe_resource_reference( &strb->texture, pt );
|
||||
|
||||
pipe_surface_reference(&strb->surface, NULL);
|
||||
pipe_surface_release(pipe, &strb->surface);
|
||||
|
||||
assert(strb->rtt_level <= strb->texture->last_level);
|
||||
|
||||
|
@@ -83,7 +83,12 @@ all_varyings_in_vbos(const struct gl_client_array *arrays[])
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
/**
|
||||
* Basically, translate Mesa's index buffer information into
|
||||
* a pipe_index_buffer object.
|
||||
* \return TRUE or FALSE for success/failure
|
||||
*/
|
||||
static boolean
|
||||
setup_index_buffer(struct st_context *st,
|
||||
const struct _mesa_index_buffer *ib,
|
||||
struct pipe_index_buffer *ibuffer)
|
||||
@@ -99,8 +104,12 @@ setup_index_buffer(struct st_context *st,
|
||||
ibuffer->offset = pointer_to_offset(ib->ptr);
|
||||
}
|
||||
else if (st->indexbuf_uploader) {
|
||||
u_upload_data(st->indexbuf_uploader, 0, ib->count * ibuffer->index_size,
|
||||
ib->ptr, &ibuffer->offset, &ibuffer->buffer);
|
||||
if (u_upload_data(st->indexbuf_uploader, 0,
|
||||
ib->count * ibuffer->index_size, ib->ptr,
|
||||
&ibuffer->offset, &ibuffer->buffer) != PIPE_OK) {
|
||||
/* out of memory */
|
||||
return FALSE;
|
||||
}
|
||||
u_upload_unmap(st->indexbuf_uploader);
|
||||
}
|
||||
else {
|
||||
@@ -109,6 +118,7 @@ setup_index_buffer(struct st_context *st,
|
||||
}
|
||||
|
||||
cso_set_index_buffer(st->cso_context, ibuffer);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -219,7 +229,10 @@ st_draw_vbo(struct gl_context *ctx,
|
||||
vbo_get_minmax_indices(ctx, prims, ib, &min_index, &max_index,
|
||||
nr_prims);
|
||||
|
||||
setup_index_buffer(st, ib, &ibuffer);
|
||||
if (!setup_index_buffer(st, ib, &ibuffer)) {
|
||||
/* out of memory */
|
||||
return;
|
||||
}
|
||||
|
||||
info.indexed = TRUE;
|
||||
if (min_index != ~0 && max_index != ~0) {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user