Compare commits
54 Commits
mesa-10.4.
...
10.4
Author | SHA1 | Date | |
---|---|---|---|
|
cb154bb221 | ||
|
d26f3c1f86 | ||
|
b7b218f3f6 | ||
|
832c94a55c | ||
|
70832be2f1 | ||
|
ad259df2e0 | ||
|
df2db2a55f | ||
|
0506f69f08 | ||
|
a563045009 | ||
|
b2e243f70c | ||
|
8c25b0f2d1 | ||
|
a91ee1e187 | ||
|
977626f10a | ||
|
b451a2ffbf | ||
|
a561eee82c | ||
|
80ef80d087 | ||
|
fa8bfb3ed1 | ||
|
025cf8cb3f | ||
|
4db4f70546 | ||
|
d4a95ffcda | ||
|
97b0219ed5 | ||
|
93273f16af | ||
|
8e8d215cae | ||
|
1a929baa0b | ||
|
3a625d0b3f | ||
|
944ef59b2f | ||
|
fc9dd495b2 | ||
|
542a754524 | ||
|
e559d126f9 | ||
|
fc5881ad73 | ||
|
9508ca24f1 | ||
|
644bbf88ec | ||
|
a369361f9e | ||
|
f1663a5236 | ||
|
e1b5bc9330 | ||
|
93edf3e7dc | ||
|
66a3f104a5 | ||
|
afa7a851da | ||
|
d880aa573c | ||
|
741aeba26f | ||
|
a598a9bdfe | ||
|
0c46d850d9 | ||
|
da46b1b160 | ||
|
7e723c98ce | ||
|
0a51529a28 | ||
|
2a9e9b5aeb | ||
|
120792fa04 | ||
|
39ae85732d | ||
|
61c1aabb9f | ||
|
6da4e66d4e | ||
|
7e57411b9a | ||
|
1e6735ead1 | ||
|
deea686c71 | ||
|
41bdeda102 |
@@ -1,2 +1,18 @@
|
||||
# No whitespace commits in stable.
|
||||
a10bf5c10caf27232d4df8da74d5c35c23eb883d
|
||||
a10bf5c10caf27232d4df8da74d5c35c23eb883d
|
||||
|
||||
# The following patches address code which is missing in 10.4
|
||||
# http://lists.freedesktop.org/archives/mesa-dev/2015-March/078515.html
|
||||
06084652fefe49c3d6bf1b476ff74ff602fdc22a common: Correct texture init for meta pbo uploads and downloads.
|
||||
|
||||
# http://lists.freedesktop.org/archives/mesa-dev/2015-March/078547.html
|
||||
ccc5ce6f72c1ec86be4dfcef96c0b51fba0faa6d common: Correct PBO 2D_ARRAY handling.
|
||||
|
||||
# http://lists.freedesktop.org/archives/mesa-dev/2015-March/078549.html
|
||||
546aba143d13ba3f993ead4cc30b2404abfc0202 common: Fix PBOs for 1D_ARRAY.
|
||||
|
||||
# http://lists.freedesktop.org/archives/mesa-dev/2015-March/078501.html
|
||||
2b2fa1865248c6e3b7baec81c4f92774759b201f mesa: Indent break statements and add a missing one.
|
||||
|
||||
# http://lists.freedesktop.org/archives/mesa-dev/2015-March/078502.html
|
||||
87109acbed9c9b52f33d58ca06d9048d0ac7a215 mesa: Free memory allocated for luminance in readpixels.
|
||||
|
@@ -30,7 +30,9 @@ because compatibility contexts are not supported.
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
TBD
|
||||
e12bbdaee9a758617e8ebd0bb0e987f72addd11db2e4da25ba695e386cd63843 MesaLib-10.4.5.tar.gz
|
||||
bf60000700a9d58e3aca2bfeee7e781053b0d839e61a95b1883e05a2dee247a0 MesaLib-10.4.5.tar.bz2
|
||||
3b926de8eee500bb67cf85332c51292f826cc539b8636382aadbb8e70c76527a MesaLib-10.4.5.zip
|
||||
</pre>
|
||||
|
||||
<h2>New features</h2>
|
||||
|
143
docs/relnotes/10.4.6.html
Normal file
143
docs/relnotes/10.4.6.html
Normal file
@@ -0,0 +1,143 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.4.6 Release Notes / March 06, 2015</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.4.6 is a bug fix release which fixes bugs found since the 10.4.5 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.4.6 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
46c9082142e811c01e49a2c332a9ac0a1eb98f2908985fb9df216539d7eaeaf4 MesaLib-10.4.6.tar.gz
|
||||
d8baedd20e79ccd98a5a7b05e23d59a30892e68de1fcc057ca6873dafca02735 MesaLib-10.4.6.tar.bz2
|
||||
6aded6eac7f0d4d55117b8b581d8424710bbb4c768fc90f7b881f29311a751aa MesaLib-10.4.6.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=45348">Bug 45348</a> - [swrast] piglit fbo-drawbuffers-arbfp regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=84613">Bug 84613</a> - [G965, bisected] piglit regressions : glslparsertest.glsl2</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=87516">Bug 87516</a> - glProgramBinary violates spec</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=88885">Bug 88885</a> - Transform feedback uses incorrect interleaving if a previous draw did not write gl_Position</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89180">Bug 89180</a> - [IVB regression] Rendering issues in Mass Effect through VMware Workstation</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Abdiel Janulgue (2):</p>
|
||||
<ul>
|
||||
<li>glsl: Don't optimize min/max into saturate when EmitNoSat is set</li>
|
||||
<li>st/mesa: For vertex shaders, don't emit saturate when SM 3.0 is unsupported</li>
|
||||
</ul>
|
||||
|
||||
<p>Andreas Boll (1):</p>
|
||||
<ul>
|
||||
<li>glx: Fix returned values of GLX_RENDERER_PREFERRED_PROFILE_MESA</li>
|
||||
</ul>
|
||||
|
||||
<p>Brian Paul (2):</p>
|
||||
<ul>
|
||||
<li>swrast: fix multiple color buffer writing</li>
|
||||
<li>st/mesa: fix sampler view reference counting bug in glDraw/CopyPixels</li>
|
||||
</ul>
|
||||
|
||||
<p>Chris Forbes (1):</p>
|
||||
<ul>
|
||||
<li>i965/gs: Check newly-generated GS-out VUE map against correct stage</li>
|
||||
</ul>
|
||||
|
||||
<p>Eduardo Lima Mitev (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Fix error validating args for TexSubImage3D</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (6):</p>
|
||||
<ul>
|
||||
<li>docs: Add sha256 sums for the 10.4.5 release</li>
|
||||
<li>install-lib-links: remove the .install-lib-links file</li>
|
||||
<li>Revert "mesa: Correct backwards NULL check."</li>
|
||||
<li>mesa: cherry-pick the second half of commit 2aa71e9485a</li>
|
||||
<li>Revert "gallivm: Update for RTDyldMemoryManager becoming an unique_ptr."</li>
|
||||
<li>Update version to 10.4.6</li>
|
||||
</ul>
|
||||
|
||||
<p>Ian Romanick (3):</p>
|
||||
<ul>
|
||||
<li>mesa: Add missing error checks in _mesa_ProgramBinary</li>
|
||||
<li>mesa: Ensure that length is set to zero in _mesa_GetProgramBinary</li>
|
||||
<li>mesa: Always generate GL_INVALID_OPERATION in _mesa_GetProgramBinary</li>
|
||||
</ul>
|
||||
|
||||
<p>Jonathan Gray (1):</p>
|
||||
<ul>
|
||||
<li>auxilary/os: correct sysctl use in os_get_total_physical_memory()</li>
|
||||
</ul>
|
||||
|
||||
<p>José Fonseca (1):</p>
|
||||
<ul>
|
||||
<li>gallivm: Update for RTDyldMemoryManager becoming an unique_ptr.</li>
|
||||
</ul>
|
||||
|
||||
<p>Leo Liu (1):</p>
|
||||
<ul>
|
||||
<li>st/omx/dec/h264: fix picture out-of-order with poc type 0 v2</li>
|
||||
</ul>
|
||||
|
||||
<p>Lucas Stach (1):</p>
|
||||
<ul>
|
||||
<li>install-lib-links: don't depend on .libs directory</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (2):</p>
|
||||
<ul>
|
||||
<li>vbo: fix an unitialized-variable warning</li>
|
||||
<li>radeonsi: fix point sprites</li>
|
||||
</ul>
|
||||
|
||||
<p>Matt Turner (4):</p>
|
||||
<ul>
|
||||
<li>glsl: Rewrite and fix min/max to saturate optimization.</li>
|
||||
<li>mesa: Correct backwards NULL check.</li>
|
||||
<li>i965/fs: Don't use backend_visitor::instructions after creating the CFG.</li>
|
||||
<li>mesa: Correct backwards NULL check.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
134
docs/relnotes/10.4.7.html
Normal file
134
docs/relnotes/10.4.7.html
Normal file
@@ -0,0 +1,134 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Mesa Release Notes</title>
|
||||
<link rel="stylesheet" type="text/css" href="../mesa.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="header">
|
||||
<h1>The Mesa 3D Graphics Library</h1>
|
||||
</div>
|
||||
|
||||
<iframe src="../contents.html"></iframe>
|
||||
<div class="content">
|
||||
|
||||
<h1>Mesa 10.4.7 Release Notes / March 20, 2015</h1>
|
||||
|
||||
<p>
|
||||
Mesa 10.4.7 is a bug fix release which fixes bugs found since the 10.4.6 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 10.4.7 implements the OpenGL 3.3 API, but the version reported by
|
||||
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
|
||||
glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
|
||||
Some drivers don't support all the features required in OpenGL 3.3. OpenGL
|
||||
3.3 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
9e7b59267199658808f8b33e0410b86fbafbdcd52378658b9df65fac9d24947f MesaLib-10.4.7.tar.gz
|
||||
2c351c98671f9a7ab3fd9c601bb7a255801b1580f5dd0992639f99152801b0d2 MesaLib-10.4.7.tar.bz2
|
||||
d14ac578b5ce16560757b53fbd1cb4d6b34652f8e110e4b10a019adc82e67ffd MesaLib-10.4.7.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=79202">Bug 79202</a> - valgrind errors in glsl-fs-uniform-array-loop-unroll.shader_test; random code generation</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89156">Bug 89156</a> - r300g: GL_COMPRESSED_RED_RGTC1 / ATI1N support broken</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89224">Bug 89224</a> - Incorrect rendering of Unigine Valley running in VM on VMware Workstation</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=89530">Bug 89530</a> - FTBFS in loader: missing fstat</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Andrey Sudnik (1):</p>
|
||||
<ul>
|
||||
<li>i965/vec4: Don't lose the saturate modifier in copy propagation.</li>
|
||||
</ul>
|
||||
|
||||
<p>Daniel Stone (1):</p>
|
||||
<ul>
|
||||
<li>egl: Take alpha bits into account when selecting GBM formats</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (6):</p>
|
||||
<ul>
|
||||
<li>docs: Add sha256 sums for the 10.4.6 release</li>
|
||||
<li>cherry-ignore: add not applicable/rejected commits</li>
|
||||
<li>mesa: rename format_info.c to format_info.h</li>
|
||||
<li>loader: include <sys/stat.h> for non-sysfs builds</li>
|
||||
<li>auxiliary/os: fix the android build - s/drm_munmap/os_munmap/</li>
|
||||
<li>Update version to 10.4.7</li>
|
||||
</ul>
|
||||
|
||||
<p>Iago Toral Quiroga (1):</p>
|
||||
<ul>
|
||||
<li>i965: Fix out-of-bounds accesses into pull_constant_loc array</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (4):</p>
|
||||
<ul>
|
||||
<li>freedreno: move fb state copy after checking for size change</li>
|
||||
<li>freedreno/ir3: fix array count returned by TXQ</li>
|
||||
<li>freedreno/ir3: get the # of miplevels from getinfo</li>
|
||||
<li>freedreno: fix slice pitch calculations</li>
|
||||
</ul>
|
||||
|
||||
<p>Marc-Andre Lureau (1):</p>
|
||||
<ul>
|
||||
<li>gallium/auxiliary/indices: fix start param</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (4):</p>
|
||||
<ul>
|
||||
<li>r300g: fix RGTC1 and LATC1 SNORM formats</li>
|
||||
<li>r300g: fix a crash when resolving into an sRGB texture</li>
|
||||
<li>r300g: fix sRGB->sRGB blits</li>
|
||||
<li>radeonsi: increase coords array size for radeon_llvm_emit_prepare_cube_coords</li>
|
||||
</ul>
|
||||
|
||||
<p>Mario Kleiner (1):</p>
|
||||
<ul>
|
||||
<li>glx: Handle out-of-sequence swap completion events correctly. (v2)</li>
|
||||
</ul>
|
||||
|
||||
<p>Matt Turner (2):</p>
|
||||
<ul>
|
||||
<li>r300g: Use PATH_MAX instead of limiting ourselves to 100 chars.</li>
|
||||
<li>r300g: Check return value of snprintf().</li>
|
||||
</ul>
|
||||
|
||||
<p>Rob Clark (2):</p>
|
||||
<ul>
|
||||
<li>freedreno/ir3: fix silly typo for binning pass shaders</li>
|
||||
<li>freedreno: update generated headers</li>
|
||||
</ul>
|
||||
|
||||
<p>Samuel Iglesias Gonsalvez (1):</p>
|
||||
<ul>
|
||||
<li>glsl: optimize (0 cmp x + y) into (-x cmp y).</li>
|
||||
</ul>
|
||||
|
||||
<p>Stefan Dösinger (1):</p>
|
||||
<ul>
|
||||
<li>r300g: Fix the ATI1N swizzle (RGTC1 and LATC1)</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -3,9 +3,9 @@
|
||||
|
||||
if BUILD_SHARED
|
||||
if HAVE_COMPAT_SYMLINKS
|
||||
all-local : .libs/install-mesa-links
|
||||
all-local : .install-mesa-links
|
||||
|
||||
.libs/install-mesa-links : $(lib_LTLIBRARIES)
|
||||
.install-mesa-links : $(lib_LTLIBRARIES)
|
||||
$(AM_V_GEN)$(MKDIR_P) $(top_builddir)/$(LIB_DIR); \
|
||||
for f in $(join $(addsuffix .libs/,$(dir $(lib_LTLIBRARIES))),$(notdir $(lib_LTLIBRARIES:%.la=%.$(LIB_EXT)*))); do \
|
||||
if test -h .libs/$$f; then \
|
||||
@@ -14,5 +14,9 @@ all-local : .libs/install-mesa-links
|
||||
ln -f $$f $(top_builddir)/$(LIB_DIR); \
|
||||
fi; \
|
||||
done && touch $@
|
||||
|
||||
clean-local:
|
||||
$(RM) .install-mesa-links
|
||||
|
||||
endif
|
||||
endif
|
||||
|
@@ -668,15 +668,21 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
|
||||
|
||||
for (i = 0; dri2_dpy->driver_configs[i]; i++) {
|
||||
EGLint format, attr_list[3];
|
||||
unsigned int mask;
|
||||
unsigned int red, alpha;
|
||||
|
||||
dri2_dpy->core->getConfigAttrib(dri2_dpy->driver_configs[i],
|
||||
__DRI_ATTRIB_RED_MASK, &mask);
|
||||
if (mask == 0x3ff00000)
|
||||
__DRI_ATTRIB_RED_MASK, &red);
|
||||
dri2_dpy->core->getConfigAttrib(dri2_dpy->driver_configs[i],
|
||||
__DRI_ATTRIB_ALPHA_MASK, &alpha);
|
||||
if (red == 0x3ff00000 && alpha == 0x00000000)
|
||||
format = GBM_FORMAT_XRGB2101010;
|
||||
else if (mask == 0x00ff0000)
|
||||
else if (red == 0x3ff00000 && alpha == 0xc0000000)
|
||||
format = GBM_FORMAT_ARGB2101010;
|
||||
else if (red == 0x00ff0000 && alpha == 0x00000000)
|
||||
format = GBM_FORMAT_XRGB8888;
|
||||
else if (mask == 0xf800)
|
||||
else if (red == 0x00ff0000 && alpha == 0xff000000)
|
||||
format = GBM_FORMAT_ARGB8888;
|
||||
else if (red == 0xf800)
|
||||
format = GBM_FORMAT_RGB565;
|
||||
else
|
||||
continue;
|
||||
|
@@ -193,7 +193,7 @@ def lineloop(intype, outtype, inpv, outpv):
|
||||
print ' for (i = start, j = 0; j < nr - 2; j+=2, i++) { '
|
||||
do_line( intype, outtype, 'out+j', 'i', 'i+1', inpv, outpv );
|
||||
print ' }'
|
||||
do_line( intype, outtype, 'out+j', 'i', '0', inpv, outpv );
|
||||
do_line( intype, outtype, 'out+j', 'i', 'start', inpv, outpv );
|
||||
postamble()
|
||||
|
||||
def tris(intype, outtype, inpv, outpv):
|
||||
@@ -218,7 +218,7 @@ def tristrip(intype, outtype, inpv, outpv):
|
||||
def trifan(intype, outtype, inpv, outpv):
|
||||
preamble(intype, outtype, inpv, outpv, prim='trifan')
|
||||
print ' for (i = start, j = 0; j < nr; j+=3, i++) { '
|
||||
do_tri( intype, outtype, 'out+j', '0', 'i+1', 'i+2', inpv, outpv );
|
||||
do_tri( intype, outtype, 'out+j', 'start', 'i+1', 'i+2', inpv, outpv );
|
||||
print ' }'
|
||||
postamble()
|
||||
|
||||
@@ -228,9 +228,9 @@ def polygon(intype, outtype, inpv, outpv):
|
||||
preamble(intype, outtype, inpv, outpv, prim='polygon')
|
||||
print ' for (i = start, j = 0; j < nr; j+=3, i++) { '
|
||||
if inpv == FIRST:
|
||||
do_tri( intype, outtype, 'out+j', '0', 'i+1', 'i+2', inpv, outpv );
|
||||
do_tri( intype, outtype, 'out+j', 'start', 'i+1', 'i+2', inpv, outpv );
|
||||
else:
|
||||
do_tri( intype, outtype, 'out+j', 'i+1', 'i+2', '0', inpv, outpv );
|
||||
do_tri( intype, outtype, 'out+j', 'i+1', 'i+2', 'start', inpv, outpv );
|
||||
print ' }'
|
||||
postamble()
|
||||
|
||||
|
@@ -118,7 +118,7 @@ os_get_total_physical_memory(uint64_t *size)
|
||||
*size = phys_pages * page_size;
|
||||
return (phys_pages > 0 && page_size > 0);
|
||||
#elif defined(PIPE_OS_APPLE) || defined(PIPE_OS_BSD)
|
||||
size_t len = sizeof(size);
|
||||
size_t len = sizeof(*size);
|
||||
int mib[2];
|
||||
|
||||
mib[0] = CTL_HW;
|
||||
@@ -134,7 +134,7 @@ os_get_total_physical_memory(uint64_t *size)
|
||||
#error Unsupported *BSD
|
||||
#endif
|
||||
|
||||
return (sysctl(mib, 2, &size, &len, NULL, 0) == 0);
|
||||
return (sysctl(mib, 2, size, &len, NULL, 0) == 0);
|
||||
#elif defined(PIPE_OS_HAIKU)
|
||||
system_info info;
|
||||
status_t ret;
|
||||
|
@@ -70,8 +70,8 @@ static INLINE void *os_mmap(void *addr, size_t length, int prot, int flags,
|
||||
return __mmap2(addr, length, prot, flags, fd, (size_t) (offset >> 12));
|
||||
}
|
||||
|
||||
# define drm_munmap(addr, length) \
|
||||
munmap(addr, length)
|
||||
# define os_munmap(addr, length) \
|
||||
munmap(addr, length)
|
||||
|
||||
#else
|
||||
/* assume large file support exists */
|
||||
|
@@ -13,7 +13,7 @@ The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2014-06-02 15:21:30)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10347 bytes, from 2014-10-01 18:55:57)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 14960 bytes, from 2014-07-27 17:22:13)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 60533 bytes, from 2014-10-15 18:32:43)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 64771 bytes, from 2015-03-15 21:55:57)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 41068 bytes, from 2014-08-01 12:22:48)
|
||||
|
||||
Copyright (C) 2013-2014 by the following authors:
|
||||
|
@@ -13,7 +13,7 @@ The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2014-06-02 15:21:30)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10347 bytes, from 2014-10-01 18:55:57)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 14960 bytes, from 2014-07-27 17:22:13)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 60533 bytes, from 2014-10-15 18:32:43)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 64771 bytes, from 2015-03-15 21:55:57)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 41068 bytes, from 2014-08-01 12:22:48)
|
||||
|
||||
Copyright (C) 2013-2014 by the following authors:
|
||||
@@ -2572,7 +2572,7 @@ static inline uint32_t A3XX_TEX_CONST_2_SWAP(enum a3xx_color_swap val)
|
||||
}
|
||||
|
||||
#define REG_A3XX_TEX_CONST_3 0x00000003
|
||||
#define A3XX_TEX_CONST_3_LAYERSZ1__MASK 0x0000000f
|
||||
#define A3XX_TEX_CONST_3_LAYERSZ1__MASK 0x00001fff
|
||||
#define A3XX_TEX_CONST_3_LAYERSZ1__SHIFT 0
|
||||
static inline uint32_t A3XX_TEX_CONST_3_LAYERSZ1(uint32_t val)
|
||||
{
|
||||
|
@@ -13,7 +13,7 @@ The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2014-06-02 15:21:30)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10347 bytes, from 2014-10-01 18:55:57)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 14960 bytes, from 2014-07-27 17:22:13)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 60533 bytes, from 2014-10-15 18:32:43)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 64771 bytes, from 2015-03-15 21:55:57)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 41068 bytes, from 2014-08-01 12:22:48)
|
||||
|
||||
Copyright (C) 2013-2014 by the following authors:
|
||||
|
@@ -13,7 +13,7 @@ The rules-ng-ng source files this header was generated from are:
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a2xx.xml ( 32901 bytes, from 2014-06-02 15:21:30)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_common.xml ( 10347 bytes, from 2014-10-01 18:55:57)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/adreno_pm4.xml ( 14960 bytes, from 2014-07-27 17:22:13)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 60533 bytes, from 2014-10-15 18:32:43)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a3xx.xml ( 64771 bytes, from 2015-03-15 21:55:57)
|
||||
- /home/robclark/src/freedreno/envytools/rnndb/adreno/a4xx.xml ( 41068 bytes, from 2014-08-01 12:22:48)
|
||||
|
||||
Copyright (C) 2013-2014 by the following authors:
|
||||
|
@@ -199,7 +199,7 @@ setup_slices(struct fd_resource *rsc)
|
||||
for (level = 0; level <= prsc->last_level; level++) {
|
||||
struct fd_resource_slice *slice = fd_resource_slice(rsc, level);
|
||||
|
||||
slice->pitch = align(width, 32);
|
||||
slice->pitch = width = align(width, 32);
|
||||
slice->offset = size;
|
||||
slice->size0 = slice->pitch * height * rsc->cpp;
|
||||
|
||||
|
@@ -123,12 +123,12 @@ fd_set_framebuffer_state(struct pipe_context *pctx,
|
||||
|
||||
fd_context_render(pctx);
|
||||
|
||||
util_copy_framebuffer_state(cso, framebuffer);
|
||||
|
||||
if ((cso->width != framebuffer->width) ||
|
||||
(cso->height != framebuffer->height))
|
||||
ctx->needs_rb_fbd = true;
|
||||
|
||||
util_copy_framebuffer_state(cso, framebuffer);
|
||||
|
||||
ctx->dirty |= FD_DIRTY_FRAMEBUFFER;
|
||||
|
||||
ctx->disabled_scissor.minx = 0;
|
||||
|
@@ -1421,6 +1421,7 @@ trans_txq(const struct instr_translater *t,
|
||||
struct tgsi_dst_register *dst = &inst->Dst[0].Register;
|
||||
struct tgsi_src_register *level = &inst->Src[0].Register;
|
||||
struct tgsi_src_register *samp = &inst->Src[1].Register;
|
||||
const struct target_info *tgt = &tex_targets[inst->Texture.Texture];
|
||||
struct tex_info tinf;
|
||||
|
||||
memset(&tinf, 0, sizeof(tinf));
|
||||
@@ -1434,8 +1435,67 @@ trans_txq(const struct instr_translater *t,
|
||||
instr->cat5.tex = samp->Index;
|
||||
instr->flags |= tinf.flags;
|
||||
|
||||
add_dst_reg_wrmask(ctx, instr, dst, 0, dst->WriteMask);
|
||||
add_src_reg_wrmask(ctx, instr, level, level->SwizzleX, 0x1);
|
||||
if (tgt->array && (dst->WriteMask & (1 << tgt->dims))) {
|
||||
/* Array size actually ends up in .w rather than .z. This doesn't
|
||||
* matter for miplevel 0, but for higher mips the value in z is
|
||||
* minified whereas w stays. Also, the value in TEX_CONST_3_DEPTH is
|
||||
* returned, which means that we have to add 1 to it for arrays.
|
||||
*/
|
||||
struct tgsi_dst_register tmp_dst;
|
||||
struct tgsi_src_register *tmp_src;
|
||||
type_t type_mov = get_utype(ctx);
|
||||
|
||||
tmp_src = get_internal_temp(ctx, &tmp_dst);
|
||||
add_dst_reg_wrmask(ctx, instr, &tmp_dst, 0,
|
||||
dst->WriteMask | TGSI_WRITEMASK_W);
|
||||
add_src_reg_wrmask(ctx, instr, level, level->SwizzleX, 0x1);
|
||||
|
||||
if (dst->WriteMask & TGSI_WRITEMASK_X) {
|
||||
instr = instr_create(ctx, 1, 0);
|
||||
instr->cat1.src_type = type_mov;
|
||||
instr->cat1.dst_type = type_mov;
|
||||
add_dst_reg(ctx, instr, dst, 0);
|
||||
add_src_reg(ctx, instr, tmp_src, src_swiz(tmp_src, 0));
|
||||
}
|
||||
|
||||
if (tgt->dims == 2) {
|
||||
if (dst->WriteMask & TGSI_WRITEMASK_Y) {
|
||||
instr = instr_create(ctx, 1, 0);
|
||||
instr->cat1.src_type = type_mov;
|
||||
instr->cat1.dst_type = type_mov;
|
||||
add_dst_reg(ctx, instr, dst, 1);
|
||||
add_src_reg(ctx, instr, tmp_src, src_swiz(tmp_src, 1));
|
||||
}
|
||||
}
|
||||
|
||||
instr = instr_create(ctx, 2, OPC_ADD_U);
|
||||
add_dst_reg(ctx, instr, dst, tgt->dims);
|
||||
add_src_reg(ctx, instr, tmp_src, src_swiz(tmp_src, 3));
|
||||
ir3_reg_create(instr, 0, IR3_REG_IMMED)->iim_val = 1;
|
||||
} else {
|
||||
add_dst_reg_wrmask(ctx, instr, dst, 0, dst->WriteMask);
|
||||
add_src_reg_wrmask(ctx, instr, level, level->SwizzleX, 0x1);
|
||||
}
|
||||
|
||||
if (dst->WriteMask & TGSI_WRITEMASK_W) {
|
||||
/* The # of levels comes from getinfo.z. We need to add 1 to it, since
|
||||
* the value in TEX_CONST_0 is zero-based.
|
||||
*/
|
||||
struct tgsi_dst_register tmp_dst;
|
||||
struct tgsi_src_register *tmp_src;
|
||||
|
||||
tmp_src = get_internal_temp(ctx, &tmp_dst);
|
||||
instr = instr_create(ctx, 5, OPC_GETINFO);
|
||||
instr->cat5.type = get_utype(ctx);
|
||||
instr->cat5.samp = samp->Index;
|
||||
instr->cat5.tex = samp->Index;
|
||||
add_dst_reg_wrmask(ctx, instr, &tmp_dst, 0, TGSI_WRITEMASK_Z);
|
||||
|
||||
instr = instr_create(ctx, 2, OPC_ADD_U);
|
||||
add_dst_reg(ctx, instr, dst, 3);
|
||||
add_src_reg(ctx, instr, tmp_src, src_swiz(tmp_src, 2));
|
||||
ir3_reg_create(instr, 0, IR3_REG_IMMED)->iim_val = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* DDX/DDY */
|
||||
@@ -3094,7 +3154,7 @@ ir3_compile_shader(struct ir3_shader_variant *so,
|
||||
if (key.binning_pass) {
|
||||
for (i = 0, j = 0; i < so->outputs_count; i++) {
|
||||
unsigned name = sem2name(so->outputs[i].semantic);
|
||||
unsigned idx = sem2name(so->outputs[i].semantic);
|
||||
unsigned idx = sem2idx(so->outputs[i].semantic);
|
||||
|
||||
/* throw away everything but first position/psize */
|
||||
if ((idx == 0) && ((name == TGSI_SEMANTIC_POSITION) ||
|
||||
|
@@ -28,6 +28,7 @@
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <regex.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -528,7 +529,6 @@ void init_compiler(
|
||||
}
|
||||
|
||||
#define MAX_LINE_LENGTH 100
|
||||
#define MAX_PATH_LENGTH 100
|
||||
|
||||
unsigned load_program(
|
||||
struct radeon_compiler *c,
|
||||
@@ -536,14 +536,19 @@ unsigned load_program(
|
||||
const char *filename)
|
||||
{
|
||||
char line[MAX_LINE_LENGTH];
|
||||
char path[MAX_PATH_LENGTH];
|
||||
char path[PATH_MAX];
|
||||
FILE *file;
|
||||
unsigned *count;
|
||||
char **string_store;
|
||||
unsigned i = 0;
|
||||
int n;
|
||||
|
||||
memset(line, 0, sizeof(line));
|
||||
snprintf(path, MAX_PATH_LENGTH, TEST_PATH "/%s", filename);
|
||||
n = snprintf(path, PATH_MAX, TEST_PATH "/%s", filename);
|
||||
if (n < 0 || n >= PATH_MAX) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
file = fopen(path, "r");
|
||||
if (!file) {
|
||||
return 0;
|
||||
|
@@ -803,6 +803,15 @@ static void r300_blit(struct pipe_context *pipe,
|
||||
(struct pipe_framebuffer_state*)r300->fb_state.state;
|
||||
struct pipe_blit_info info = *blit;
|
||||
|
||||
/* The driver supports sRGB textures but not framebuffers. Blitting
|
||||
* from sRGB to sRGB should be the same as blitting from linear
|
||||
* to linear, so use that, This avoids incorrect linearization.
|
||||
*/
|
||||
if (util_format_is_srgb(info.src.format)) {
|
||||
info.src.format = util_format_linear(info.src.format);
|
||||
info.dst.format = util_format_linear(info.dst.format);
|
||||
}
|
||||
|
||||
/* MSAA resolve. */
|
||||
if (info.src.resource->nr_samples > 1 &&
|
||||
!util_format_is_depth_or_stencil(info.src.resource->format)) {
|
||||
|
@@ -170,24 +170,10 @@ static void get_external_state(
|
||||
}
|
||||
|
||||
state->unit[i].non_normalized_coords = !s->state.normalized_coords;
|
||||
state->unit[i].convert_unorm_to_snorm =
|
||||
v->base.format == PIPE_FORMAT_RGTC1_SNORM ||
|
||||
v->base.format == PIPE_FORMAT_LATC1_SNORM;
|
||||
state->unit[i].convert_unorm_to_snorm = 0;
|
||||
|
||||
/* Pass texture swizzling to the compiler, some lowering passes need it. */
|
||||
if (v->base.format == PIPE_FORMAT_RGTC1_SNORM ||
|
||||
v->base.format == PIPE_FORMAT_LATC1_SNORM) {
|
||||
unsigned char swizzle[4];
|
||||
|
||||
util_format_compose_swizzles(
|
||||
util_format_description(v->base.format)->swizzle,
|
||||
v->swizzle,
|
||||
swizzle);
|
||||
|
||||
state->unit[i].texture_swizzle =
|
||||
RC_MAKE_SWIZZLE(swizzle[0], swizzle[1],
|
||||
swizzle[2], swizzle[3]);
|
||||
} else if (state->unit[i].compare_mode_enabled) {
|
||||
if (state->unit[i].compare_mode_enabled) {
|
||||
state->unit[i].texture_swizzle =
|
||||
RC_MAKE_SWIZZLE(v->swizzle[0], v->swizzle[1],
|
||||
v->swizzle[2], v->swizzle[3]);
|
||||
|
@@ -169,20 +169,21 @@ uint32_t r300_translate_texformat(enum pipe_format format,
|
||||
|
||||
/* Add swizzling. */
|
||||
/* The RGTC1_SNORM and LATC1_SNORM swizzle is done in the shader. */
|
||||
if (format != PIPE_FORMAT_RGTC1_SNORM &&
|
||||
if (util_format_is_compressed(format) &&
|
||||
dxtc_swizzle &&
|
||||
format != PIPE_FORMAT_RGTC2_UNORM &&
|
||||
format != PIPE_FORMAT_RGTC2_SNORM &&
|
||||
format != PIPE_FORMAT_LATC2_UNORM &&
|
||||
format != PIPE_FORMAT_LATC2_SNORM &&
|
||||
format != PIPE_FORMAT_RGTC1_UNORM &&
|
||||
format != PIPE_FORMAT_RGTC1_SNORM &&
|
||||
format != PIPE_FORMAT_LATC1_UNORM &&
|
||||
format != PIPE_FORMAT_LATC1_SNORM) {
|
||||
if (util_format_is_compressed(format) &&
|
||||
dxtc_swizzle &&
|
||||
format != PIPE_FORMAT_RGTC2_UNORM &&
|
||||
format != PIPE_FORMAT_RGTC2_SNORM &&
|
||||
format != PIPE_FORMAT_LATC2_UNORM &&
|
||||
format != PIPE_FORMAT_LATC2_SNORM) {
|
||||
result |= r300_get_swizzle_combined(desc->swizzle, swizzle_view,
|
||||
TRUE);
|
||||
} else {
|
||||
result |= r300_get_swizzle_combined(desc->swizzle, swizzle_view,
|
||||
FALSE);
|
||||
}
|
||||
result |= r300_get_swizzle_combined(desc->swizzle, swizzle_view,
|
||||
TRUE);
|
||||
} else {
|
||||
result |= r300_get_swizzle_combined(desc->swizzle, swizzle_view,
|
||||
FALSE);
|
||||
}
|
||||
|
||||
/* S3TC formats. */
|
||||
@@ -213,6 +214,7 @@ uint32_t r300_translate_texformat(enum pipe_format format,
|
||||
switch (format) {
|
||||
case PIPE_FORMAT_RGTC1_SNORM:
|
||||
case PIPE_FORMAT_LATC1_SNORM:
|
||||
result |= sign_bit[0];
|
||||
case PIPE_FORMAT_LATC1_UNORM:
|
||||
case PIPE_FORMAT_RGTC1_UNORM:
|
||||
return R500_TX_FORMAT_ATI1N | result;
|
||||
@@ -936,14 +938,16 @@ static void r300_texture_setup_fb_state(struct r300_surface *surf)
|
||||
surf->pitch_zmask = tex->tex.zmask_stride_in_pixels[level];
|
||||
surf->pitch_hiz = tex->tex.hiz_stride_in_pixels[level];
|
||||
} else {
|
||||
enum pipe_format format = util_format_linear(surf->base.format);
|
||||
|
||||
surf->pitch =
|
||||
stride |
|
||||
r300_translate_colorformat(surf->base.format) |
|
||||
r300_translate_colorformat(format) |
|
||||
R300_COLOR_TILE(tex->tex.macrotile[level]) |
|
||||
R300_COLOR_MICROTILE(tex->tex.microtile);
|
||||
surf->format = r300_translate_out_fmt(surf->base.format);
|
||||
surf->format = r300_translate_out_fmt(format);
|
||||
surf->colormask_swizzle =
|
||||
r300_translate_colormask_swizzle(surf->base.format);
|
||||
r300_translate_colormask_swizzle(format);
|
||||
surf->pitch_cmask = tex->tex.cmask_stride_in_pixels;
|
||||
}
|
||||
}
|
||||
|
@@ -748,7 +748,7 @@ static void txp_fetch_args(
|
||||
const struct tgsi_full_instruction * inst = emit_data->inst;
|
||||
LLVMValueRef src_w;
|
||||
unsigned chan;
|
||||
LLVMValueRef coords[4];
|
||||
LLVMValueRef coords[5];
|
||||
|
||||
emit_data->dst_type = LLVMVectorType(bld_base->base.elem_type, 4);
|
||||
src_w = lp_build_emit_fetch(bld_base, emit_data->inst, 0, TGSI_CHAN_W);
|
||||
|
@@ -1505,7 +1505,7 @@ static void tex_fetch_args(
|
||||
const struct tgsi_full_instruction * inst = emit_data->inst;
|
||||
unsigned opcode = inst->Instruction.Opcode;
|
||||
unsigned target = inst->Texture.Texture;
|
||||
LLVMValueRef coords[4];
|
||||
LLVMValueRef coords[5];
|
||||
LLVMValueRef address[16];
|
||||
int ref_pos;
|
||||
unsigned num_coords = tgsi_util_get_texture_coord_dim(target, &ref_pos);
|
||||
|
@@ -544,7 +544,7 @@ bcolor:
|
||||
}
|
||||
}
|
||||
|
||||
if (j == vsinfo->num_outputs) {
|
||||
if (j == vsinfo->num_outputs && !G_028644_PT_SPRITE_TEX(tmp)) {
|
||||
/* No corresponding output found, load defaults into input.
|
||||
* Don't set any other bits.
|
||||
* (FLAT_SHADE=1 completely changes behavior) */
|
||||
|
@@ -706,6 +706,11 @@ static void slice_header(vid_dec_PrivateType *priv, struct vl_rbsp *rbsp,
|
||||
if (pic_order_cnt_lsb != priv->codec_data.h264.pic_order_cnt_lsb)
|
||||
vid_dec_h264_EndFrame(priv);
|
||||
|
||||
if (IdrPicFlag) {
|
||||
priv->codec_data.h264.pic_order_cnt_msb = 0;
|
||||
priv->codec_data.h264.pic_order_cnt_lsb = 0;
|
||||
}
|
||||
|
||||
if ((pic_order_cnt_lsb < priv->codec_data.h264.pic_order_cnt_lsb) &&
|
||||
(priv->codec_data.h264.pic_order_cnt_lsb - pic_order_cnt_lsb) >= (max_pic_order_cnt_lsb / 2))
|
||||
pic_order_cnt_msb = priv->codec_data.h264.pic_order_cnt_msb + max_pic_order_cnt_lsb;
|
||||
|
@@ -578,9 +578,18 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir)
|
||||
if (!is_vec_zero(zero))
|
||||
continue;
|
||||
|
||||
return new(mem_ctx) ir_expression(ir->operation,
|
||||
add->operands[0],
|
||||
neg(add->operands[1]));
|
||||
/* Depending of the zero position we want to optimize
|
||||
* (0 cmp x+y) into (-x cmp y) or (x+y cmp 0) into (x cmp -y)
|
||||
*/
|
||||
if (add_pos == 1) {
|
||||
return new(mem_ctx) ir_expression(ir->operation,
|
||||
neg(add->operands[0]),
|
||||
add->operands[1]);
|
||||
} else {
|
||||
return new(mem_ctx) ir_expression(ir->operation,
|
||||
add->operands[0],
|
||||
neg(add->operands[1]));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -679,55 +688,72 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir)
|
||||
|
||||
case ir_binop_min:
|
||||
case ir_binop_max:
|
||||
if (ir->type->base_type != GLSL_TYPE_FLOAT)
|
||||
if (ir->type->base_type != GLSL_TYPE_FLOAT || options->EmitNoSat)
|
||||
break;
|
||||
|
||||
/* Replace min(max) operations and its commutative combinations with
|
||||
* a saturate operation
|
||||
*/
|
||||
for (int op = 0; op < 2; op++) {
|
||||
ir_expression *minmax = op_expr[op];
|
||||
ir_expression *inner_expr = op_expr[op];
|
||||
ir_constant *outer_const = op_const[1 - op];
|
||||
ir_expression_operation op_cond = (ir->operation == ir_binop_max) ?
|
||||
ir_binop_min : ir_binop_max;
|
||||
|
||||
if (!minmax || !outer_const || (minmax->operation != op_cond))
|
||||
if (!inner_expr || !outer_const || (inner_expr->operation != op_cond))
|
||||
continue;
|
||||
|
||||
/* One of these has to be a constant */
|
||||
if (!inner_expr->operands[0]->as_constant() &&
|
||||
!inner_expr->operands[1]->as_constant())
|
||||
break;
|
||||
|
||||
/* Found a min(max) combination. Now try to see if its operands
|
||||
* meet our conditions that we can do just a single saturate operation
|
||||
*/
|
||||
for (int minmax_op = 0; minmax_op < 2; minmax_op++) {
|
||||
ir_rvalue *inner_val_a = minmax->operands[minmax_op];
|
||||
ir_rvalue *inner_val_b = minmax->operands[1 - minmax_op];
|
||||
ir_rvalue *x = inner_expr->operands[minmax_op];
|
||||
ir_rvalue *y = inner_expr->operands[1 - minmax_op];
|
||||
|
||||
if (!inner_val_a || !inner_val_b)
|
||||
ir_constant *inner_const = y->as_constant();
|
||||
if (!inner_const)
|
||||
continue;
|
||||
|
||||
/* Found a {min|max} ({max|min} (x, 0.0), 1.0) operation and its variations */
|
||||
if ((outer_const->is_one() && inner_val_a->is_zero()) ||
|
||||
(inner_val_a->is_one() && outer_const->is_zero()))
|
||||
return saturate(inner_val_b);
|
||||
/* min(max(x, 0.0), 1.0) is sat(x) */
|
||||
if (ir->operation == ir_binop_min &&
|
||||
inner_const->is_zero() &&
|
||||
outer_const->is_one())
|
||||
return saturate(x);
|
||||
|
||||
/* Found a {min|max} ({max|min} (x, 0.0), b) where b < 1.0
|
||||
* and its variations
|
||||
*/
|
||||
if (is_less_than_one(outer_const) && inner_val_b->is_zero())
|
||||
return expr(ir_binop_min, saturate(inner_val_a), outer_const);
|
||||
/* max(min(x, 1.0), 0.0) is sat(x) */
|
||||
if (ir->operation == ir_binop_max &&
|
||||
inner_const->is_one() &&
|
||||
outer_const->is_zero())
|
||||
return saturate(x);
|
||||
|
||||
if (!inner_val_b->as_constant())
|
||||
continue;
|
||||
/* min(max(x, 0.0), b) where b < 1.0 is sat(min(x, b)) */
|
||||
if (ir->operation == ir_binop_min &&
|
||||
inner_const->is_zero() &&
|
||||
is_less_than_one(outer_const))
|
||||
return saturate(expr(ir_binop_min, x, outer_const));
|
||||
|
||||
if (is_less_than_one(inner_val_b->as_constant()) && outer_const->is_zero())
|
||||
return expr(ir_binop_min, saturate(inner_val_a), inner_val_b);
|
||||
/* max(min(x, b), 0.0) where b < 1.0 is sat(min(x, b)) */
|
||||
if (ir->operation == ir_binop_max &&
|
||||
is_less_than_one(inner_const) &&
|
||||
outer_const->is_zero())
|
||||
return saturate(expr(ir_binop_min, x, inner_const));
|
||||
|
||||
/* Found a {min|max} ({max|min} (x, b), 1.0), where b > 0.0
|
||||
* and its variations
|
||||
*/
|
||||
if (outer_const->is_one() && is_greater_than_zero(inner_val_b->as_constant()))
|
||||
return expr(ir_binop_max, saturate(inner_val_a), inner_val_b);
|
||||
if (inner_val_b->as_constant()->is_one() && is_greater_than_zero(outer_const))
|
||||
return expr(ir_binop_max, saturate(inner_val_a), outer_const);
|
||||
/* max(min(x, 1.0), b) where b > 0.0 is sat(max(x, b)) */
|
||||
if (ir->operation == ir_binop_max &&
|
||||
inner_const->is_one() &&
|
||||
is_greater_than_zero(outer_const))
|
||||
return saturate(expr(ir_binop_max, x, outer_const));
|
||||
|
||||
/* min(max(x, b), 1.0) where b > 0.0 is sat(max(x, b)) */
|
||||
if (ir->operation == ir_binop_min &&
|
||||
is_greater_than_zero(inner_const) &&
|
||||
outer_const->is_one())
|
||||
return saturate(expr(ir_binop_max, x, inner_const));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -65,10 +65,23 @@ dri2_convert_glx_query_renderer_attribs(int attribute)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Convert internal dri context profile bits into GLX context profile bits */
|
||||
static inline void
|
||||
dri_convert_context_profile_bits(int attribute, unsigned int *value)
|
||||
{
|
||||
if (attribute == GLX_RENDERER_PREFERRED_PROFILE_MESA) {
|
||||
if (value[0] == (1U << __DRI_API_OPENGL_CORE))
|
||||
value[0] = GLX_CONTEXT_CORE_PROFILE_BIT_ARB;
|
||||
else if (value[0] == (1U << __DRI_API_OPENGL))
|
||||
value[0] = GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB;
|
||||
}
|
||||
}
|
||||
|
||||
_X_HIDDEN int
|
||||
dri2_query_renderer_integer(struct glx_screen *base, int attribute,
|
||||
unsigned int *value)
|
||||
{
|
||||
int ret;
|
||||
struct dri2_screen *const psc = (struct dri2_screen *) base;
|
||||
|
||||
/* Even though there are invalid values (and
|
||||
@@ -81,8 +94,11 @@ dri2_query_renderer_integer(struct glx_screen *base, int attribute,
|
||||
if (psc->rendererQuery == NULL)
|
||||
return -1;
|
||||
|
||||
return psc->rendererQuery->queryInteger(psc->driScreen, dri_attribute,
|
||||
value);
|
||||
ret = psc->rendererQuery->queryInteger(psc->driScreen, dri_attribute,
|
||||
value);
|
||||
dri_convert_context_profile_bits(attribute, value);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
_X_HIDDEN int
|
||||
@@ -108,6 +124,7 @@ _X_HIDDEN int
|
||||
dri3_query_renderer_integer(struct glx_screen *base, int attribute,
|
||||
unsigned int *value)
|
||||
{
|
||||
int ret;
|
||||
struct dri3_screen *const psc = (struct dri3_screen *) base;
|
||||
|
||||
/* Even though there are invalid values (and
|
||||
@@ -120,8 +137,11 @@ dri3_query_renderer_integer(struct glx_screen *base, int attribute,
|
||||
if (psc->rendererQuery == NULL)
|
||||
return -1;
|
||||
|
||||
return psc->rendererQuery->queryInteger(psc->driScreen, dri_attribute,
|
||||
value);
|
||||
ret = psc->rendererQuery->queryInteger(psc->driScreen, dri_attribute,
|
||||
value);
|
||||
dri_convert_context_profile_bits(attribute, value);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
_X_HIDDEN int
|
||||
@@ -147,6 +167,7 @@ _X_HIDDEN int
|
||||
drisw_query_renderer_integer(struct glx_screen *base, int attribute,
|
||||
unsigned int *value)
|
||||
{
|
||||
int ret;
|
||||
struct drisw_screen *const psc = (struct drisw_screen *) base;
|
||||
|
||||
/* Even though there are invalid values (and
|
||||
@@ -159,8 +180,11 @@ drisw_query_renderer_integer(struct glx_screen *base, int attribute,
|
||||
if (psc->rendererQuery == NULL)
|
||||
return -1;
|
||||
|
||||
return psc->rendererQuery->queryInteger(psc->driScreen, dri_attribute,
|
||||
value);
|
||||
ret = psc->rendererQuery->queryInteger(psc->driScreen, dri_attribute,
|
||||
value);
|
||||
dri_convert_context_profile_bits(attribute, value);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
_X_HIDDEN int
|
||||
|
@@ -143,8 +143,13 @@ __glXWireToEvent(Display *dpy, XEvent *event, xEvent *wire)
|
||||
aevent->ust = ((CARD64)awire->ust_hi << 32) | awire->ust_lo;
|
||||
aevent->msc = ((CARD64)awire->msc_hi << 32) | awire->msc_lo;
|
||||
|
||||
if (awire->sbc < glxDraw->lastEventSbc)
|
||||
glxDraw->eventSbcWrap += 0x100000000;
|
||||
/* Handle 32-Bit wire sbc wraparound in both directions to cope with out
|
||||
* of sequence 64-Bit sbc's
|
||||
*/
|
||||
if ((int64_t) awire->sbc < ((int64_t) glxDraw->lastEventSbc - 0x40000000))
|
||||
glxDraw->eventSbcWrap += 0x100000000;
|
||||
if ((int64_t) awire->sbc > ((int64_t) glxDraw->lastEventSbc + 0x40000000))
|
||||
glxDraw->eventSbcWrap -= 0x100000000;
|
||||
glxDraw->lastEventSbc = awire->sbc;
|
||||
aevent->sbc = awire->sbc + glxDraw->eventSbcWrap;
|
||||
return True;
|
||||
|
@@ -64,6 +64,7 @@
|
||||
* Rob Clark <robclark@freedesktop.org>
|
||||
*/
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -80,7 +81,6 @@
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_SYSFS
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include "loader.h"
|
||||
|
@@ -122,5 +122,5 @@ format_info_deps := \
|
||||
$(LOCAL_PATH)/main/format_parser.py \
|
||||
$(FORMAT_INFO)
|
||||
|
||||
$(intermediates)/main/format_info.c: $(format_info_deps)
|
||||
$(intermediates)/main/format_info.h: $(format_info_deps)
|
||||
@$(MESA_PYTHON2) $(FORMAT_INFO) $< > $@
|
||||
|
@@ -64,7 +64,7 @@ include Makefile.sources
|
||||
|
||||
BUILT_SOURCES = \
|
||||
main/get_hash.h \
|
||||
main/format_info.c \
|
||||
main/format_info.h \
|
||||
$(BUILDDIR)main/git_sha1.h \
|
||||
$(BUILDDIR)program/program_parse.tab.c \
|
||||
$(BUILDDIR)program/lex.yy.c
|
||||
@@ -82,14 +82,14 @@ main/get_hash.h: $(GLAPI)/gl_and_es_API.xml main/get_hash_params.py \
|
||||
-f $< > $@.tmp; \
|
||||
mv $@.tmp $@;
|
||||
|
||||
main/format_info.c: main/formats.csv \
|
||||
main/format_info.h: main/formats.csv \
|
||||
main/format_parser.py main/format_info.py
|
||||
$(AM_V_GEN)set -e; \
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/main/format_info.py \
|
||||
$< > $@.tmp; \
|
||||
mv $@.tmp $@;
|
||||
|
||||
main/formats.c: main/format_info.c
|
||||
main/formats.c: main/format_info.h
|
||||
|
||||
noinst_LTLIBRARIES = $(ARCH_LIBS)
|
||||
if NEED_LIBMESA
|
||||
|
@@ -60,7 +60,7 @@ get_hash_header = env.CodeGenerate(
|
||||
)
|
||||
|
||||
format_info = env.CodeGenerate(
|
||||
target = 'main/format_info.c',
|
||||
target = 'main/format_info.h',
|
||||
script = 'main/format_info.py',
|
||||
source = 'main/formats.csv',
|
||||
command = python_cmd + ' $SCRIPT ' + ' $SOURCE > $TARGET'
|
||||
|
@@ -2179,8 +2179,13 @@ fs_visitor::demote_pull_constants()
|
||||
if (inst->src[i].file != UNIFORM)
|
||||
continue;
|
||||
|
||||
int pull_index = pull_constant_loc[inst->src[i].reg +
|
||||
inst->src[i].reg_offset];
|
||||
int pull_index;
|
||||
unsigned location = inst->src[i].reg + inst->src[i].reg_offset;
|
||||
if (location >= uniforms) /* Out of bounds access */
|
||||
pull_index = -1;
|
||||
else
|
||||
pull_index = pull_constant_loc[location];
|
||||
|
||||
if (pull_index == -1)
|
||||
continue;
|
||||
|
||||
@@ -2842,16 +2847,6 @@ fs_visitor::insert_gen4_post_send_dependency_workarounds(bblock_t *block, fs_ins
|
||||
if (i == write_len)
|
||||
return;
|
||||
}
|
||||
|
||||
/* If we hit the end of the program, resolve all remaining dependencies out
|
||||
* of paranoia.
|
||||
*/
|
||||
fs_inst *last_inst = (fs_inst *)this->instructions.get_tail();
|
||||
assert(last_inst->eot);
|
||||
for (int i = 0; i < write_len; i++) {
|
||||
if (needs_dep[i])
|
||||
last_inst->insert_before(block, DEP_RESOLVE_MOV(first_write_grf + i));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -354,7 +354,7 @@ brw_upload_gs_prog(struct brw_context *brw)
|
||||
}
|
||||
brw->gs.base.prog_data = &brw->gs.prog_data->base.base;
|
||||
|
||||
if (memcmp(&brw->vs.prog_data->base.vue_map, &brw->vue_map_geom_out,
|
||||
if (memcmp(&brw->gs.prog_data->base.vue_map, &brw->vue_map_geom_out,
|
||||
sizeof(brw->vue_map_geom_out)) != 0) {
|
||||
brw->vue_map_geom_out = brw->gs.prog_data->base.vue_map;
|
||||
brw->state.dirty.brw |= BRW_NEW_VUE_MAP_GEOM_OUT;
|
||||
|
@@ -415,7 +415,7 @@ vec4_visitor::opt_copy_propagation()
|
||||
entries[reg].saturatemask = 0x0;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (inst->dst.writemask & (1 << i)) {
|
||||
entries[reg].value[i] = direct_copy ? &inst->src[0] : NULL;
|
||||
entries[reg].value[i] = (!inst->saturate && direct_copy) ? &inst->src[0] : NULL;
|
||||
entries[reg].saturatemask |= (((inst->saturate && direct_copy) ? 1 : 0) << i);
|
||||
}
|
||||
}
|
||||
|
2
src/mesa/main/.gitignore
vendored
2
src/mesa/main/.gitignore
vendored
@@ -8,4 +8,4 @@ git_sha1.h.tmp
|
||||
remap_helper.h
|
||||
get_hash.h
|
||||
get_hash.h.tmp
|
||||
format_info.c
|
||||
format_info.h
|
||||
|
@@ -73,7 +73,7 @@ struct gl_format_info
|
||||
uint8_t Swizzle[4];
|
||||
};
|
||||
|
||||
#include "format_info.c"
|
||||
#include "format_info.h"
|
||||
|
||||
static const struct gl_format_info *
|
||||
_mesa_get_format_info(mesa_format format)
|
||||
|
@@ -2990,6 +2990,7 @@ struct gl_shader_compiler_options
|
||||
GLboolean EmitNoMainReturn; /**< Emit CONT/RET opcodes? */
|
||||
GLboolean EmitNoNoise; /**< Emit NOISE opcodes? */
|
||||
GLboolean EmitNoPow; /**< Emit POW opcodes? */
|
||||
GLboolean EmitNoSat; /**< Emit SAT opcodes? */
|
||||
GLboolean LowerClipDistance; /**< Lower gl_ClipDistance from float[8] to vec4[2]? */
|
||||
|
||||
/**
|
||||
|
@@ -1682,16 +1682,35 @@ _mesa_GetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length,
|
||||
GLenum *binaryFormat, GLvoid *binary)
|
||||
{
|
||||
struct gl_shader_program *shProg;
|
||||
GLsizei length_dummy;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
shProg = _mesa_lookup_shader_program_err(ctx, program, "glGetProgramBinary");
|
||||
if (!shProg)
|
||||
return;
|
||||
|
||||
/* The ARB_get_program_binary spec says:
|
||||
*
|
||||
* "If <length> is NULL, then no length is returned."
|
||||
*
|
||||
* Ensure that length always points to valid storage to avoid multiple NULL
|
||||
* pointer checks below.
|
||||
*/
|
||||
if (length == NULL)
|
||||
length = &length_dummy;
|
||||
|
||||
|
||||
/* The ARB_get_program_binary spec says:
|
||||
*
|
||||
* "When a program object's LINK_STATUS is FALSE, its program binary
|
||||
* length is zero, and a call to GetProgramBinary will generate an
|
||||
* INVALID_OPERATION error.
|
||||
*/
|
||||
if (!shProg->LinkStatus) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetProgramBinary(program %u not linked)",
|
||||
shProg->Name);
|
||||
*length = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1700,12 +1719,9 @@ _mesa_GetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length,
|
||||
return;
|
||||
}
|
||||
|
||||
/* The ARB_get_program_binary spec says:
|
||||
*
|
||||
* "If <length> is NULL, then no length is returned."
|
||||
*/
|
||||
if (length != NULL)
|
||||
*length = 0;
|
||||
*length = 0;
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glGetProgramBinary(driver supports zero binary formats)");
|
||||
|
||||
(void) binaryFormat;
|
||||
(void) binary;
|
||||
@@ -1724,8 +1740,31 @@ _mesa_ProgramBinary(GLuint program, GLenum binaryFormat,
|
||||
|
||||
(void) binaryFormat;
|
||||
(void) binary;
|
||||
(void) length;
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, __FUNCTION__);
|
||||
|
||||
/* Section 2.3.1 (Errors) of the OpenGL 4.5 spec says:
|
||||
*
|
||||
* "If a negative number is provided where an argument of type sizei or
|
||||
* sizeiptr is specified, an INVALID_VALUE error is generated."
|
||||
*/
|
||||
if (length < 0) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE, "glProgramBinary(length < 0)");
|
||||
return;
|
||||
}
|
||||
|
||||
/* The ARB_get_program_binary spec says:
|
||||
*
|
||||
* "<binaryFormat> and <binary> must be those returned by a previous
|
||||
* call to GetProgramBinary, and <length> must be the length of the
|
||||
* program binary as returned by GetProgramBinary or GetProgramiv with
|
||||
* <pname> PROGRAM_BINARY_LENGTH. Loading the program binary will fail,
|
||||
* setting the LINK_STATUS of <program> to FALSE, if these conditions
|
||||
* are not met."
|
||||
*
|
||||
* Since any value of binaryFormat passed "is not one of those specified as
|
||||
* allowable for [this] command, an INVALID_ENUM error is generated."
|
||||
*/
|
||||
shProg->LinkStatus = GL_FALSE;
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glProgramBinary");
|
||||
}
|
||||
|
||||
|
||||
|
@@ -2497,8 +2497,8 @@ texsubimage_error_check(struct gl_context *ctx, GLuint dimensions,
|
||||
}
|
||||
|
||||
if (error_check_subtexture_dimensions(ctx, "glTexSubImage", dimensions,
|
||||
texImage, xoffset, yoffset, 0,
|
||||
width, height, 1)) {
|
||||
texImage, xoffset, yoffset, zoffset,
|
||||
width, height, depth)) {
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
@@ -1102,7 +1102,7 @@ st_DrawPixels(struct gl_context *ctx, GLint x, GLint y,
|
||||
const GLfloat *color;
|
||||
struct pipe_context *pipe = st->pipe;
|
||||
GLboolean write_stencil = GL_FALSE, write_depth = GL_FALSE;
|
||||
struct pipe_sampler_view *sv[2];
|
||||
struct pipe_sampler_view *sv[2] = { NULL };
|
||||
int num_sampler_view = 1;
|
||||
struct st_fp_variant *fpv;
|
||||
struct gl_pixelstore_attrib clippedUnpack;
|
||||
@@ -1156,8 +1156,9 @@ st_DrawPixels(struct gl_context *ctx, GLint x, GLint y,
|
||||
|
||||
color = NULL;
|
||||
if (st->pixel_xfer.pixelmap_enabled) {
|
||||
sv[1] = st->pixel_xfer.pixelmap_sampler_view;
|
||||
num_sampler_view++;
|
||||
pipe_sampler_view_reference(&sv[1],
|
||||
st->pixel_xfer.pixelmap_sampler_view);
|
||||
num_sampler_view++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1178,7 +1179,8 @@ st_DrawPixels(struct gl_context *ctx, GLint x, GLint y,
|
||||
if (write_stencil) {
|
||||
enum pipe_format stencil_format =
|
||||
util_format_stencil_only(pt->format);
|
||||
|
||||
/* we should not be doing pixel map/transfer (see above) */
|
||||
assert(num_sampler_view == 1);
|
||||
sv[1] = st_create_texture_sampler_view_format(st->pipe, pt,
|
||||
stencil_format);
|
||||
num_sampler_view++;
|
||||
@@ -1469,7 +1471,7 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
|
||||
struct st_renderbuffer *rbRead;
|
||||
void *driver_vp, *driver_fp;
|
||||
struct pipe_resource *pt;
|
||||
struct pipe_sampler_view *sv[2];
|
||||
struct pipe_sampler_view *sv[2] = { NULL };
|
||||
int num_sampler_view = 1;
|
||||
GLfloat *color;
|
||||
enum pipe_format srcFormat;
|
||||
@@ -1518,7 +1520,8 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
|
||||
driver_vp = make_passthrough_vertex_shader(st, GL_FALSE);
|
||||
|
||||
if (st->pixel_xfer.pixelmap_enabled) {
|
||||
sv[1] = st->pixel_xfer.pixelmap_sampler_view;
|
||||
pipe_sampler_view_reference(&sv[1],
|
||||
st->pixel_xfer.pixelmap_sampler_view);
|
||||
num_sampler_view++;
|
||||
}
|
||||
}
|
||||
|
@@ -271,6 +271,8 @@ st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe,
|
||||
*/
|
||||
st->ctx->Point.MaxSize = MAX2(ctx->Const.MaxPointSize,
|
||||
ctx->Const.MaxPointSizeAA);
|
||||
/* For vertex shaders, make sure not to emit saturate when SM 3.0 is not supported */
|
||||
ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].EmitNoSat = !st->has_shader_model3;
|
||||
|
||||
_mesa_compute_version(ctx);
|
||||
|
||||
|
@@ -5388,9 +5388,6 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
|
||||
if (!pscreen->get_param(pscreen, PIPE_CAP_TEXTURE_GATHER_OFFSETS))
|
||||
lower_offset_arrays(ir);
|
||||
do_mat_op_to_vec(ir);
|
||||
/* Emit saturates in the vertex shader only if SM 3.0 is supported. */
|
||||
bool vs_sm3 = (_mesa_shader_stage_to_program(prog->_LinkedShaders[i]->Stage) ==
|
||||
GL_VERTEX_PROGRAM_ARB) && st_context(ctx)->has_shader_model3;
|
||||
lower_instructions(ir,
|
||||
MOD_TO_FRACT |
|
||||
DIV_TO_MUL_RCP |
|
||||
@@ -5401,7 +5398,7 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
|
||||
BORROW_TO_ARITH |
|
||||
(options->EmitNoPow ? POW_TO_EXP2 : 0) |
|
||||
(!ctx->Const.NativeIntegers ? INT_DIV_TO_MUL_RCP : 0) |
|
||||
(vs_sm3 ? SAT_TO_CLAMP : 0));
|
||||
(options->EmitNoSat ? SAT_TO_CLAMP : 0));
|
||||
|
||||
lower_ubo_reference(prog->_LinkedShaders[i], ir);
|
||||
do_vec_index_to_cond_assign(ir);
|
||||
|
@@ -932,19 +932,19 @@ clamp_colors(SWspan *span)
|
||||
* \param output which fragment program color output is being processed
|
||||
*/
|
||||
static inline void
|
||||
convert_color_type(SWspan *span, GLenum newType, GLuint output)
|
||||
convert_color_type(SWspan *span, GLenum srcType, GLenum newType, GLuint output)
|
||||
{
|
||||
GLvoid *src, *dst;
|
||||
|
||||
if (output > 0 || span->array->ChanType == GL_FLOAT) {
|
||||
if (output > 0 || srcType == GL_FLOAT) {
|
||||
src = span->array->attribs[VARYING_SLOT_COL0 + output];
|
||||
span->array->ChanType = GL_FLOAT;
|
||||
}
|
||||
else if (span->array->ChanType == GL_UNSIGNED_BYTE) {
|
||||
else if (srcType == GL_UNSIGNED_BYTE) {
|
||||
src = span->array->rgba8;
|
||||
}
|
||||
else {
|
||||
ASSERT(span->array->ChanType == GL_UNSIGNED_SHORT);
|
||||
ASSERT(srcType == GL_UNSIGNED_SHORT);
|
||||
src = span->array->rgba16;
|
||||
}
|
||||
|
||||
@@ -978,7 +978,7 @@ shade_texture_span(struct gl_context *ctx, SWspan *span)
|
||||
ctx->ATIFragmentShader._Enabled) {
|
||||
/* programmable shading */
|
||||
if (span->primitive == GL_BITMAP && span->array->ChanType != GL_FLOAT) {
|
||||
convert_color_type(span, GL_FLOAT, 0);
|
||||
convert_color_type(span, span->array->ChanType, GL_FLOAT, 0);
|
||||
}
|
||||
else {
|
||||
span->array->rgba = (void *) span->array->attribs[VARYING_SLOT_COL0];
|
||||
@@ -1313,6 +1313,8 @@ _swrast_write_rgba_span( struct gl_context *ctx, SWspan *span)
|
||||
const GLboolean multiFragOutputs =
|
||||
_swrast_use_fragment_program(ctx)
|
||||
&& fp->Base.OutputsWritten >= (1 << FRAG_RESULT_DATA0);
|
||||
/* Save srcColorType because convert_color_type() can change it */
|
||||
const GLenum srcColorType = span->array->ChanType;
|
||||
GLuint buf;
|
||||
|
||||
for (buf = 0; buf < numBuffers; buf++) {
|
||||
@@ -1324,17 +1326,18 @@ _swrast_write_rgba_span( struct gl_context *ctx, SWspan *span)
|
||||
/* re-use one of the attribute array buffers for rgbaSave */
|
||||
GLchan (*rgbaSave)[4] = (GLchan (*)[4]) span->array->attribs[0];
|
||||
struct swrast_renderbuffer *srb = swrast_renderbuffer(rb);
|
||||
GLenum colorType = srb->ColorType;
|
||||
const GLenum dstColorType = srb->ColorType;
|
||||
|
||||
assert(colorType == GL_UNSIGNED_BYTE ||
|
||||
colorType == GL_FLOAT);
|
||||
assert(dstColorType == GL_UNSIGNED_BYTE ||
|
||||
dstColorType == GL_FLOAT);
|
||||
|
||||
/* set span->array->rgba to colors for renderbuffer's datatype */
|
||||
if (span->array->ChanType != colorType) {
|
||||
convert_color_type(span, colorType, 0);
|
||||
if (srcColorType != dstColorType) {
|
||||
convert_color_type(span, srcColorType, dstColorType,
|
||||
multiFragOutputs ? buf : 0);
|
||||
}
|
||||
else {
|
||||
if (span->array->ChanType == GL_UNSIGNED_BYTE) {
|
||||
if (srcColorType == GL_UNSIGNED_BYTE) {
|
||||
span->array->rgba = span->array->rgba8;
|
||||
}
|
||||
else {
|
||||
|
@@ -210,6 +210,7 @@ static inline float conv_i2_to_norm_float(const struct gl_context *ctx, int i2)
|
||||
} \
|
||||
} else if ((type) == GL_UNSIGNED_INT_10F_11F_11F_REV) { \
|
||||
float res[4]; \
|
||||
res[3] = 1; \
|
||||
r11g11b10f_to_float3((arg), res); \
|
||||
ATTR##val##FV((attr), res); \
|
||||
} else \
|
||||
|
Reference in New Issue
Block a user