Compare commits
96 Commits
mesa-11.1.
...
mesa-11.1.
Author | SHA1 | Date | |
---|---|---|---|
|
ca2fbf6f8f | ||
|
53a886ec31 | ||
|
3eb4fd8891 | ||
|
fd1e4331ee | ||
|
48d14b5290 | ||
|
55375c14ce | ||
|
760f8ead09 | ||
|
c91c7de52d | ||
|
75afb4ca6e | ||
|
a785cccc70 | ||
|
e8cb96f83d | ||
|
fbc184041e | ||
|
9383b06d3e | ||
|
868cf20717 | ||
|
8b4eb0f123 | ||
|
e097adc8b4 | ||
|
0bcf45cf8d | ||
|
5b1877c8ae | ||
|
7521241091 | ||
|
6771e866d0 | ||
|
5d8ba0232e | ||
|
b2c280915a | ||
|
625ffe33ab | ||
|
dde6d0efba | ||
|
d9d703ee22 | ||
|
a132394ca4 | ||
|
e53e9b9a36 | ||
|
adc355ec4e | ||
|
5352835d0a | ||
|
6dff29d926 | ||
|
79ba53f574 | ||
|
9c04a9c0f5 | ||
|
56159c2800 | ||
|
9bfc47358d | ||
|
b2ac03a8fc | ||
|
4a6aa3d978 | ||
|
3afee5e82f | ||
|
09d1434fd7 | ||
|
def3c848b3 | ||
|
51bd5f4fc4 | ||
|
b5f811e045 | ||
|
1ad8541963 | ||
|
eadc1b6134 | ||
|
4a1bc9dcf3 | ||
|
2a399fccf4 | ||
|
e8dd18dce6 | ||
|
15bc51572e | ||
|
3db8c9417b | ||
|
b21e484b8f | ||
|
adabc628e2 | ||
|
6bd66f8588 | ||
|
029abaa1cb | ||
|
8d9d25a71e | ||
|
c95a045980 | ||
|
89e92ef5b5 | ||
|
37e712795a | ||
|
3f1b0c3200 | ||
|
7cafcf5d24 | ||
|
0f401ea5f6 | ||
|
c786f890cd | ||
|
9ac357a338 | ||
|
bee3d391ec | ||
|
496ab03cb5 | ||
|
82b564812c | ||
|
fcad8356a4 | ||
|
2a4299a7f6 | ||
|
7fed1d299d | ||
|
ebf97bc637 | ||
|
df5ed52641 | ||
|
cefb7c44ca | ||
|
6847733bb4 | ||
|
a85e5044c5 | ||
|
5c9e9e1f00 | ||
|
4687027197 | ||
|
161a0a9784 | ||
|
0a7097a17e | ||
|
6d54a6582e | ||
|
df41d912fb | ||
|
ac887fee2a | ||
|
374ba5d855 | ||
|
c1dac9218e | ||
|
c58258558f | ||
|
3b9437c701 | ||
|
16958f7171 | ||
|
729a8c528d | ||
|
b09d082e81 | ||
|
cd886e8ac3 | ||
|
777ba349cd | ||
|
7e103fe53f | ||
|
44e5f03edb | ||
|
ed14107645 | ||
|
9427c7e897 | ||
|
88615b66ed | ||
|
a2dd9b49f0 | ||
|
27fa53c6d0 | ||
|
e49dd21bcb |
@@ -37,6 +37,7 @@ LOCAL_C_INCLUDES += \
|
||||
MESA_VERSION := $(shell cat $(MESA_TOP)/VERSION)
|
||||
# define ANDROID_VERSION (e.g., 4.0.x => 0x0400)
|
||||
LOCAL_CFLAGS += \
|
||||
-Wno-date-time \
|
||||
-DPACKAGE_VERSION=\"$(MESA_VERSION)\" \
|
||||
-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\" \
|
||||
-DANDROID_VERSION=0x0$(MESA_ANDROID_MAJOR_VERSION)0$(MESA_ANDROID_MINOR_VERSION)
|
||||
@@ -88,3 +89,6 @@ LOCAL_CPPFLAGS += \
|
||||
ifeq ($(strip $(LOCAL_MODULE_TAGS)),)
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
endif
|
||||
|
||||
# Quiet down the build system and remove any .h files from the sources
|
||||
LOCAL_SRC_FILES := $(patsubst %.h, , $(LOCAL_SRC_FILES))
|
||||
|
@@ -42,6 +42,10 @@ $(call local-intermediates-dir)
|
||||
endef
|
||||
endif
|
||||
|
||||
MESA_DRI_MODULE_REL_PATH := dri
|
||||
MESA_DRI_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/$(MESA_DRI_MODULE_REL_PATH)
|
||||
MESA_DRI_MODULE_UNSTRIPPED_PATH := $(TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED)/$(MESA_DRI_MODULE_REL_PATH)
|
||||
|
||||
MESA_COMMON_MK := $(MESA_TOP)/Android.common.mk
|
||||
MESA_PYTHON2 := python
|
||||
|
||||
|
@@ -24,18 +24,21 @@ SUBDIRS = src
|
||||
AM_DISTCHECK_CONFIGURE_FLAGS = \
|
||||
--enable-dri3 \
|
||||
--enable-gallium-tests \
|
||||
--enable-gallium-osmesa \
|
||||
--enable-gbm \
|
||||
--enable-gles1 \
|
||||
--enable-gles2 \
|
||||
--enable-glx-tls \
|
||||
--enable-nine \
|
||||
--enable-opencl \
|
||||
--enable-va \
|
||||
--enable-vdpau \
|
||||
--enable-xa \
|
||||
--enable-xvmc \
|
||||
--disable-llvm-shared-libs \
|
||||
--with-egl-platforms=x11,wayland,drm \
|
||||
--with-egl-platforms=x11,wayland,drm,surfaceless \
|
||||
--with-dri-drivers=i915,i965,nouveau,radeon,r200,swrast \
|
||||
--with-gallium-drivers=i915,ilo,nouveau,r300,r600,radeonsi,freedreno,svga,swrast
|
||||
--with-gallium-drivers=i915,ilo,nouveau,r300,r600,radeonsi,freedreno,svga,swrast,vc4,virgl
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
|
@@ -7,3 +7,6 @@
|
||||
# .num_slices isn't available in 11.1
|
||||
f2c891353609b48459f27f205407d42823dd7d03 Add missing platform information for KBL
|
||||
|
||||
# As requested by Ilia at https://lists.freedesktop.org/archives/mesa-stable/2016-April/003939.html
|
||||
6eeb284e4f74a2fe5ae6cba90f97f219935e24df nv50/ir: normalize cube coordinates after derivatives have been computed
|
||||
|
||||
|
35
bin/get-extra-pick-list.sh
Executable file
35
bin/get-extra-pick-list.sh
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Script for generating a list of candidates which fix commits that have been
|
||||
# previously cherry-picked to a stable branch.
|
||||
#
|
||||
# Usage examples:
|
||||
#
|
||||
# $ bin/get-extra-pick-list.sh
|
||||
# $ bin/get-extra-pick-list.sh > picklist
|
||||
# $ bin/get-extra-pick-list.sh | tee picklist
|
||||
|
||||
# Use the last branchpoint as our limit for the search
|
||||
# XXX: there should be a better way for this
|
||||
latest_branchpoint=`git branch | grep \* | cut -c 3-`-branchpoint
|
||||
|
||||
# Grep for commits with "cherry picked from commit" in the commit message.
|
||||
git log --reverse --grep="cherry picked from commit" $latest_branchpoint..HEAD |\
|
||||
grep "cherry picked from commit" |\
|
||||
sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' |\
|
||||
cut -c -8 |\
|
||||
while read sha
|
||||
do
|
||||
# Check if the original commit is referenced in master
|
||||
git log -n1 --pretty=oneline --grep=$sha $latest_branchpoint..origin/master |\
|
||||
cut -c -8 |\
|
||||
while read candidate
|
||||
do
|
||||
# Check if the potential fix, hasn't landed in branch yet.
|
||||
found=`git log -n1 --pretty=oneline --reverse --grep=$candidate $latest_branchpoint..HEAD |wc -l`
|
||||
if test $found = 0
|
||||
then
|
||||
echo Commit $candidate might need to be picked, as it references $sha
|
||||
fi
|
||||
done
|
||||
done
|
@@ -14,7 +14,7 @@ git log --reverse --grep="cherry picked from commit" origin/master..HEAD |\
|
||||
sed -e 's/^[[:space:]]*(cherry picked from commit[[:space:]]*//' -e 's/)//' > already_picked
|
||||
|
||||
# Grep for commits that were marked as a candidate for the stable tree.
|
||||
git log --reverse --pretty=%H -i --grep='^\([[:space:]]*NOTE: .*[Cc]andidate\|CC:.*mesa-stable\)' HEAD..origin/master |\
|
||||
git log --reverse --pretty=%H -i --grep='^\([[:space:]]*NOTE: .*[Cc]andidate\|CC:.*11\.1.*mesa-stable\)' HEAD..origin/master |\
|
||||
while read sha
|
||||
do
|
||||
# Check to see whether the patch is on the ignore list.
|
||||
|
@@ -31,7 +31,8 @@ because compatibility contexts are not supported.
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
TBD
|
||||
ba0e7462b2936b86e6684c26fbb55519f8d9ad31d13a1c1e1afbe41e73466eea mesa-11.1.2.tar.gz
|
||||
8f72aead896b340ba0f7a4a474bfaf71681f5d675592aec1cb7ba698e319148b mesa-11.1.2.tar.xz
|
||||
</pre>
|
||||
|
||||
|
||||
|
318
docs/relnotes/11.1.3.html
Normal file
318
docs/relnotes/11.1.3.html
Normal file
@@ -0,0 +1,318 @@
|
||||
<!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 11.1.3 Release Notes / April 17, 2016</h1>
|
||||
|
||||
<p>
|
||||
Mesa 11.1.3 is a bug fix release which fixes bugs found since the 11.1.2 release.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 11.1.3 implements the OpenGL 4.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 4.1. OpenGL
|
||||
4.1 is <strong>only</strong> available if requested at context creation
|
||||
because compatibility contexts are not supported.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>SHA256 checksums</h2>
|
||||
<pre>
|
||||
TBD
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<p>None</p>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
|
||||
<p>This list is likely incomplete.</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=27512">Bug 27512</a> - Illegal instruction _mesa_x86_64_transform_points4_general</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91526">Bug 91526</a> - World of Warcraft (on Wine) has UI corruption with nouveau</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92193">Bug 92193</a> - [SKL] ES2-CTS.gtf.GL2ExtensionTests.compressed_astc_texture.compressed_astc_texture fails</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93358">Bug 93358</a> - [HSW] Unreal Elemental demo - assertion error in copy_image_with_blitter</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93418">Bug 93418</a> - Geometry Shaders output wrong vertices on Sandy Bridge</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93524">Bug 93524</a> - Clover doesn't build</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93667">Bug 93667</a> - Crash in eglCreateImageKHR with huge texture size</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=93813">Bug 93813</a> - Incorrect viewport range when GL_CLIP_ORIGIN is GL_UPPER_LEFT</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94050">Bug 94050</a> - test_vec4_register_coalesce regression</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94073">Bug 94073</a> - Miscompilation of abs_vec3_vert_xvary_ref.vert in WebGL conformance</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94088">Bug 94088</a> - [llvmpipe] SIGFPE pthread_barrier_destroy.c:40</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94193">Bug 94193</a> - [llvmpipe] Line antialiasing looks different when GL_LINE_STIPPLE is enabled with pattern 0xffff</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94195">Bug 94195</a> - [llvmpipe] Does not build with LLVM 3.7.x on Windows</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94388">Bug 94388</a> - r600_blit.c:281: r600_decompress_depth_textures: Assertion `tex->is_depth && !tex->is_flushing_texture' failed.</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94412">Bug 94412</a> - Trine 3 misrender</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94481">Bug 94481</a> - softpipe - access violation in img_filter_2d_nearest</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94595">Bug 94595</a> - [Mesa AMD&swrast] Texture views attached as framebuffers return their viewed tecture's color encoding and render incorrectly</li>
|
||||
|
||||
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=94954">Bug 94954</a> - test_vec4_copy_propagation fails in `make check`</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Changes</h2>
|
||||
|
||||
<p>Anuj Phogat (1):</p>
|
||||
<ul>
|
||||
<li>i965: Fix assert conditions for src/dst x/y offsets</li>
|
||||
</ul>
|
||||
|
||||
<p>Ben Widawsky (2):</p>
|
||||
<ul>
|
||||
<li>i965: Make sure we blit a full compressed block</li>
|
||||
<li>i965/skl: Add two missing device IDs</li>
|
||||
</ul>
|
||||
|
||||
<p>Brian Paul (1):</p>
|
||||
<ul>
|
||||
<li>mesa: fix incorrect viewport position when GL_CLIP_ORIGIN = GL_LOWER_LEFT</li>
|
||||
</ul>
|
||||
|
||||
<p>Chris Forbes (1):</p>
|
||||
<ul>
|
||||
<li>i965/blorp: Fix hiz ops on MSAA surfaces</li>
|
||||
</ul>
|
||||
|
||||
<p>Christian König (1):</p>
|
||||
<ul>
|
||||
<li>radeon/uvd: disable MPEG1</li>
|
||||
</ul>
|
||||
|
||||
<p>Christian Schmidbauer (1):</p>
|
||||
<ul>
|
||||
<li>st/nine: specify WINAPI only for i386 and amd64</li>
|
||||
</ul>
|
||||
|
||||
<p>Daniel Czarnowski (3):</p>
|
||||
<ul>
|
||||
<li>egl_dri2: NULL check for xcb_dri2_get_buffers_reply()</li>
|
||||
<li>egl_dri2: set correct error code if swapbuffers fails</li>
|
||||
<li>egl: support EGL_LARGEST_PBUFFER in eglCreatePbufferSurface(...)</li>
|
||||
</ul>
|
||||
|
||||
<p>Dave Airlie (1):</p>
|
||||
<ul>
|
||||
<li>mesa/fbobject: propogate Layered when reusing attachments.</li>
|
||||
</ul>
|
||||
|
||||
<p>Derek Foreman (1):</p>
|
||||
<ul>
|
||||
<li>egl/wayland: Try to use wl_surface.damage_buffer for SwapBuffersWithDamage</li>
|
||||
</ul>
|
||||
|
||||
<p>Dongwon Kim (1):</p>
|
||||
<ul>
|
||||
<li>egl: move Null check to eglGetSyncAttribKHR to prevent Segfault</li>
|
||||
</ul>
|
||||
|
||||
<p>Emil Velikov (10):</p>
|
||||
<ul>
|
||||
<li>docs: add sha256 checksums for 11.1.2</li>
|
||||
<li>get-pick-list.sh: Require explicit "11.1" for nominating stable patches</li>
|
||||
<li>cherry-ignore: do not pick nv50/ir commit</li>
|
||||
<li>automake: add nine to make distcheck</li>
|
||||
<li>install-gallium-links: port changes from install-lib-links</li>
|
||||
<li>automake: add more missing options for make distcheck</li>
|
||||
<li>mesa; add get-extra-pick-list.sh script into bin/</li>
|
||||
<li>egl/x11: check the return value of xcb_dri2_get_buffers_reply()</li>
|
||||
<li>nvc/ir: remove duplicate variable declaration</li>
|
||||
<li>Update version to 11.1.3</li>
|
||||
</ul>
|
||||
|
||||
<p>Francisco Jerez (4):</p>
|
||||
<ul>
|
||||
<li>i965: Reupload push and pull constants when we get new shader image unit state.</li>
|
||||
<li>i965/fs: Add missing analysis invalidation in opt_sampler_eot().</li>
|
||||
<li>i965/fs: Add missing analysis invalidation in fixup_3src_null_dest().</li>
|
||||
<li>i965/vec4: Consider removal of no-op MOVs as progress during register coalesce.</li>
|
||||
</ul>
|
||||
|
||||
<p>Ilia Mirkin (21):</p>
|
||||
<ul>
|
||||
<li>nvc0/ir: fix converting between predicate and gpr</li>
|
||||
<li>nvc0: add some missing PUSH_SPACE's</li>
|
||||
<li>nvc0: avoid negatives in PUSH_SPACE argument</li>
|
||||
<li>glsl: make sure builtins are initialized before getting the shader</li>
|
||||
<li>glsl: return cloned signature, not the builtin one</li>
|
||||
<li>nv50/ir: fix quadop emission in the presence of predication</li>
|
||||
<li>st/mesa: fix up result_src.type when doing i2u/u2i conversions</li>
|
||||
<li>meta/copy_image: use precomputed dst_internal_format to avoid segfault</li>
|
||||
<li>st/mesa: force depth mode to GL_RED for sized depth/stencil formats</li>
|
||||
<li>glx: update to updated version of EXT_create_context_es2_profile</li>
|
||||
<li>nv50,nvc0: bump minimum texture buffer offset alignment</li>
|
||||
<li>nvc0: reset TFB bufctx when we no longer hold a reference to the buffers</li>
|
||||
<li>glsl: avoid stack smashing when there are too many attributes</li>
|
||||
<li>nvc0: fix blit triangle size to fully cover FB's > 8192x8192</li>
|
||||
<li>nv50: reset TFB bufctx when we no longer hold a reference to the buffers</li>
|
||||
<li>nv50/ir: force-enable derivatives on TXD ops</li>
|
||||
<li>st/mesa: only minify depth for 3d targets</li>
|
||||
<li>nv50/ir: fix indirect texturing for non-array textures on nvc0</li>
|
||||
<li>nvc0/ir: fix picking of coordinates from tex instruction for textureGrad</li>
|
||||
<li>nvc0: disable primitive restart and index bias during blits</li>
|
||||
<li>nv50/ir: we can't load local memory directly into an output</li>
|
||||
</ul>
|
||||
|
||||
<p>Jason Ekstrand (1):</p>
|
||||
<ul>
|
||||
<li>nir/lower_vec_to_movs: Better report channels handled by insert_mov</li>
|
||||
</ul>
|
||||
|
||||
<p>Kenneth Graunke (3):</p>
|
||||
<ul>
|
||||
<li>mesa: Make glGet queries initialize ctx->Debug when necessary.</li>
|
||||
<li>mesa: Allow Get*() of several forgotten IsEnabled() pnames.</li>
|
||||
<li>i965: Only magnify depth for 3D textures, not array textures.</li>
|
||||
</ul>
|
||||
|
||||
<p>Koop Mast (1):</p>
|
||||
<ul>
|
||||
<li>st/clover: Add libelf cflags to the build</li>
|
||||
</ul>
|
||||
|
||||
<p>Marc-André Lureau (1):</p>
|
||||
<ul>
|
||||
<li>virtio_gpu: Add virtio 1.0 PCI ID to driver map</li>
|
||||
</ul>
|
||||
|
||||
<p>Marek Olšák (3):</p>
|
||||
<ul>
|
||||
<li>radeonsi: fix Hyper-Z on Stoney</li>
|
||||
<li>gallium/radeon: don't use temporary buffers for persistent mappings</li>
|
||||
<li>radeonsi: fix Hyper-Z hangs on P2 configs</li>
|
||||
</ul>
|
||||
|
||||
<p>Matt Turner (3):</p>
|
||||
<ul>
|
||||
<li>i965/vec4: don't copy ATTR into 3src instructions with complex swizzles</li>
|
||||
<li>i965/fs: Don't CSE negated multiplies with saturation.</li>
|
||||
<li>i965/vec4: Update vec4 unit tests for commit 01dacc83ff.</li>
|
||||
</ul>
|
||||
|
||||
<p>Nanley Chery (2):</p>
|
||||
<ul>
|
||||
<li>mesa/image: Make _mesa_clip_readpixels() work with renderbuffers</li>
|
||||
<li>mesa/readpix: Clip ReadPixels() area to the ReadBuffer's</li>
|
||||
</ul>
|
||||
|
||||
<p>Nicolai Hähnle (2):</p>
|
||||
<ul>
|
||||
<li>r600g: clear compressed_depthtex/colortex_mask when binding buffer texture</li>
|
||||
<li>st/mesa: use the texture view's format for render-to-texture</li>
|
||||
</ul>
|
||||
|
||||
<p>Nishanth Peethambaran (2):</p>
|
||||
<ul>
|
||||
<li>st/omx: Remove trailing spaces</li>
|
||||
<li>st/omx/dec: Correct the timestamping</li>
|
||||
</ul>
|
||||
|
||||
<p>Oded Gabbay (8):</p>
|
||||
<ul>
|
||||
<li>gallium/radeon: Correctly translate colorswaps for big endian</li>
|
||||
<li>llvmpipe: use vpkswss when dst is signed</li>
|
||||
<li>gallium/radeon: return correct values for BE in r600_translate_colorswap</li>
|
||||
<li>gallium/radeon: remove separate BE path in r600_translate_colorswap</li>
|
||||
<li>gallium/r600: Don't let h/w do endian swap for colorformat</li>
|
||||
<li>gallium/radeon: disable evergreen_do_fast_color_clear for BE</li>
|
||||
<li>r600g: Do colorformat endian swap for PIPE_USAGE_STAGING</li>
|
||||
<li>radeonsi: Do colorformat endian swap for PIPE_USAGE_STAGING</li>
|
||||
</ul>
|
||||
|
||||
<p>Olivier Pena (1):</p>
|
||||
<ul>
|
||||
<li>scons: support for LLVM 3.7.</li>
|
||||
</ul>
|
||||
|
||||
<p>Patrick Baggett (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Use SSE prefetch instructions rather than 3DNow instructions</li>
|
||||
</ul>
|
||||
|
||||
<p>Rob Herring (10):</p>
|
||||
<ul>
|
||||
<li>Android: remove dependence on .SECONDEXPANSION</li>
|
||||
<li>Android: glsl: fix dependence on YACC_HEADER_SUFFIX from build system</li>
|
||||
<li>Android: add -Wno-date-time flag for clang</li>
|
||||
<li>Android: remove headers from LOCAL_SRC_FILES</li>
|
||||
<li>Android: clean-up and fix DRI module path handling</li>
|
||||
<li>freedreno: drop unnecessary -Wno-packed-bitfield-compat</li>
|
||||
<li>gallium/radeon: Add space between string literal and identifier</li>
|
||||
<li>r600: Make enum alu_op_flags unsigned</li>
|
||||
<li>virtio_gpu: Add PCI ID to driver map</li>
|
||||
<li>Android: fix x86 gallium builds</li>
|
||||
</ul>
|
||||
|
||||
<p>Roland Scheidegger (2):</p>
|
||||
<ul>
|
||||
<li>softpipe: fix anisotropic filtering crash</li>
|
||||
<li>draw: fix line stippling</li>
|
||||
</ul>
|
||||
|
||||
<p>Samuel Pitoiset (1):</p>
|
||||
<ul>
|
||||
<li>nvc0: make sure to delete samplers used by compute shaders</li>
|
||||
</ul>
|
||||
|
||||
<p>Steinar H. Gunderson (1):</p>
|
||||
<ul>
|
||||
<li>mesa: Fix locking of GLsync objects.</li>
|
||||
</ul>
|
||||
|
||||
<p>Tamil velan (1):</p>
|
||||
<ul>
|
||||
<li>radeon/uvd: increase max height to 4096 for VI and newer</li>
|
||||
</ul>
|
||||
|
||||
<p>Thomas Hellstrom (2):</p>
|
||||
<ul>
|
||||
<li>winsys/svga: Fix an uninitialized return value</li>
|
||||
<li>winsys/svga: Increase the fence timeout</li>
|
||||
</ul>
|
||||
|
||||
<p>Vinson Lee (1):</p>
|
||||
<ul>
|
||||
<li>llvmpipe: Do not use barriers if not using threads.</li>
|
||||
</ul>
|
||||
|
||||
<p>xavier (1):</p>
|
||||
<ul>
|
||||
<li>r600/sb: Do not distribute neg in expr_handler::fold_assoc() when folding multiplications.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@@ -178,11 +178,17 @@ typedef struct _RGNDATA {
|
||||
#undef WINAPI
|
||||
#endif /* WINAPI*/
|
||||
|
||||
#if defined(__x86_64__) || defined(_M_X64)
|
||||
#define WINAPI __attribute__((ms_abi))
|
||||
#else /* x86_64 */
|
||||
#define WINAPI __attribute__((__stdcall__))
|
||||
#endif /* x86_64 */
|
||||
#ifdef __GNUC__
|
||||
#if (defined(__x86_64__) && !defined(__ILP32__)) || defined(_M_X64)
|
||||
#define WINAPI __attribute__((ms_abi))
|
||||
#elif defined(__i386) || defined(_M_IX86)
|
||||
#define WINAPI __attribute__((__stdcall__))
|
||||
#else /* neither amd64 nor i386 */
|
||||
#define WINAPI
|
||||
#endif
|
||||
#else /* __GNUC__ */
|
||||
#define WINAPI
|
||||
#endif
|
||||
|
||||
/* Implementation caps */
|
||||
#define D3DPRESENT_BACK_BUFFERS_MAX 3
|
||||
|
@@ -112,6 +112,7 @@ CHIPSET(0x162E, bdw_gt3, "Intel(R) Broadwell GT3")
|
||||
CHIPSET(0x1902, skl_gt1, "Intel(R) HD Graphics 510 (Skylake GT1)")
|
||||
CHIPSET(0x1906, skl_gt1, "Intel(R) HD Graphics 510 (Skylake GT1)")
|
||||
CHIPSET(0x190A, skl_gt1, "Intel(R) Skylake GT1")
|
||||
CHIPSET(0x190B, skl_gt1, "Intel(R) HD Graphics 510 (Skylake GT1)")
|
||||
CHIPSET(0x190E, skl_gt1, "Intel(R) Skylake GT1")
|
||||
CHIPSET(0x1912, skl_gt2, "Intel(R) HD Graphics 530 (Skylake GT2)")
|
||||
CHIPSET(0x1913, skl_gt2, "Intel(R) Skylake GT2f")
|
||||
@@ -128,6 +129,7 @@ CHIPSET(0x1926, skl_gt3, "Intel(R) HD Graphics 535 (Skylake GT3)")
|
||||
CHIPSET(0x1927, skl_gt3, "Intel(R) Iris Graphics 550 (Skylake GT3e)")
|
||||
CHIPSET(0x192A, skl_gt4, "Intel(R) Skylake GT4")
|
||||
CHIPSET(0x192B, skl_gt3, "Intel(R) Iris Graphics (Skylake GT3fe)")
|
||||
CHIPSET(0x192D, skl_gt3, "Intel(R) Skylake GT3")
|
||||
CHIPSET(0x1932, skl_gt4, "Intel(R) Skylake GT4")
|
||||
CHIPSET(0x193A, skl_gt4, "Intel(R) Skylake GT4")
|
||||
CHIPSET(0x193B, skl_gt4, "Intel(R) Skylake GT4")
|
||||
|
2
include/pci_ids/virtio_gpu_pci_ids.h
Normal file
2
include/pci_ids/virtio_gpu_pci_ids.h
Normal file
@@ -0,0 +1,2 @@
|
||||
CHIPSET(0x0010, VIRTGL, VIRTGL)
|
||||
CHIPSET(0x1050, VIRTGL, VIRTGL)
|
@@ -3,9 +3,9 @@
|
||||
|
||||
if BUILD_SHARED
|
||||
if HAVE_COMPAT_SYMLINKS
|
||||
all-local : .libs/install-gallium-links
|
||||
all-local : .install-gallium-links
|
||||
|
||||
.libs/install-gallium-links : $(dri_LTLIBRARIES) $(egl_LTLIBRARIES) $(lib_LTLIBRARIES)
|
||||
.install-gallium-links : $(dri_LTLIBRARIES) $(egl_LTLIBRARIES) $(lib_LTLIBRARIES)
|
||||
$(AM_V_GEN)$(MKDIR_P) $(top_builddir)/$(LIB_DIR); \
|
||||
link_dir=$(top_builddir)/$(LIB_DIR)/gallium; \
|
||||
if test x$(egl_LTLIBRARIES) != x; then \
|
||||
@@ -23,4 +23,15 @@ all-local : .libs/install-gallium-links
|
||||
fi; \
|
||||
done && touch $@
|
||||
endif
|
||||
|
||||
clean-local:
|
||||
for f in $(notdir $(dri_LTLIBRARIES:%.la=.libs/%.$(LIB_EXT)*)) \
|
||||
$(notdir $(egl_LTLIBRARIES:%.la=.libs/%.$(LIB_EXT)*)) \
|
||||
$(notdir $(lib_LTLIBRARIES:%.la=.libs/%.$(LIB_EXT)*)); do \
|
||||
echo $$f; \
|
||||
$(RM) $(top_builddir)/$(LIB_DIR)/gallium/$$f; \
|
||||
done;
|
||||
rmdir $(top_builddir)/$(LIB_DIR)/gallium || true
|
||||
$(RM) .install-gallium-links
|
||||
|
||||
endif
|
||||
|
@@ -106,7 +106,19 @@ def generate(env):
|
||||
])
|
||||
env.Prepend(LIBPATH = [os.path.join(llvm_dir, 'lib')])
|
||||
# LIBS should match the output of `llvm-config --libs engine mcjit bitwriter x86asmprinter`
|
||||
if llvm_version >= distutils.version.LooseVersion('3.6'):
|
||||
if llvm_version >= distutils.version.LooseVersion('3.7'):
|
||||
env.Prepend(LIBS = [
|
||||
'LLVMBitWriter', 'LLVMX86Disassembler', 'LLVMX86AsmParser',
|
||||
'LLVMX86CodeGen', 'LLVMSelectionDAG', 'LLVMAsmPrinter',
|
||||
'LLVMCodeGen', 'LLVMScalarOpts', 'LLVMProfileData',
|
||||
'LLVMInstCombine', 'LLVMInstrumentation', 'LLVMTransformUtils', 'LLVMipa',
|
||||
'LLVMAnalysis', 'LLVMX86Desc', 'LLVMMCDisassembler',
|
||||
'LLVMX86Info', 'LLVMX86AsmPrinter', 'LLVMX86Utils',
|
||||
'LLVMMCJIT', 'LLVMTarget', 'LLVMExecutionEngine',
|
||||
'LLVMRuntimeDyld', 'LLVMObject', 'LLVMMCParser',
|
||||
'LLVMBitReader', 'LLVMMC', 'LLVMCore', 'LLVMSupport'
|
||||
])
|
||||
elif llvm_version >= distutils.version.LooseVersion('3.6'):
|
||||
env.Prepend(LIBS = [
|
||||
'LLVMBitWriter', 'LLVMX86Disassembler', 'LLVMX86AsmParser',
|
||||
'LLVMX86CodeGen', 'LLVMSelectionDAG', 'LLVMAsmPrinter',
|
||||
|
@@ -44,11 +44,10 @@ LOCAL_CFLAGS := \
|
||||
-DHAVE_ANDROID_PLATFORM
|
||||
|
||||
ifeq ($(MESA_LOLLIPOP_BUILD),true)
|
||||
LOCAL_CFLAGS_arm := -DDEFAULT_DRIVER_DIR=\"/system/lib/dri\"
|
||||
LOCAL_CFLAGS_x86 := -DDEFAULT_DRIVER_DIR=\"/system/lib/dri\"
|
||||
LOCAL_CFLAGS_x86_64 := -DDEFAULT_DRIVER_DIR=\"/system/lib64/dri\"
|
||||
LOCAL_CFLAGS_32 := -DDEFAULT_DRIVER_DIR=\"/system/lib/$(MESA_DRI_MODULE_REL_PATH)\"
|
||||
LOCAL_CFLAGS_64 := -DDEFAULT_DRIVER_DIR=\"/system/lib64/$(MESA_DRI_MODULE_REL_PATH)\"
|
||||
else
|
||||
LOCAL_CFLAGS += -DDEFAULT_DRIVER_DIR=\"/system/lib/dri\"
|
||||
LOCAL_CFLAGS += -DDEFAULT_DRIVER_DIR=\"/system/lib/$(MESA_DRI_MODULE_REL_PATH)\"
|
||||
endif
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
|
@@ -653,6 +653,37 @@ create_wl_buffer(struct dri2_egl_surface *dri2_surf)
|
||||
&wl_buffer_listener, dri2_surf);
|
||||
}
|
||||
|
||||
static EGLBoolean
|
||||
try_damage_buffer(struct dri2_egl_surface *dri2_surf,
|
||||
const EGLint *rects,
|
||||
EGLint n_rects)
|
||||
{
|
||||
/* The WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION macro and
|
||||
* wl_proxy_get_version() were both introduced in wayland 1.10.
|
||||
* Instead of bumping our wayland dependency we just make this
|
||||
* function conditional on the required 1.10 features, falling
|
||||
* back to old (correct but suboptimal) behaviour for older
|
||||
* wayland.
|
||||
*/
|
||||
#ifdef WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION
|
||||
int i;
|
||||
|
||||
if (wl_proxy_get_version((struct wl_proxy *) dri2_surf->wl_win->surface)
|
||||
< WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION)
|
||||
return EGL_FALSE;
|
||||
|
||||
for (i = 0; i < n_rects; i++) {
|
||||
const int *rect = &rects[i * 4];
|
||||
|
||||
wl_surface_damage_buffer(dri2_surf->wl_win->surface,
|
||||
rect[0],
|
||||
dri2_surf->base.Height - rect[1] - rect[3],
|
||||
rect[2], rect[3]);
|
||||
}
|
||||
return EGL_TRUE;
|
||||
#endif
|
||||
return EGL_FALSE;
|
||||
}
|
||||
/**
|
||||
* Called via eglSwapBuffers(), drv->API.SwapBuffers().
|
||||
*/
|
||||
@@ -703,10 +734,12 @@ dri2_wl_swap_buffers_with_damage(_EGLDriver *drv,
|
||||
dri2_surf->dx = 0;
|
||||
dri2_surf->dy = 0;
|
||||
|
||||
/* We deliberately ignore the damage region and post maximum damage, due to
|
||||
/* If the compositor doesn't support damage_buffer, we deliberately
|
||||
* ignore the damage region and post maximum damage, due to
|
||||
* https://bugs.freedesktop.org/78190 */
|
||||
wl_surface_damage(dri2_surf->wl_win->surface,
|
||||
0, 0, INT32_MAX, INT32_MAX);
|
||||
if (!n_rects || !try_damage_buffer(dri2_surf, rects, n_rects))
|
||||
wl_surface_damage(dri2_surf->wl_win->surface,
|
||||
0, 0, INT32_MAX, INT32_MAX);
|
||||
|
||||
if (dri2_dpy->is_different_gpu) {
|
||||
_EGLContext *ctx = _eglGetCurrentContext();
|
||||
|
@@ -472,6 +472,8 @@ dri2_x11_get_buffers(__DRIdrawable * driDrawable,
|
||||
dri2_surf->drawable,
|
||||
count, count, attachments);
|
||||
reply = xcb_dri2_get_buffers_reply (dri2_dpy->conn, cookie, NULL);
|
||||
if (reply == NULL)
|
||||
return NULL;
|
||||
buffers = xcb_dri2_get_buffers_buffers (reply);
|
||||
if (buffers == NULL)
|
||||
return NULL;
|
||||
@@ -870,7 +872,12 @@ dri2_x11_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
|
||||
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
|
||||
|
||||
if (dri2_dpy->dri2) {
|
||||
return dri2_x11_swap_buffers_msc(drv, disp, draw, 0, 0, 0) != -1;
|
||||
if (dri2_x11_swap_buffers_msc(drv, disp, draw, 0, 0, 0) != -1) {
|
||||
return EGL_TRUE;
|
||||
}
|
||||
/* Swap failed with a window drawable. */
|
||||
_eglError(EGL_BAD_NATIVE_WINDOW, __FUNCTION__);
|
||||
return EGL_FALSE;
|
||||
} else {
|
||||
assert(dri2_dpy->swrast);
|
||||
|
||||
@@ -999,6 +1006,9 @@ dri2_create_image_khr_pixmap(_EGLDisplay *disp, _EGLContext *ctx,
|
||||
geometry_cookie = xcb_get_geometry (dri2_dpy->conn, drawable);
|
||||
buffers_reply = xcb_dri2_get_buffers_reply (dri2_dpy->conn,
|
||||
buffers_cookie, NULL);
|
||||
if (buffers_reply == NULL)
|
||||
return NULL;
|
||||
|
||||
buffers = xcb_dri2_get_buffers_buffers (buffers_reply);
|
||||
if (buffers == NULL) {
|
||||
return NULL;
|
||||
|
@@ -1555,8 +1555,14 @@ eglGetSyncAttrib(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *valu
|
||||
static EGLBoolean EGLAPIENTRY
|
||||
eglGetSyncAttribKHR(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLint *value)
|
||||
{
|
||||
EGLAttrib attrib = *value;
|
||||
EGLBoolean result = eglGetSyncAttrib(dpy, sync, attribute, &attrib);
|
||||
EGLAttrib attrib;
|
||||
EGLBoolean result;
|
||||
|
||||
if (!value)
|
||||
RETURN_EGL_ERROR(NULL, EGL_BAD_PARAMETER, EGL_FALSE);
|
||||
|
||||
attrib = *value;
|
||||
result = eglGetSyncAttrib(dpy, sync, attribute, &attrib);
|
||||
|
||||
/* The EGL_KHR_fence_sync spec says this about eglGetSyncAttribKHR:
|
||||
*
|
||||
|
@@ -44,7 +44,6 @@
|
||||
#include "egllog.h"
|
||||
|
||||
|
||||
#define MIN2(A, B) (((A) < (B)) ? (A) : (B))
|
||||
|
||||
|
||||
/**
|
||||
|
@@ -40,9 +40,16 @@ extern "C" {
|
||||
|
||||
#define _EGL_MAX_EXTENSIONS_LEN 1000
|
||||
|
||||
/* Hardcoded, conservative default for EGL_LARGEST_PBUFFER,
|
||||
* this is used to implement EGL_LARGEST_PBUFFER.
|
||||
*/
|
||||
#define _EGL_MAX_PBUFFER_WIDTH 4096
|
||||
#define _EGL_MAX_PBUFFER_HEIGHT 4096
|
||||
|
||||
#define _EGL_VENDOR_STRING "Mesa Project"
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
||||
#define MIN2(A, B) (((A) < (B)) ? (A) : (B))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -307,6 +307,12 @@ _eglInitSurface(_EGLSurface *surf, _EGLDisplay *dpy, EGLint type,
|
||||
if (err != EGL_SUCCESS)
|
||||
return _eglError(err, func);
|
||||
|
||||
/* if EGL_LARGEST_PBUFFER in use, clamp width and height */
|
||||
if (surf->LargestPbuffer) {
|
||||
surf->Width = MIN2(surf->Width, _EGL_MAX_PBUFFER_WIDTH);
|
||||
surf->Height = MIN2(surf->Height, _EGL_MAX_PBUFFER_HEIGHT);
|
||||
}
|
||||
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
|
@@ -144,9 +144,6 @@ EGLBoolean
|
||||
_eglGetSyncAttrib(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
|
||||
EGLint attribute, EGLAttrib *value)
|
||||
{
|
||||
if (!value)
|
||||
return _eglError(EGL_BAD_PARAMETER, "eglGetSyncAttribKHR");
|
||||
|
||||
switch (attribute) {
|
||||
case EGL_SYNC_TYPE_KHR:
|
||||
*value = sync->Type;
|
||||
|
@@ -108,11 +108,11 @@ emit_segment(struct draw_stage *stage, struct prim_header *header,
|
||||
}
|
||||
|
||||
|
||||
static inline unsigned
|
||||
static inline bool
|
||||
stipple_test(int counter, ushort pattern, int factor)
|
||||
{
|
||||
int b = (counter / factor) & 0xf;
|
||||
return (1 << b) & pattern;
|
||||
return !!((1 << b) & pattern);
|
||||
}
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ stipple_line(struct draw_stage *stage, struct prim_header *header)
|
||||
const float *pos0 = v0->data[pos];
|
||||
const float *pos1 = v1->data[pos];
|
||||
float start = 0;
|
||||
int state = 0;
|
||||
bool state = 0;
|
||||
|
||||
float x0 = pos0[0];
|
||||
float x1 = pos1[0];
|
||||
@@ -143,29 +143,29 @@ stipple_line(struct draw_stage *stage, struct prim_header *header)
|
||||
stipple->counter = 0;
|
||||
|
||||
|
||||
/* XXX ToDo: intead of iterating pixel-by-pixel, use a look-up table.
|
||||
/* XXX ToDo: instead of iterating pixel-by-pixel, use a look-up table.
|
||||
*/
|
||||
for (i = 0; i < length; i++) {
|
||||
int result = stipple_test( (int) stipple->counter+i,
|
||||
(ushort) stipple->pattern, stipple->factor );
|
||||
bool result = stipple_test((int)stipple->counter + i,
|
||||
(ushort)stipple->pattern, stipple->factor);
|
||||
if (result != state) {
|
||||
/* changing from "off" to "on" or vice versa */
|
||||
if (state) {
|
||||
if (start != i) {
|
||||
if (state) {
|
||||
if (start != i) {
|
||||
/* finishing an "on" segment */
|
||||
emit_segment( stage, header, start / length, i / length );
|
||||
emit_segment(stage, header, start / length, i / length);
|
||||
}
|
||||
}
|
||||
else {
|
||||
}
|
||||
else {
|
||||
/* starting an "on" segment */
|
||||
start = (float) i;
|
||||
}
|
||||
state = result;
|
||||
start = (float)i;
|
||||
}
|
||||
state = result;
|
||||
}
|
||||
}
|
||||
|
||||
if (state && start < length)
|
||||
emit_segment( stage, header, start / length, 1.0 );
|
||||
emit_segment(stage, header, start / length, 1.0);
|
||||
|
||||
stipple->counter += length;
|
||||
}
|
||||
|
@@ -461,50 +461,49 @@ lp_build_pack2(struct gallivm_state *gallivm,
|
||||
assert(src_type.length * 2 == dst_type.length);
|
||||
|
||||
/* Check for special cases first */
|
||||
if((util_cpu_caps.has_sse2 || util_cpu_caps.has_altivec) &&
|
||||
src_type.width * src_type.length >= 128) {
|
||||
if ((util_cpu_caps.has_sse2 || util_cpu_caps.has_altivec) &&
|
||||
src_type.width * src_type.length >= 128) {
|
||||
const char *intrinsic = NULL;
|
||||
boolean swap_intrinsic_operands = FALSE;
|
||||
|
||||
switch(src_type.width) {
|
||||
case 32:
|
||||
if (util_cpu_caps.has_sse2) {
|
||||
if(dst_type.sign) {
|
||||
if (dst_type.sign) {
|
||||
intrinsic = "llvm.x86.sse2.packssdw.128";
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if (util_cpu_caps.has_sse4_1) {
|
||||
intrinsic = "llvm.x86.sse41.packusdw";
|
||||
}
|
||||
}
|
||||
} else if (util_cpu_caps.has_altivec) {
|
||||
if (dst_type.sign) {
|
||||
intrinsic = "llvm.ppc.altivec.vpkswus";
|
||||
} else {
|
||||
intrinsic = "llvm.ppc.altivec.vpkuwus";
|
||||
}
|
||||
intrinsic = "llvm.ppc.altivec.vpkswss";
|
||||
} else {
|
||||
intrinsic = "llvm.ppc.altivec.vpkuwus";
|
||||
}
|
||||
#ifdef PIPE_ARCH_LITTLE_ENDIAN
|
||||
swap_intrinsic_operands = TRUE;
|
||||
swap_intrinsic_operands = TRUE;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case 16:
|
||||
if (dst_type.sign) {
|
||||
if (util_cpu_caps.has_sse2) {
|
||||
intrinsic = "llvm.x86.sse2.packsswb.128";
|
||||
intrinsic = "llvm.x86.sse2.packsswb.128";
|
||||
} else if (util_cpu_caps.has_altivec) {
|
||||
intrinsic = "llvm.ppc.altivec.vpkshss";
|
||||
intrinsic = "llvm.ppc.altivec.vpkshss";
|
||||
#ifdef PIPE_ARCH_LITTLE_ENDIAN
|
||||
swap_intrinsic_operands = TRUE;
|
||||
swap_intrinsic_operands = TRUE;
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
if (util_cpu_caps.has_sse2) {
|
||||
intrinsic = "llvm.x86.sse2.packuswb.128";
|
||||
intrinsic = "llvm.x86.sse2.packuswb.128";
|
||||
} else if (util_cpu_caps.has_altivec) {
|
||||
intrinsic = "llvm.ppc.altivec.vpkshus";
|
||||
intrinsic = "llvm.ppc.altivec.vpkshus";
|
||||
#ifdef PIPE_ARCH_LITTLE_ENDIAN
|
||||
swap_intrinsic_operands = TRUE;
|
||||
swap_intrinsic_operands = TRUE;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@@ -32,8 +32,8 @@ LOCAL_SRC_FILES := \
|
||||
$(a4xx_SOURCES) \
|
||||
$(ir3_SOURCES)
|
||||
|
||||
LOCAL_CFLAGS := \
|
||||
-Wno-packed-bitfield-compat
|
||||
#LOCAL_CFLAGS := \
|
||||
# -Wno-packed-bitfield-compat
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(LOCAL_PATH)/ir3
|
||||
|
@@ -910,7 +910,9 @@ lp_rast_create( unsigned num_threads )
|
||||
create_rast_threads(rast);
|
||||
|
||||
/* for synchronizing rasterization threads */
|
||||
pipe_barrier_init( &rast->barrier, rast->num_threads );
|
||||
if (rast->num_threads > 0) {
|
||||
pipe_barrier_init( &rast->barrier, rast->num_threads );
|
||||
}
|
||||
|
||||
memset(lp_dummy_tile, 0, sizeof lp_dummy_tile);
|
||||
|
||||
@@ -967,7 +969,9 @@ void lp_rast_destroy( struct lp_rasterizer *rast )
|
||||
}
|
||||
|
||||
/* for synchronizing rasterization threads */
|
||||
pipe_barrier_destroy( &rast->barrier );
|
||||
if (rast->num_threads > 0) {
|
||||
pipe_barrier_destroy( &rast->barrier );
|
||||
}
|
||||
|
||||
lp_scene_queue_destroy(rast->full_scenes);
|
||||
|
||||
|
@@ -1232,7 +1232,7 @@ CodeEmitterGK110::emitQUADOP(const Instruction *i, uint8_t qOp, uint8_t laneMask
|
||||
|
||||
defId(i->def(0), 2);
|
||||
srcId(i->src(0), 10);
|
||||
srcId(i->srcExists(1) ? i->src(1) : i->src(0), 23);
|
||||
srcId((i->srcExists(1) && i->predSrc != 1) ? i->src(1) : i->src(0), 23);
|
||||
|
||||
if (i->op == OP_QUADOP && progType != Program::TYPE_FRAGMENT)
|
||||
code[1] |= 1 << 9; // dall
|
||||
@@ -1825,10 +1825,16 @@ CodeEmitterGK110::emitInstruction(Instruction *insn)
|
||||
case OP_CEIL:
|
||||
case OP_FLOOR:
|
||||
case OP_TRUNC:
|
||||
case OP_CVT:
|
||||
case OP_SAT:
|
||||
emitCVT(insn);
|
||||
break;
|
||||
case OP_CVT:
|
||||
if (insn->def(0).getFile() == FILE_PREDICATE ||
|
||||
insn->src(0).getFile() == FILE_PREDICATE)
|
||||
emitMOV(insn);
|
||||
else
|
||||
emitCVT(insn);
|
||||
break;
|
||||
case OP_RSQ:
|
||||
emitSFnOp(insn, 5 + 2 * insn->subOp);
|
||||
break;
|
||||
|
@@ -671,7 +671,12 @@ CodeEmitterGM107::emitMOV()
|
||||
(insn->sType != TYPE_F32 && !longIMMD(insn->src(0)))) {
|
||||
switch (insn->src(0).getFile()) {
|
||||
case FILE_GPR:
|
||||
emitInsn(0x5c980000);
|
||||
if (insn->def(0).getFile() == FILE_PREDICATE) {
|
||||
emitInsn(0x5b6a0000);
|
||||
emitGPR (0x08);
|
||||
} else {
|
||||
emitInsn(0x5c980000);
|
||||
}
|
||||
emitGPR (0x14, insn->src(0));
|
||||
break;
|
||||
case FILE_MEMORY_CONST:
|
||||
@@ -682,18 +687,32 @@ CodeEmitterGM107::emitMOV()
|
||||
emitInsn(0x38980000);
|
||||
emitIMMD(0x14, 19, insn->src(0));
|
||||
break;
|
||||
case FILE_PREDICATE:
|
||||
emitInsn(0x50880000);
|
||||
emitPRED(0x0c, insn->src(0));
|
||||
emitPRED(0x1d);
|
||||
emitPRED(0x27);
|
||||
break;
|
||||
default:
|
||||
assert(!"bad src file");
|
||||
break;
|
||||
}
|
||||
emitField(0x27, 4, insn->lanes);
|
||||
if (insn->def(0).getFile() != FILE_PREDICATE &&
|
||||
insn->src(0).getFile() != FILE_PREDICATE)
|
||||
emitField(0x27, 4, insn->lanes);
|
||||
} else {
|
||||
emitInsn (0x01000000);
|
||||
emitIMMD (0x14, 32, insn->src(0));
|
||||
emitField(0x0c, 4, insn->lanes);
|
||||
}
|
||||
|
||||
emitGPR(0x00, insn->def(0));
|
||||
if (insn->def(0).getFile() == FILE_PREDICATE) {
|
||||
emitPRED(0x27);
|
||||
emitPRED(0x03, insn->def(0));
|
||||
emitPRED(0x00);
|
||||
} else {
|
||||
emitGPR(0x00, insn->def(0));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1509,7 +1528,10 @@ CodeEmitterGM107::emitFSWZADD()
|
||||
emitRND (0x27);
|
||||
emitField(0x26, 1, insn->lanes); /* abused for .ndv */
|
||||
emitField(0x1c, 8, insn->subOp);
|
||||
emitGPR (0x14, insn->src(1));
|
||||
if (insn->predSrc != 1)
|
||||
emitGPR (0x14, insn->src(1));
|
||||
else
|
||||
emitGPR (0x14);
|
||||
emitGPR (0x08, insn->src(0));
|
||||
emitGPR (0x00, insn->def(0));
|
||||
}
|
||||
@@ -2631,11 +2653,7 @@ CodeEmitterGM107::emitInstruction(Instruction *i)
|
||||
emitRAM();
|
||||
break;
|
||||
case OP_MOV:
|
||||
if (insn->def(0).getFile() == FILE_GPR &&
|
||||
insn->src(0).getFile() != FILE_PREDICATE)
|
||||
emitMOV();
|
||||
else
|
||||
assert(!"R2P/P2R");
|
||||
emitMOV();
|
||||
break;
|
||||
case OP_RDSV:
|
||||
emitS2R();
|
||||
@@ -2647,7 +2665,10 @@ CodeEmitterGM107::emitInstruction(Instruction *i)
|
||||
case OP_CEIL:
|
||||
case OP_TRUNC:
|
||||
case OP_CVT:
|
||||
if (isFloatType(insn->dType)) {
|
||||
if (insn->op == OP_CVT && (insn->def(0).getFile() == FILE_PREDICATE ||
|
||||
insn->src(0).getFile() == FILE_PREDICATE)) {
|
||||
emitMOV();
|
||||
} else if (isFloatType(insn->dType)) {
|
||||
if (isFloatType(insn->sType))
|
||||
emitF2F();
|
||||
else
|
||||
|
@@ -527,7 +527,8 @@ CodeEmitterNV50::emitForm_ADD(const Instruction *i)
|
||||
|
||||
setSrcFileBits(i, NV50_OP_ENC_LONG_ALT);
|
||||
setSrc(i, 0, 0);
|
||||
setSrc(i, 1, 2);
|
||||
if (i->predSrc != 1)
|
||||
setSrc(i, 1, 2);
|
||||
|
||||
if (i->getIndirect(0, 0)) {
|
||||
assert(!i->getIndirect(1, 0));
|
||||
@@ -839,7 +840,7 @@ CodeEmitterNV50::emitQUADOP(const Instruction *i, uint8_t lane, uint8_t quOp)
|
||||
|
||||
emitForm_ADD(i);
|
||||
|
||||
if (!i->srcExists(1))
|
||||
if (!i->srcExists(1) || i->predSrc == 1)
|
||||
srcId(i->src(0), 32 + 14);
|
||||
}
|
||||
|
||||
@@ -1608,7 +1609,9 @@ CodeEmitterNV50::emitTEX(const TexInstruction *i)
|
||||
code[1] |= (i->tex.mask & 0xc) << 12;
|
||||
|
||||
if (i->tex.liveOnly)
|
||||
code[1] |= 4;
|
||||
code[1] |= 1 << 2;
|
||||
if (i->tex.derivAll)
|
||||
code[1] |= 1 << 3;
|
||||
|
||||
defId(i->def(0), 2);
|
||||
|
||||
|
@@ -1331,7 +1331,7 @@ CodeEmitterNVC0::emitQUADOP(const Instruction *i, uint8_t qOp, uint8_t laneMask)
|
||||
|
||||
defId(i->def(0), 14);
|
||||
srcId(i->src(0), 20);
|
||||
srcId(i->srcExists(1) ? i->src(1) : i->src(0), 26);
|
||||
srcId((i->srcExists(1) && i->predSrc != 1) ? i->src(1) : i->src(0), 26);
|
||||
|
||||
if (i->op == OP_QUADOP && progType != Program::TYPE_FRAGMENT)
|
||||
code[0] |= 1 << 9; // dall
|
||||
@@ -2430,10 +2430,16 @@ CodeEmitterNVC0::emitInstruction(Instruction *insn)
|
||||
case OP_CEIL:
|
||||
case OP_FLOOR:
|
||||
case OP_TRUNC:
|
||||
case OP_CVT:
|
||||
case OP_SAT:
|
||||
emitCVT(insn);
|
||||
break;
|
||||
case OP_CVT:
|
||||
if (insn->def(0).getFile() == FILE_PREDICATE ||
|
||||
insn->src(0).getFile() == FILE_PREDICATE)
|
||||
emitMOV(insn);
|
||||
else
|
||||
emitCVT(insn);
|
||||
break;
|
||||
case OP_RSQ:
|
||||
emitSFnOp(insn, 5 + 2 * insn->subOp);
|
||||
break;
|
||||
|
@@ -354,7 +354,8 @@ NV50LegalizeSSA::propagateWriteToOutput(Instruction *st)
|
||||
return;
|
||||
|
||||
for (int s = 0; di->srcExists(s); ++s)
|
||||
if (di->src(s).getFile() == FILE_IMMEDIATE)
|
||||
if (di->src(s).getFile() == FILE_IMMEDIATE ||
|
||||
di->src(s).getFile() == FILE_MEMORY_LOCAL)
|
||||
return;
|
||||
|
||||
if (prog->getType() == Program::TYPE_GEOMETRY) {
|
||||
@@ -916,6 +917,7 @@ NV50LoweringPreSSA::handleTXD(TexInstruction *i)
|
||||
|
||||
handleTEX(i);
|
||||
i->op = OP_TEX; // no need to clone dPdx/dPdy later
|
||||
i->tex.derivAll = true;
|
||||
|
||||
for (c = 0; c < dim; ++c)
|
||||
crd[c] = bld.getScratch();
|
||||
|
@@ -722,9 +722,13 @@ NVC0LoweringPass::handleTEX(TexInstruction *i)
|
||||
}
|
||||
|
||||
Value *arrayIndex = i->tex.target.isArray() ? i->getSrc(lyr) : NULL;
|
||||
for (int s = dim; s >= 1; --s)
|
||||
i->setSrc(s, i->getSrc(s - 1));
|
||||
i->setSrc(0, arrayIndex);
|
||||
if (arrayIndex) {
|
||||
for (int s = dim; s >= 1; --s)
|
||||
i->setSrc(s, i->getSrc(s - 1));
|
||||
i->setSrc(0, arrayIndex);
|
||||
} else {
|
||||
i->moveSources(0, 1);
|
||||
}
|
||||
|
||||
if (arrayIndex) {
|
||||
int sat = (i->op == OP_TXF) ? 1 : 0;
|
||||
@@ -846,7 +850,17 @@ NVC0LoweringPass::handleManualTXD(TexInstruction *i)
|
||||
Value *zero = bld.loadImm(bld.getSSA(), 0);
|
||||
int l, c;
|
||||
const int dim = i->tex.target.getDim();
|
||||
const int array = i->tex.target.isArray();
|
||||
|
||||
// This function is invoked after handleTEX lowering, so we have to expect
|
||||
// the arguments in the order that the hw wants them. For Fermi, array and
|
||||
// indirect are both in the leading arg, while for Kepler, array and
|
||||
// indirect are separate (and both precede the coordinates). Maxwell is
|
||||
// handled in a separate function.
|
||||
unsigned array;
|
||||
if (targ->getChipset() < NVISA_GK104_CHIPSET)
|
||||
array = i->tex.target.isArray() || i->tex.rIndirectSrc >= 0;
|
||||
else
|
||||
array = i->tex.target.isArray() + (i->tex.rIndirectSrc >= 0);
|
||||
|
||||
i->op = OP_TEX; // no need to clone dPdx/dPdy later
|
||||
|
||||
|
@@ -120,7 +120,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
||||
case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
|
||||
return 256;
|
||||
case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
|
||||
return 1; /* 256 for binding as RT, but that's not possible in GL */
|
||||
return 16; /* 256 for binding as RT, but that's not possible in GL */
|
||||
case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
|
||||
return NOUVEAU_MIN_BUFFER_MAP_ALIGN;
|
||||
case PIPE_CAP_MAX_VIEWPORTS:
|
||||
|
@@ -633,8 +633,6 @@ nv50_stream_output_validate(struct nv50_context *nv50)
|
||||
BEGIN_NV04(push, NV50_3D(STRMOUT_BUFFERS_CTRL), 1);
|
||||
PUSH_DATA (push, ctrl);
|
||||
|
||||
nouveau_bufctx_reset(nv50->bufctx_3d, NV50_BIND_SO);
|
||||
|
||||
for (i = 0; i < nv50->num_so_targets; ++i) {
|
||||
struct nv50_so_target *targ = nv50_so_target(nv50->so_target[i]);
|
||||
struct nv04_resource *buf = nv04_resource(targ->pipe.buffer);
|
||||
|
@@ -1158,8 +1158,10 @@ nv50_set_stream_output_targets(struct pipe_context *pipe,
|
||||
}
|
||||
nv50->num_so_targets = num_targets;
|
||||
|
||||
if (nv50->so_targets_dirty)
|
||||
if (nv50->so_targets_dirty) {
|
||||
nouveau_bufctx_reset(nv50->bufctx_3d, NV50_BIND_SO);
|
||||
nv50->dirty |= NV50_NEW_STRMOUT;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -109,7 +109,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
||||
case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
|
||||
return 256;
|
||||
case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
|
||||
return 1; /* 256 for binding as RT, but that's not possible in GL */
|
||||
return 16; /* 256 for binding as RT, but that's not possible in GL */
|
||||
case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
|
||||
return NOUVEAU_MIN_BUFFER_MAP_ALIGN;
|
||||
case PIPE_CAP_MAX_VIEWPORTS:
|
||||
|
@@ -297,7 +297,6 @@ nvc0_tfb_validate(struct nvc0_context *nvc0)
|
||||
|
||||
if (!(nvc0->dirty & NVC0_NEW_TFB_TARGETS))
|
||||
return;
|
||||
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_TFB);
|
||||
|
||||
for (b = 0; b < nvc0->num_tfbbufs; ++b) {
|
||||
struct nvc0_so_target *targ = nvc0_so_target(nvc0->tfbbuf[b]);
|
||||
|
@@ -413,7 +413,7 @@ nvc0_sampler_state_delete(struct pipe_context *pipe, void *hwcso)
|
||||
{
|
||||
unsigned s, i;
|
||||
|
||||
for (s = 0; s < 5; ++s)
|
||||
for (s = 0; s < 6; ++s)
|
||||
for (i = 0; i < nvc0_context(pipe)->num_samplers[s]; ++i)
|
||||
if (nvc0_context(pipe)->samplers[s][i] == hwcso)
|
||||
nvc0_context(pipe)->samplers[s][i] = NULL;
|
||||
@@ -1157,8 +1157,10 @@ nvc0_set_transform_feedback_targets(struct pipe_context *pipe,
|
||||
}
|
||||
nvc0->num_tfbbufs = num_targets;
|
||||
|
||||
if (nvc0->tfbbuf_dirty)
|
||||
if (nvc0->tfbbuf_dirty) {
|
||||
nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_TFB);
|
||||
nvc0->dirty |= NVC0_NEW_TFB_TARGETS;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@@ -1195,8 +1195,8 @@ nvc0_blit_3d(struct nvc0_context *nvc0, const struct pipe_blit_info *info)
|
||||
x0 = (float)info->src.box.x - x_range * (float)info->dst.box.x;
|
||||
y0 = (float)info->src.box.y - y_range * (float)info->dst.box.y;
|
||||
|
||||
x1 = x0 + 16384.0f * x_range;
|
||||
y1 = y0 + 16384.0f * y_range;
|
||||
x1 = x0 + 32768.0f * x_range;
|
||||
y1 = y0 + 32768.0f * y_range;
|
||||
|
||||
x0 *= (float)(1 << nv50_miptree(src)->ms_x);
|
||||
x1 *= (float)(1 << nv50_miptree(src)->ms_x);
|
||||
@@ -1294,6 +1294,17 @@ nvc0_blit_3d(struct nvc0_context *nvc0, const struct pipe_blit_info *info)
|
||||
}
|
||||
nvc0->state.num_vtxelts = 2;
|
||||
|
||||
if (nvc0->state.prim_restart) {
|
||||
IMMED_NVC0(push, NVC0_3D(PRIM_RESTART_ENABLE), 0);
|
||||
nvc0->state.prim_restart = 0;
|
||||
}
|
||||
|
||||
if (nvc0->state.index_bias) {
|
||||
IMMED_NVC0(push, NVC0_3D(VB_ELEMENT_BASE), 0);
|
||||
IMMED_NVC0(push, NVC0_3D(VERTEX_ID_BASE), 0);
|
||||
nvc0->state.index_bias = 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < info->dst.box.depth; ++i, z += dz) {
|
||||
if (info->dst.box.z + i) {
|
||||
BEGIN_NVC0(push, NVC0_3D(LAYER), 1);
|
||||
@@ -1306,14 +1317,14 @@ nvc0_blit_3d(struct nvc0_context *nvc0, const struct pipe_blit_info *info)
|
||||
*(vbuf++) = fui(y0);
|
||||
*(vbuf++) = fui(z);
|
||||
|
||||
*(vbuf++) = fui(16384 << nv50_miptree(dst)->ms_x);
|
||||
*(vbuf++) = fui(32768 << nv50_miptree(dst)->ms_x);
|
||||
*(vbuf++) = fui(0.0f);
|
||||
*(vbuf++) = fui(x1);
|
||||
*(vbuf++) = fui(y0);
|
||||
*(vbuf++) = fui(z);
|
||||
|
||||
*(vbuf++) = fui(0.0f);
|
||||
*(vbuf++) = fui(16384 << nv50_miptree(dst)->ms_y);
|
||||
*(vbuf++) = fui(32768 << nv50_miptree(dst)->ms_y);
|
||||
*(vbuf++) = fui(x0);
|
||||
*(vbuf++) = fui(y1);
|
||||
*(vbuf++) = fui(z);
|
||||
|
@@ -379,7 +379,7 @@ nvc0_validate_vertex_buffers_shared(struct nvc0_context *nvc0)
|
||||
unsigned b;
|
||||
const uint32_t mask = nvc0->vbo_user;
|
||||
|
||||
PUSH_SPACE(push, nvc0->num_vtxbufs * 8);
|
||||
PUSH_SPACE(push, nvc0->num_vtxbufs * 8 + nvc0->vertex->num_elements);
|
||||
for (b = 0; b < nvc0->num_vtxbufs; ++b) {
|
||||
struct pipe_vertex_buffer *vb = &nvc0->vtxbuf[b];
|
||||
struct nv04_resource *buf;
|
||||
@@ -414,6 +414,7 @@ nvc0_validate_vertex_buffers_shared(struct nvc0_context *nvc0)
|
||||
/* If there are more elements than buffers, we might not have unset
|
||||
* fetching on the later elements.
|
||||
*/
|
||||
PUSH_SPACE(push, nvc0->vertex->num_elements - b);
|
||||
for (; b < nvc0->vertex->num_elements; ++b)
|
||||
IMMED_NVC0(push, NVC0_3D(VERTEX_ARRAY_FETCH(b)), 0);
|
||||
|
||||
@@ -687,7 +688,7 @@ nvc0_draw_elements_inline_u32_short(struct nouveau_pushbuf *push,
|
||||
|
||||
if (count & 1) {
|
||||
count--;
|
||||
PUSH_SPACE(push, 1);
|
||||
PUSH_SPACE(push, 2);
|
||||
BEGIN_NVC0(push, NVC0_3D(VB_ELEMENT_U32), 1);
|
||||
PUSH_DATA (push, *map++);
|
||||
}
|
||||
@@ -817,6 +818,8 @@ nvc0_draw_indirect(struct nvc0_context *nvc0, const struct pipe_draw_info *info)
|
||||
unsigned size;
|
||||
const uint32_t offset = buf->offset + info->indirect_offset;
|
||||
|
||||
PUSH_SPACE(push, 7);
|
||||
|
||||
/* must make FIFO wait for engines idle before continuing to process */
|
||||
if (buf->fence_wr && !nouveau_fence_signalled(buf->fence_wr))
|
||||
IMMED_NVC0(push, SUBC_3D(NV10_SUBCHAN_REF_CNT), 0);
|
||||
@@ -901,6 +904,7 @@ nvc0_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
|
||||
if (info->mode == PIPE_PRIM_PATCHES &&
|
||||
nvc0->state.patch_vertices != info->vertices_per_patch) {
|
||||
nvc0->state.patch_vertices = info->vertices_per_patch;
|
||||
PUSH_SPACE(push, 1);
|
||||
IMMED_NVC0(push, NVC0_3D(PATCH_VERTICES), nvc0->state.patch_vertices);
|
||||
}
|
||||
|
||||
@@ -933,11 +937,14 @@ nvc0_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
|
||||
}
|
||||
|
||||
if (nvc0->cb_dirty) {
|
||||
PUSH_SPACE(push, 1);
|
||||
IMMED_NVC0(push, NVC0_3D(MEM_BARRIER), 0x1011);
|
||||
nvc0->cb_dirty = false;
|
||||
}
|
||||
|
||||
for (s = 0; s < 5; ++s) {
|
||||
PUSH_SPACE(push, nvc0->num_textures[s] * 2);
|
||||
|
||||
for (int i = 0; i < nvc0->num_textures[s]; ++i) {
|
||||
struct nv50_tic_entry *tic = nv50_tic_entry(nvc0->textures[s][i]);
|
||||
struct pipe_resource *res;
|
||||
|
@@ -962,13 +962,6 @@ void evergreen_init_color_surface_rat(struct r600_context *rctx,
|
||||
MAX2(64, rctx->screen->b.tiling_info.group_bytes / block_size);
|
||||
unsigned pitch = align(pipe_buffer->width0, pitch_alignment);
|
||||
|
||||
/* XXX: This is copied from evergreen_init_color_surface(). I don't
|
||||
* know why this is necessary.
|
||||
*/
|
||||
if (pipe_buffer->usage == PIPE_USAGE_STAGING) {
|
||||
endian = ENDIAN_NONE;
|
||||
}
|
||||
|
||||
surf->cb_color_base = r600_resource(pipe_buffer)->gpu_address >> 8;
|
||||
|
||||
surf->cb_color_pitch = (pitch / 8) - 1;
|
||||
@@ -1119,11 +1112,7 @@ void evergreen_init_color_surface(struct r600_context *rctx,
|
||||
swap = r600_translate_colorswap(surf->base.format);
|
||||
assert(swap != ~0);
|
||||
|
||||
if (rtex->resource.b.b.usage == PIPE_USAGE_STAGING) {
|
||||
endian = ENDIAN_NONE;
|
||||
} else {
|
||||
endian = r600_colorformat_endian_swap(format);
|
||||
}
|
||||
endian = r600_colorformat_endian_swap(format);
|
||||
|
||||
/* blend clamp should be set for all NORM/SRGB types */
|
||||
if (ntype == V_028C70_NUMBER_UNORM || ntype == V_028C70_NUMBER_SNORM ||
|
||||
|
@@ -102,13 +102,13 @@ enum alu_op_flags
|
||||
|
||||
/* condition codes - 3 bits */
|
||||
AF_CC_SHIFT = 29,
|
||||
AF_CC_MASK = (7 << AF_CC_SHIFT),
|
||||
AF_CC_E = (0 << AF_CC_SHIFT),
|
||||
AF_CC_GT = (1 << AF_CC_SHIFT),
|
||||
AF_CC_GE = (2 << AF_CC_SHIFT),
|
||||
AF_CC_NE = (3 << AF_CC_SHIFT),
|
||||
AF_CC_LT = (4 << AF_CC_SHIFT),
|
||||
AF_CC_LE = (5 << AF_CC_SHIFT),
|
||||
AF_CC_MASK = (7U << AF_CC_SHIFT),
|
||||
AF_CC_E = (0U << AF_CC_SHIFT),
|
||||
AF_CC_GT = (1U << AF_CC_SHIFT),
|
||||
AF_CC_GE = (2U << AF_CC_SHIFT),
|
||||
AF_CC_NE = (3U << AF_CC_SHIFT),
|
||||
AF_CC_LT = (4U << AF_CC_SHIFT),
|
||||
AF_CC_LE = (5U << AF_CC_SHIFT),
|
||||
};
|
||||
|
||||
/* flags for FETCH instructions (TEX/VTX) */
|
||||
@@ -165,7 +165,7 @@ struct alu_op_info
|
||||
* (0 if instruction doesn't exist for chip class) */
|
||||
int slots[4];
|
||||
/* flags (mostly autogenerated from instruction name) */
|
||||
int flags;
|
||||
unsigned int flags;
|
||||
};
|
||||
|
||||
/* FETCH instruction info */
|
||||
|
@@ -930,11 +930,7 @@ static void r600_init_color_surface(struct r600_context *rctx,
|
||||
swap = r600_translate_colorswap(surf->base.format);
|
||||
assert(swap != ~0);
|
||||
|
||||
if (rtex->resource.b.b.usage == PIPE_USAGE_STAGING) {
|
||||
endian = ENDIAN_NONE;
|
||||
} else {
|
||||
endian = r600_colorformat_endian_swap(format);
|
||||
}
|
||||
endian = r600_colorformat_endian_swap(format);
|
||||
|
||||
/* set blend bypass according to docs if SINT/UINT or
|
||||
8/24 COLOR variants */
|
||||
|
@@ -643,21 +643,21 @@ static void r600_set_sampler_views(struct pipe_context *pipe, unsigned shader,
|
||||
if (rviews[i]) {
|
||||
struct r600_texture *rtex =
|
||||
(struct r600_texture*)rviews[i]->base.texture;
|
||||
bool is_buffer = rviews[i]->base.texture->target == PIPE_BUFFER;
|
||||
|
||||
if (rviews[i]->base.texture->target != PIPE_BUFFER) {
|
||||
if (rtex->is_depth && !rtex->is_flushing_texture) {
|
||||
dst->views.compressed_depthtex_mask |= 1 << i;
|
||||
} else {
|
||||
dst->views.compressed_depthtex_mask &= ~(1 << i);
|
||||
}
|
||||
|
||||
/* Track compressed colorbuffers. */
|
||||
if (rtex->cmask.size) {
|
||||
dst->views.compressed_colortex_mask |= 1 << i;
|
||||
} else {
|
||||
dst->views.compressed_colortex_mask &= ~(1 << i);
|
||||
}
|
||||
if (!is_buffer && rtex->is_depth && !rtex->is_flushing_texture) {
|
||||
dst->views.compressed_depthtex_mask |= 1 << i;
|
||||
} else {
|
||||
dst->views.compressed_depthtex_mask &= ~(1 << i);
|
||||
}
|
||||
|
||||
/* Track compressed colorbuffers. */
|
||||
if (!is_buffer && rtex->cmask.size) {
|
||||
dst->views.compressed_colortex_mask |= 1 << i;
|
||||
} else {
|
||||
dst->views.compressed_colortex_mask &= ~(1 << i);
|
||||
}
|
||||
|
||||
/* Changing from array to non-arrays textures and vice versa requires
|
||||
* updating TEX_ARRAY_OVERRIDE in sampler states on R6xx-R7xx. */
|
||||
if (rctx->b.chip_class <= R700 &&
|
||||
@@ -2517,6 +2517,13 @@ uint32_t r600_colorformat_endian_swap(uint32_t colorformat)
|
||||
|
||||
/* 32-bit buffers. */
|
||||
case V_0280A0_COLOR_8_8_8_8:
|
||||
/*
|
||||
* No need to do endian swaps on four 8-bits components,
|
||||
* as mesa<-->pipe formats conversion take into account
|
||||
* the endianess
|
||||
*/
|
||||
return ENDIAN_NONE;
|
||||
|
||||
case V_0280A0_COLOR_2_10_10_10:
|
||||
case V_0280A0_COLOR_8_24:
|
||||
case V_0280A0_COLOR_24_8:
|
||||
|
@@ -598,9 +598,13 @@ bool expr_handler::fold_assoc(alu_node *n) {
|
||||
|
||||
unsigned op = n->bc.op;
|
||||
bool allow_neg = false, cur_neg = false;
|
||||
bool distribute_neg = false;
|
||||
|
||||
switch(op) {
|
||||
case ALU_OP2_ADD:
|
||||
distribute_neg = true;
|
||||
allow_neg = true;
|
||||
break;
|
||||
case ALU_OP2_MUL:
|
||||
case ALU_OP2_MUL_IEEE:
|
||||
allow_neg = true;
|
||||
@@ -632,7 +636,7 @@ bool expr_handler::fold_assoc(alu_node *n) {
|
||||
if (v1->is_const()) {
|
||||
literal arg = v1->get_const_value();
|
||||
apply_alu_src_mod(a->bc, 1, arg);
|
||||
if (cur_neg)
|
||||
if (cur_neg && distribute_neg)
|
||||
arg.f = -arg.f;
|
||||
|
||||
if (a == n)
|
||||
@@ -660,7 +664,7 @@ bool expr_handler::fold_assoc(alu_node *n) {
|
||||
if (v0->is_const()) {
|
||||
literal arg = v0->get_const_value();
|
||||
apply_alu_src_mod(a->bc, 0, arg);
|
||||
if (cur_neg)
|
||||
if (cur_neg && distribute_neg)
|
||||
arg.f = -arg.f;
|
||||
|
||||
if (last_arg == 0) {
|
||||
|
@@ -286,7 +286,8 @@ static void *r600_buffer_transfer_map(struct pipe_context *ctx,
|
||||
usage |= PIPE_TRANSFER_UNSYNCHRONIZED;
|
||||
}
|
||||
else if ((usage & PIPE_TRANSFER_DISCARD_RANGE) &&
|
||||
!(usage & PIPE_TRANSFER_UNSYNCHRONIZED) &&
|
||||
!(usage & (PIPE_TRANSFER_UNSYNCHRONIZED |
|
||||
PIPE_TRANSFER_PERSISTENT)) &&
|
||||
!(rscreen->debug_flags & DBG_NO_DISCARD_RANGE) &&
|
||||
r600_can_dma_copy_buffer(rctx, box->x, 0, box->width)) {
|
||||
assert(usage & PIPE_TRANSFER_WRITE);
|
||||
@@ -313,7 +314,8 @@ static void *r600_buffer_transfer_map(struct pipe_context *ctx,
|
||||
}
|
||||
/* Using a staging buffer in GTT for larger reads is much faster. */
|
||||
else if ((usage & PIPE_TRANSFER_READ) &&
|
||||
!(usage & PIPE_TRANSFER_WRITE) &&
|
||||
!(usage & (PIPE_TRANSFER_WRITE |
|
||||
PIPE_TRANSFER_PERSISTENT)) &&
|
||||
rbuffer->domains == RADEON_DOMAIN_VRAM &&
|
||||
r600_can_dma_copy_buffer(rctx, 0, box->x, box->width)) {
|
||||
struct r600_resource *staging;
|
||||
|
@@ -629,7 +629,7 @@ r600_get_sampler_view_priority(struct r600_resource *res)
|
||||
} while (0);
|
||||
|
||||
#define R600_ERR(fmt, args...) \
|
||||
fprintf(stderr, "EE %s:%d %s - "fmt, __FILE__, __LINE__, __func__, ##args)
|
||||
fprintf(stderr, "EE %s:%d %s - " fmt, __FILE__, __LINE__, __func__, ##args)
|
||||
|
||||
/* For MSAA sample positions. */
|
||||
#define FILL_SREG(s0x, s0y, s1x, s1y, s2x, s2y, s3x, s3y) \
|
||||
|
@@ -529,6 +529,16 @@ static unsigned r600_texture_get_htile_size(struct r600_common_screen *rscreen,
|
||||
rscreen->info.drm_major == 2 && rscreen->info.drm_minor < 38)
|
||||
return 0;
|
||||
|
||||
/* Overalign HTILE on P2 configs to work around GPU hangs in
|
||||
* piglit/depthstencil-render-miplevels 585.
|
||||
*
|
||||
* This has been confirmed to help Kabini & Stoney, where the hangs
|
||||
* are always reproducible. I think I have seen the test hang
|
||||
* on Carrizo too, though it was very rare there.
|
||||
*/
|
||||
if (rscreen->chip_class >= CIK && num_pipes < 4)
|
||||
num_pipes = 4;
|
||||
|
||||
switch (num_pipes) {
|
||||
case 1:
|
||||
cl_width = 32;
|
||||
@@ -1219,8 +1229,8 @@ unsigned r600_translate_colorswap(enum pipe_format format)
|
||||
return V_0280A0_SWAP_STD_REV; /* WZYX */
|
||||
else if (HAS_SWIZZLE(1,Y) && HAS_SWIZZLE(2,X))
|
||||
return V_0280A0_SWAP_ALT; /* ZYXW */
|
||||
else if (HAS_SWIZZLE(1,X) && HAS_SWIZZLE(2,Y))
|
||||
return V_0280A0_SWAP_ALT_REV; /* WXYZ */
|
||||
else if (HAS_SWIZZLE(1,Z) && HAS_SWIZZLE(2,W))
|
||||
return V_0280A0_SWAP_ALT_REV; /* YZWX */
|
||||
break;
|
||||
}
|
||||
return ~0U;
|
||||
@@ -1328,6 +1338,11 @@ void evergreen_do_fast_color_clear(struct r600_common_context *rctx,
|
||||
{
|
||||
int i;
|
||||
|
||||
/* This function is broken in BE, so just disable this path for now */
|
||||
#ifdef PIPE_ARCH_BIG_ENDIAN
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (rctx->render_cond)
|
||||
return;
|
||||
|
||||
|
@@ -237,6 +237,7 @@ int rvid_get_video_param(struct pipe_screen *screen,
|
||||
case PIPE_VIDEO_CAP_SUPPORTED:
|
||||
switch (codec) {
|
||||
case PIPE_VIDEO_FORMAT_MPEG12:
|
||||
return profile != PIPE_VIDEO_PROFILE_MPEG1;
|
||||
case PIPE_VIDEO_FORMAT_MPEG4:
|
||||
case PIPE_VIDEO_FORMAT_MPEG4_AVC:
|
||||
if (rscreen->family < CHIP_PALM)
|
||||
@@ -257,7 +258,7 @@ int rvid_get_video_param(struct pipe_screen *screen,
|
||||
case PIPE_VIDEO_CAP_MAX_WIDTH:
|
||||
return (rscreen->family < CHIP_TONGA) ? 2048 : 4096;
|
||||
case PIPE_VIDEO_CAP_MAX_HEIGHT:
|
||||
return (rscreen->family < CHIP_TONGA) ? 1152 : 2304;
|
||||
return (rscreen->family < CHIP_TONGA) ? 1152 : 4096;
|
||||
case PIPE_VIDEO_CAP_PREFERED_FORMAT:
|
||||
return PIPE_FORMAT_NV12;
|
||||
case PIPE_VIDEO_CAP_PREFERS_INTERLACED:
|
||||
|
@@ -1862,11 +1862,7 @@ static void si_initialize_color_surface(struct si_context *sctx,
|
||||
}
|
||||
assert(format != V_028C70_COLOR_INVALID);
|
||||
swap = r600_translate_colorswap(surf->base.format);
|
||||
if (rtex->resource.b.b.usage == PIPE_USAGE_STAGING) {
|
||||
endian = V_028C70_ENDIAN_NONE;
|
||||
} else {
|
||||
endian = si_colorformat_endian_swap(format);
|
||||
}
|
||||
endian = si_colorformat_endian_swap(format);
|
||||
|
||||
/* blend clamp should be set for all NORM/SRGB types */
|
||||
if (ntype == V_028C70_NUMBER_UNORM ||
|
||||
|
@@ -2209,6 +2209,7 @@ img_filter_2d_ewa(const struct sp_sampler_view *sp_sview,
|
||||
const float t[TGSI_QUAD_SIZE],
|
||||
const float p[TGSI_QUAD_SIZE],
|
||||
const uint faces[TGSI_QUAD_SIZE],
|
||||
const int8_t *offset,
|
||||
unsigned level,
|
||||
const float dudx, const float dvdx,
|
||||
const float dudy, const float dvdy,
|
||||
@@ -2268,6 +2269,8 @@ img_filter_2d_ewa(const struct sp_sampler_view *sp_sview,
|
||||
/* F *= formScale; */ /* no need to scale F as we don't use it below here */
|
||||
|
||||
args.level = level;
|
||||
args.offset = offset;
|
||||
|
||||
for (j = 0; j < TGSI_QUAD_SIZE; j++) {
|
||||
/* Heckbert MS thesis, p. 59; scan over the bounding box of the ellipse
|
||||
* and incrementally update the value of Ax^2+Bxy*Cy^2; when this
|
||||
@@ -2431,6 +2434,8 @@ mip_filter_linear_aniso(const struct sp_sampler_view *sp_sview,
|
||||
const float dvdy = (t[QUAD_TOP_LEFT] - t[QUAD_BOTTOM_LEFT]) * t_to_v;
|
||||
struct img_filter_args args;
|
||||
|
||||
args.offset = filt_args->offset;
|
||||
|
||||
if (filt_args->control == TGSI_SAMPLER_LOD_BIAS ||
|
||||
filt_args->control == TGSI_SAMPLER_LOD_NONE ||
|
||||
/* XXX FIXME */
|
||||
@@ -2503,8 +2508,8 @@ mip_filter_linear_aniso(const struct sp_sampler_view *sp_sview,
|
||||
* seem to be worth the extra running time.
|
||||
*/
|
||||
img_filter_2d_ewa(sp_sview, sp_samp, min_filter, mag_filter,
|
||||
s, t, p, filt_args->faces, level0,
|
||||
dudx, dvdx, dudy, dvdy, rgba);
|
||||
s, t, p, filt_args->faces, filt_args->offset,
|
||||
level0, dudx, dvdx, dudy, dvdy, rgba);
|
||||
}
|
||||
|
||||
if (DEBUG_TEX) {
|
||||
|
@@ -41,6 +41,7 @@ libclllvm_la_CXXFLAGS = \
|
||||
$(VISIBILITY_CXXFLAGS) \
|
||||
$(LLVM_CXXFLAGS) \
|
||||
$(DEFINES) \
|
||||
$(LIBELF_CFLAGS) \
|
||||
-DLIBCLC_INCLUDEDIR=\"$(LIBCLC_INCLUDEDIR)/\" \
|
||||
-DLIBCLC_LIBEXECDIR=\"$(LIBCLC_LIBEXECDIR)/\" \
|
||||
-DCLANG_RESOURCE_DIR=\"$(CLANG_RESOURCE_DIR)\"
|
||||
|
@@ -140,7 +140,7 @@ static OMX_ERRORTYPE vid_dec_Constructor(OMX_COMPONENTTYPE *comp, OMX_STRING nam
|
||||
|
||||
r = omx_base_filter_Constructor(comp, name);
|
||||
if (r)
|
||||
return r;
|
||||
return r;
|
||||
|
||||
priv->profile = PIPE_VIDEO_PROFILE_UNKNOWN;
|
||||
|
||||
@@ -268,7 +268,7 @@ static OMX_ERRORTYPE vid_dec_SetParameter(OMX_HANDLETYPE handle, OMX_INDEXTYPE i
|
||||
r = checkHeader(param, sizeof(OMX_PARAM_COMPONENTROLETYPE));
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
|
||||
if (!strcmp((char *)role->cRole, OMX_VID_DEC_MPEG2_ROLE)) {
|
||||
priv->profile = PIPE_VIDEO_PROFILE_MPEG2_MAIN;
|
||||
} else if (!strcmp((char *)role->cRole, OMX_VID_DEC_AVC_ROLE)) {
|
||||
@@ -321,7 +321,7 @@ static OMX_ERRORTYPE vid_dec_GetParameter(OMX_HANDLETYPE handle, OMX_INDEXTYPE i
|
||||
strcpy((char *)role->cRole, OMX_VID_DEC_MPEG2_ROLE);
|
||||
else if (priv->profile == PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH)
|
||||
strcpy((char *)role->cRole, OMX_VID_DEC_AVC_ROLE);
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -419,6 +419,7 @@ static OMX_ERRORTYPE vid_dec_DecodeBuffer(omx_base_PortType *port, OMX_BUFFERHEA
|
||||
priv->in_buffers[i] = buf;
|
||||
priv->sizes[i] = buf->nFilledLen;
|
||||
priv->inputs[i] = buf->pBuffer;
|
||||
priv->timestamps[i] = buf->nTimeStamp;
|
||||
|
||||
while (priv->num_in_buffers > (!!(buf->nFlags & OMX_BUFFERFLAG_EOS) ? 0 : 1)) {
|
||||
bool eos = !!(priv->in_buffers[0]->nFlags & OMX_BUFFERFLAG_EOS);
|
||||
@@ -469,12 +470,13 @@ static OMX_ERRORTYPE vid_dec_DecodeBuffer(omx_base_PortType *port, OMX_BUFFERHEA
|
||||
priv->in_buffers[0] = priv->in_buffers[1];
|
||||
priv->sizes[0] = priv->sizes[1] - delta;
|
||||
priv->inputs[0] = priv->inputs[1] + delta;
|
||||
priv->timestamps[0] = priv->timestamps[1];
|
||||
}
|
||||
|
||||
if (r)
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
return OMX_ErrorNone;
|
||||
}
|
||||
|
||||
@@ -513,7 +515,7 @@ static void vid_dec_FillOutput(vid_dec_PrivateType *priv, struct pipe_video_buff
|
||||
|
||||
box.width = def->nFrameWidth / 2;
|
||||
box.height = def->nFrameHeight / 2;
|
||||
|
||||
|
||||
src = priv->pipe->transfer_map(priv->pipe, views[1]->texture, 0,
|
||||
PIPE_TRANSFER_READ, &box, &transfer);
|
||||
util_copy_rect(dst, views[1]->texture->format, def->nStride, 0, 0,
|
||||
@@ -526,9 +528,13 @@ static void vid_dec_FrameDecoded(OMX_COMPONENTTYPE *comp, OMX_BUFFERHEADERTYPE*
|
||||
{
|
||||
vid_dec_PrivateType *priv = comp->pComponentPrivate;
|
||||
bool eos = !!(input->nFlags & OMX_BUFFERFLAG_EOS);
|
||||
OMX_TICKS timestamp;
|
||||
|
||||
if (!input->pInputPortPrivate)
|
||||
input->pInputPortPrivate = priv->Flush(priv);
|
||||
if (!input->pInputPortPrivate) {
|
||||
input->pInputPortPrivate = priv->Flush(priv, ×tamp);
|
||||
if (timestamp != OMX_VID_DEC_TIMESTAMP_INVALID)
|
||||
input->nTimeStamp = timestamp;
|
||||
}
|
||||
|
||||
if (input->pInputPortPrivate) {
|
||||
if (output->pInputPortPrivate) {
|
||||
@@ -539,6 +545,7 @@ static void vid_dec_FrameDecoded(OMX_COMPONENTTYPE *comp, OMX_BUFFERHEADERTYPE*
|
||||
vid_dec_FillOutput(priv, input->pInputPortPrivate, output);
|
||||
}
|
||||
output->nFilledLen = output->nAllocLen;
|
||||
output->nTimeStamp = input->nTimeStamp;
|
||||
}
|
||||
|
||||
if (eos && input->pInputPortPrivate)
|
||||
|
@@ -59,6 +59,8 @@
|
||||
#define OMX_VID_DEC_AVC_NAME "OMX.mesa.video_decoder.avc"
|
||||
#define OMX_VID_DEC_AVC_ROLE "video_decoder.avc"
|
||||
|
||||
#define OMX_VID_DEC_TIMESTAMP_INVALID ((OMX_TICKS) -1)
|
||||
|
||||
struct vl_vlc;
|
||||
|
||||
DERIVEDCLASS(vid_dec_PrivateType, omx_base_filter_PrivateType)
|
||||
@@ -69,7 +71,7 @@ DERIVEDCLASS(vid_dec_PrivateType, omx_base_filter_PrivateType)
|
||||
struct pipe_video_codec *codec; \
|
||||
void (*Decode)(vid_dec_PrivateType *priv, struct vl_vlc *vlc, unsigned min_bits_left); \
|
||||
void (*EndFrame)(vid_dec_PrivateType *priv); \
|
||||
struct pipe_video_buffer *(*Flush)(vid_dec_PrivateType *priv); \
|
||||
struct pipe_video_buffer *(*Flush)(vid_dec_PrivateType *priv, OMX_TICKS *timestamp); \
|
||||
struct pipe_video_buffer *target, *shadow; \
|
||||
union { \
|
||||
struct { \
|
||||
@@ -100,6 +102,9 @@ DERIVEDCLASS(vid_dec_PrivateType, omx_base_filter_PrivateType)
|
||||
OMX_BUFFERHEADERTYPE *in_buffers[2]; \
|
||||
const void *inputs[2]; \
|
||||
unsigned sizes[2]; \
|
||||
OMX_TICKS timestamps[2]; \
|
||||
OMX_TICKS timestamp; \
|
||||
bool first_buf_in_frame; \
|
||||
bool frame_finished; \
|
||||
bool frame_started; \
|
||||
unsigned bytes_left; \
|
||||
|
@@ -45,6 +45,7 @@
|
||||
struct dpb_list {
|
||||
struct list_head list;
|
||||
struct pipe_video_buffer *buffer;
|
||||
OMX_TICKS timestamp;
|
||||
unsigned poc;
|
||||
};
|
||||
|
||||
@@ -82,7 +83,7 @@ static const uint8_t Default_8x8_Inter[64] = {
|
||||
|
||||
static void vid_dec_h264_Decode(vid_dec_PrivateType *priv, struct vl_vlc *vlc, unsigned min_bits_left);
|
||||
static void vid_dec_h264_EndFrame(vid_dec_PrivateType *priv);
|
||||
static struct pipe_video_buffer *vid_dec_h264_Flush(vid_dec_PrivateType *priv);
|
||||
static struct pipe_video_buffer *vid_dec_h264_Flush(vid_dec_PrivateType *priv, OMX_TICKS *timestamp);
|
||||
|
||||
void vid_dec_h264_Init(vid_dec_PrivateType *priv)
|
||||
{
|
||||
@@ -91,9 +92,10 @@ void vid_dec_h264_Init(vid_dec_PrivateType *priv)
|
||||
priv->Decode = vid_dec_h264_Decode;
|
||||
priv->EndFrame = vid_dec_h264_EndFrame;
|
||||
priv->Flush = vid_dec_h264_Flush;
|
||||
|
||||
|
||||
LIST_INITHEAD(&priv->codec_data.h264.dpb_list);
|
||||
priv->picture.h264.field_order_cnt[0] = priv->picture.h264.field_order_cnt[1] = INT_MAX;
|
||||
priv->first_buf_in_frame = true;
|
||||
}
|
||||
|
||||
static void vid_dec_h264_BeginFrame(vid_dec_PrivateType *priv)
|
||||
@@ -104,6 +106,9 @@ static void vid_dec_h264_BeginFrame(vid_dec_PrivateType *priv)
|
||||
return;
|
||||
|
||||
vid_dec_NeedTarget(priv);
|
||||
if (priv->first_buf_in_frame)
|
||||
priv->timestamp = priv->timestamps[0];
|
||||
priv->first_buf_in_frame = false;
|
||||
|
||||
priv->picture.h264.num_ref_frames = priv->picture.h264.pps->sps->max_num_ref_frames;
|
||||
|
||||
@@ -127,7 +132,8 @@ static void vid_dec_h264_BeginFrame(vid_dec_PrivateType *priv)
|
||||
priv->frame_started = true;
|
||||
}
|
||||
|
||||
static struct pipe_video_buffer *vid_dec_h264_Flush(vid_dec_PrivateType *priv)
|
||||
static struct pipe_video_buffer *vid_dec_h264_Flush(vid_dec_PrivateType *priv,
|
||||
OMX_TICKS *timestamp)
|
||||
{
|
||||
struct dpb_list *entry, *result = NULL;
|
||||
struct pipe_video_buffer *buf;
|
||||
@@ -146,6 +152,8 @@ static struct pipe_video_buffer *vid_dec_h264_Flush(vid_dec_PrivateType *priv)
|
||||
return NULL;
|
||||
|
||||
buf = result->buffer;
|
||||
if (timestamp)
|
||||
*timestamp = result->timestamp;
|
||||
|
||||
--priv->codec_data.h264.dpb_num;
|
||||
LIST_DEL(&result->list);
|
||||
@@ -159,6 +167,7 @@ static void vid_dec_h264_EndFrame(vid_dec_PrivateType *priv)
|
||||
struct dpb_list *entry;
|
||||
struct pipe_video_buffer *tmp;
|
||||
bool top_field_first;
|
||||
OMX_TICKS timestamp;
|
||||
|
||||
if (!priv->frame_started)
|
||||
return;
|
||||
@@ -181,7 +190,9 @@ static void vid_dec_h264_EndFrame(vid_dec_PrivateType *priv)
|
||||
if (!entry)
|
||||
return;
|
||||
|
||||
priv->first_buf_in_frame = true;
|
||||
entry->buffer = priv->target;
|
||||
entry->timestamp = priv->timestamp;
|
||||
entry->poc = MIN2(priv->picture.h264.field_order_cnt[0], priv->picture.h264.field_order_cnt[1]);
|
||||
LIST_ADDTAIL(&entry->list, &priv->codec_data.h264.dpb_list);
|
||||
++priv->codec_data.h264.dpb_num;
|
||||
@@ -192,7 +203,8 @@ static void vid_dec_h264_EndFrame(vid_dec_PrivateType *priv)
|
||||
return;
|
||||
|
||||
tmp = priv->in_buffers[0]->pInputPortPrivate;
|
||||
priv->in_buffers[0]->pInputPortPrivate = vid_dec_h264_Flush(priv);
|
||||
priv->in_buffers[0]->pInputPortPrivate = vid_dec_h264_Flush(priv, ×tamp);
|
||||
priv->in_buffers[0]->nTimeStamp = timestamp;
|
||||
priv->target = tmp;
|
||||
priv->frame_finished = priv->in_buffers[0]->pInputPortPrivate != NULL;
|
||||
}
|
||||
@@ -829,7 +841,7 @@ static void slice_header(vid_dec_PrivateType *priv, struct vl_rbsp *rbsp,
|
||||
priv->picture.h264.field_order_cnt[0] = expectedPicOrderCnt + priv->codec_data.h264.delta_pic_order_cnt[0];
|
||||
priv->picture.h264.field_order_cnt[1] = priv->picture.h264.field_order_cnt[0] +
|
||||
sps->offset_for_top_to_bottom_field + priv->codec_data.h264.delta_pic_order_cnt[1];
|
||||
|
||||
|
||||
} else if (!priv->picture.h264.bottom_field_flag)
|
||||
priv->picture.h264.field_order_cnt[0] = expectedPicOrderCnt + priv->codec_data.h264.delta_pic_order_cnt[0];
|
||||
else
|
||||
@@ -859,7 +871,7 @@ static void slice_header(vid_dec_PrivateType *priv, struct vl_rbsp *rbsp,
|
||||
if (!priv->picture.h264.field_pic_flag) {
|
||||
priv->picture.h264.field_order_cnt[0] = tempPicOrderCnt;
|
||||
priv->picture.h264.field_order_cnt[1] = tempPicOrderCnt;
|
||||
|
||||
|
||||
} else if (!priv->picture.h264.bottom_field_flag)
|
||||
priv->picture.h264.field_order_cnt[0] = tempPicOrderCnt;
|
||||
else
|
||||
@@ -876,7 +888,7 @@ static void slice_header(vid_dec_PrivateType *priv, struct vl_rbsp *rbsp,
|
||||
|
||||
priv->picture.h264.num_ref_idx_l0_active_minus1 = pps->num_ref_idx_l0_default_active_minus1;
|
||||
priv->picture.h264.num_ref_idx_l1_active_minus1 = pps->num_ref_idx_l1_default_active_minus1;
|
||||
|
||||
|
||||
if (slice_type == PIPE_H264_SLICE_TYPE_P ||
|
||||
slice_type == PIPE_H264_SLICE_TYPE_SP ||
|
||||
slice_type == PIPE_H264_SLICE_TYPE_B) {
|
||||
|
@@ -61,7 +61,7 @@ static uint8_t default_non_intra_matrix[64] = {
|
||||
|
||||
static void vid_dec_mpeg12_Decode(vid_dec_PrivateType *priv, struct vl_vlc *vlc, unsigned min_bits_left);
|
||||
static void vid_dec_mpeg12_EndFrame(vid_dec_PrivateType *priv);
|
||||
static struct pipe_video_buffer *vid_dec_mpeg12_Flush(vid_dec_PrivateType *priv);
|
||||
static struct pipe_video_buffer *vid_dec_mpeg12_Flush(vid_dec_PrivateType *priv, OMX_TICKS *timestamp);
|
||||
|
||||
void vid_dec_mpeg12_Init(vid_dec_PrivateType *priv)
|
||||
{
|
||||
@@ -131,10 +131,12 @@ static void vid_dec_mpeg12_EndFrame(vid_dec_PrivateType *priv)
|
||||
priv->in_buffers[0]->pInputPortPrivate = done;
|
||||
}
|
||||
|
||||
static struct pipe_video_buffer *vid_dec_mpeg12_Flush(vid_dec_PrivateType *priv)
|
||||
static struct pipe_video_buffer *vid_dec_mpeg12_Flush(vid_dec_PrivateType *priv, OMX_TICKS *timestamp)
|
||||
{
|
||||
struct pipe_video_buffer *result = priv->picture.mpeg12.ref[1];
|
||||
priv->picture.mpeg12.ref[1] = NULL;
|
||||
if (timestamp)
|
||||
*timestamp = OMX_VID_DEC_TIMESTAMP_INVALID;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@@ -179,7 +179,7 @@ static OMX_ERRORTYPE vid_enc_Constructor(OMX_COMPONENTTYPE *comp, OMX_STRING nam
|
||||
if (!screen->get_video_param(screen, PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH,
|
||||
PIPE_VIDEO_ENTRYPOINT_ENCODE, PIPE_VIDEO_CAP_SUPPORTED))
|
||||
return OMX_ErrorBadParameter;
|
||||
|
||||
|
||||
priv->stacked_frames_num = screen->get_video_param(screen,
|
||||
PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH,
|
||||
PIPE_VIDEO_ENTRYPOINT_ENCODE,
|
||||
@@ -242,7 +242,7 @@ static OMX_ERRORTYPE vid_enc_Constructor(OMX_COMPONENTTYPE *comp, OMX_STRING nam
|
||||
|
||||
port->Port_AllocateBuffer = vid_enc_AllocateOutBuffer;
|
||||
port->Port_FreeBuffer = vid_enc_FreeOutBuffer;
|
||||
|
||||
|
||||
priv->bitrate.eControlRate = OMX_Video_ControlRateDisable;
|
||||
priv->bitrate.nTargetBitrate = 0;
|
||||
|
||||
@@ -253,7 +253,7 @@ static OMX_ERRORTYPE vid_enc_Constructor(OMX_COMPONENTTYPE *comp, OMX_STRING nam
|
||||
priv->profile_level.eProfile = OMX_VIDEO_AVCProfileBaseline;
|
||||
priv->profile_level.eLevel = OMX_VIDEO_AVCLevel42;
|
||||
|
||||
priv->force_pic_type.IntraRefreshVOP = OMX_FALSE;
|
||||
priv->force_pic_type.IntraRefreshVOP = OMX_FALSE;
|
||||
priv->frame_num = 0;
|
||||
priv->pic_order_cnt = 0;
|
||||
priv->restricted_b_frames = debug_get_bool_option("OMX_USE_RESTRICTED_B_FRAMES", FALSE);
|
||||
@@ -380,7 +380,7 @@ static OMX_ERRORTYPE vid_enc_SetParameter(OMX_HANDLETYPE handle, OMX_INDEXTYPE i
|
||||
|
||||
port = (omx_base_video_PortType *)priv->ports[OMX_BASE_FILTER_OUTPUTPORT_INDEX];
|
||||
port->sPortParam.nBufferSize = framesize * 512 / (16*16);
|
||||
|
||||
|
||||
priv->frame_rate = def->format.video.xFramerate;
|
||||
|
||||
priv->callbacks->EventHandler(comp, priv->callbackData, OMX_EventPortSettingsChanged,
|
||||
@@ -532,10 +532,10 @@ static OMX_ERRORTYPE vid_enc_SetConfig(OMX_HANDLETYPE handle, OMX_INDEXTYPE idx,
|
||||
vid_enc_PrivateType *priv = comp->pComponentPrivate;
|
||||
OMX_ERRORTYPE r;
|
||||
int i;
|
||||
|
||||
|
||||
if (!config)
|
||||
return OMX_ErrorBadParameter;
|
||||
|
||||
|
||||
switch(idx) {
|
||||
case OMX_IndexConfigVideoIntraVOPRefresh: {
|
||||
OMX_CONFIG_INTRAREFRESHVOPTYPE *type = config;
|
||||
@@ -543,9 +543,9 @@ static OMX_ERRORTYPE vid_enc_SetConfig(OMX_HANDLETYPE handle, OMX_INDEXTYPE idx,
|
||||
r = checkHeader(config, sizeof(OMX_CONFIG_INTRAREFRESHVOPTYPE));
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
|
||||
priv->force_pic_type = *type;
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
case OMX_IndexConfigCommonScale: {
|
||||
@@ -568,11 +568,11 @@ static OMX_ERRORTYPE vid_enc_SetConfig(OMX_HANDLETYPE handle, OMX_INDEXTYPE idx,
|
||||
priv->scale = *scale;
|
||||
if (priv->scale.xWidth != 0xffffffff && priv->scale.xHeight != 0xffffffff) {
|
||||
struct pipe_video_buffer templat = {};
|
||||
|
||||
|
||||
templat.buffer_format = PIPE_FORMAT_NV12;
|
||||
templat.chroma_format = PIPE_VIDEO_CHROMA_FORMAT_420;
|
||||
templat.width = priv->scale.xWidth;
|
||||
templat.height = priv->scale.xHeight;
|
||||
templat.width = priv->scale.xWidth;
|
||||
templat.height = priv->scale.xHeight;
|
||||
templat.interlaced = false;
|
||||
for (i = 0; i < OMX_VID_ENC_NUM_SCALING_BUFFERS; ++i) {
|
||||
priv->scale_buffer[i] = priv->s_pipe->create_video_buffer(priv->s_pipe, &templat);
|
||||
@@ -615,7 +615,7 @@ static OMX_ERRORTYPE vid_enc_GetConfig(OMX_HANDLETYPE handle, OMX_INDEXTYPE idx,
|
||||
default:
|
||||
return omx_base_component_GetConfig(handle, idx, config);
|
||||
}
|
||||
|
||||
|
||||
return OMX_ErrorNone;
|
||||
}
|
||||
|
||||
@@ -1007,10 +1007,10 @@ static void enc_ControlPicture(omx_base_PortType *port, struct pipe_h264_enc_pic
|
||||
switch (priv->bitrate.eControlRate) {
|
||||
case OMX_Video_ControlRateVariable:
|
||||
rate_ctrl->rate_ctrl_method = PIPE_H264_ENC_RATE_CONTROL_METHOD_VARIABLE;
|
||||
break;
|
||||
break;
|
||||
case OMX_Video_ControlRateConstant:
|
||||
rate_ctrl->rate_ctrl_method = PIPE_H264_ENC_RATE_CONTROL_METHOD_CONSTANT;
|
||||
break;
|
||||
break;
|
||||
case OMX_Video_ControlRateVariableSkipFrames:
|
||||
rate_ctrl->rate_ctrl_method = PIPE_H264_ENC_RATE_CONTROL_METHOD_VARIABLE_SKIP;
|
||||
break;
|
||||
@@ -1020,8 +1020,8 @@ static void enc_ControlPicture(omx_base_PortType *port, struct pipe_h264_enc_pic
|
||||
default:
|
||||
rate_ctrl->rate_ctrl_method = PIPE_H264_ENC_RATE_CONTROL_METHOD_DISABLE;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
rate_ctrl->frame_rate_den = OMX_VID_ENC_CONTROL_FRAME_RATE_DEN_DEFAULT;
|
||||
rate_ctrl->frame_rate_num = ((priv->frame_rate) >> 16) * rate_ctrl->frame_rate_den;
|
||||
|
||||
@@ -1032,7 +1032,7 @@ static void enc_ControlPicture(omx_base_PortType *port, struct pipe_h264_enc_pic
|
||||
rate_ctrl->target_bitrate = priv->bitrate.nTargetBitrate;
|
||||
else
|
||||
rate_ctrl->target_bitrate = OMX_VID_ENC_BITRATE_MAX;
|
||||
rate_ctrl->peak_bitrate = rate_ctrl->target_bitrate;
|
||||
rate_ctrl->peak_bitrate = rate_ctrl->target_bitrate;
|
||||
if (rate_ctrl->target_bitrate < OMX_VID_ENC_BITRATE_MEDIAN)
|
||||
rate_ctrl->vbv_buffer_size = MIN2((rate_ctrl->target_bitrate * 2.75), OMX_VID_ENC_BITRATE_MEDIAN);
|
||||
else
|
||||
@@ -1048,7 +1048,7 @@ static void enc_ControlPicture(omx_base_PortType *port, struct pipe_h264_enc_pic
|
||||
rate_ctrl->peak_bits_picture_integer = rate_ctrl->target_bits_picture;
|
||||
rate_ctrl->peak_bits_picture_fraction = 0;
|
||||
}
|
||||
|
||||
|
||||
picture->quant_i_frames = priv->quant.nQpI;
|
||||
picture->quant_p_frames = priv->quant.nQpP;
|
||||
picture->quant_b_frames = priv->quant.nQpB;
|
||||
@@ -1066,7 +1066,7 @@ static void enc_HandleTask(omx_base_PortType *port, struct encode_task *task,
|
||||
unsigned size = priv->ports[OMX_BASE_FILTER_OUTPUTPORT_INDEX]->sPortParam.nBufferSize;
|
||||
struct pipe_video_buffer *vbuf = task->buf;
|
||||
struct pipe_h264_enc_picture_desc picture = {};
|
||||
|
||||
|
||||
/* -------------- scale input image --------- */
|
||||
enc_ScaleInput(port, &vbuf, &size);
|
||||
priv->s_pipe->flush(priv->s_pipe, NULL, 0);
|
||||
@@ -1157,7 +1157,7 @@ static OMX_ERRORTYPE vid_enc_EncodeFrame(omx_base_PortType *port, OMX_BUFFERHEAD
|
||||
priv->force_pic_type.IntraRefreshVOP) {
|
||||
enc_ClearBframes(port, inp);
|
||||
picture_type = PIPE_H264_ENC_PICTURE_TYPE_IDR;
|
||||
priv->force_pic_type.IntraRefreshVOP = OMX_FALSE;
|
||||
priv->force_pic_type.IntraRefreshVOP = OMX_FALSE;
|
||||
priv->frame_num = 0;
|
||||
} else if (priv->codec->profile == PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE ||
|
||||
!(priv->pic_order_cnt % OMX_VID_ENC_P_PERIOD_DEFAULT) ||
|
||||
@@ -1166,7 +1166,7 @@ static OMX_ERRORTYPE vid_enc_EncodeFrame(omx_base_PortType *port, OMX_BUFFERHEAD
|
||||
} else {
|
||||
picture_type = PIPE_H264_ENC_PICTURE_TYPE_B;
|
||||
}
|
||||
|
||||
|
||||
task->pic_order_cnt = priv->pic_order_cnt++;
|
||||
|
||||
if (picture_type == PIPE_H264_ENC_PICTURE_TYPE_B) {
|
||||
@@ -1242,7 +1242,7 @@ static void vid_enc_BufferEncoded(OMX_COMPONENTTYPE *comp, OMX_BUFFERHEADERTYPE*
|
||||
output->pBuffer = priv->t_pipe->transfer_map(priv->t_pipe, outp->bitstream, 0,
|
||||
PIPE_TRANSFER_READ_WRITE,
|
||||
&box, &outp->transfer);
|
||||
|
||||
|
||||
/* ------------- get size of result ----------------- */
|
||||
|
||||
priv->codec->get_feedback(priv->codec, task->feedback, &size);
|
||||
|
@@ -28,9 +28,10 @@ include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := gallium_dri
|
||||
|
||||
ifeq ($(MESA_LOLLIPOP_BUILD),true)
|
||||
LOCAL_MODULE_RELATIVE_PATH := $(notdir $(MESA_DRI_MODULE_PATH))
|
||||
LOCAL_MODULE_RELATIVE_PATH := $(MESA_DRI_MODULE_REL_PATH)
|
||||
else
|
||||
LOCAL_MODULE_PATH := $(MESA_DRI_MODULE_PATH)
|
||||
LOCAL_UNSTRIPPED_PATH := $(MESA_DRI_MODULE_UNSTRIPPED_PATH)
|
||||
endif
|
||||
|
||||
LOCAL_SRC_FILES := target.c
|
||||
|
@@ -2,9 +2,6 @@ include $(top_srcdir)/src/gallium/Automake.inc
|
||||
|
||||
lib_LTLIBRARIES = lib@OPENCL_LIBNAME@.la
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
$(LIBELF_CFLAGS)
|
||||
|
||||
lib@OPENCL_LIBNAME@_la_LDFLAGS = \
|
||||
$(LLVM_LDFLAGS) \
|
||||
-no-undefined \
|
||||
|
@@ -52,6 +52,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#define VMW_MAX_DEFAULT_TEXTURE_SIZE (128 * 1024 * 1024)
|
||||
#define VMW_FENCE_TIMEOUT_SECONDS 60
|
||||
|
||||
struct vmw_region
|
||||
{
|
||||
@@ -721,7 +722,7 @@ vmw_ioctl_fence_finish(struct vmw_winsys_screen *vws,
|
||||
memset(&arg, 0, sizeof(arg));
|
||||
|
||||
arg.handle = handle;
|
||||
arg.timeout_us = 10*1000000;
|
||||
arg.timeout_us = VMW_FENCE_TIMEOUT_SECONDS*1000000;
|
||||
arg.lazy = 0;
|
||||
arg.flags = vflags;
|
||||
|
||||
|
@@ -170,6 +170,8 @@ vmw_svga_winsys_surface_unmap(struct svga_winsys_context *swc,
|
||||
*rebind = vsrf->rebind;
|
||||
vsrf->rebind = FALSE;
|
||||
vmw_svga_winsys_buffer_unmap(&vsrf->screen->base, vsrf->buf);
|
||||
} else {
|
||||
*rebind = FALSE;
|
||||
}
|
||||
pipe_mutex_unlock(vsrf->mutex);
|
||||
}
|
||||
|
@@ -58,6 +58,8 @@ define glsl_local-y-to-c-and-h
|
||||
$(hide) $(YACC) -o $@ -p "glcpp_parser_" $<
|
||||
endef
|
||||
|
||||
YACC_HEADER_SUFFIX := .hpp
|
||||
|
||||
define local-yy-to-cpp-and-h
|
||||
@mkdir -p $(dir $@)
|
||||
@echo "Mesa Yacc: $(PRIVATE_MODULE) <= $<"
|
||||
|
@@ -558,7 +558,8 @@ done:
|
||||
state->symbols->add_global_function(f);
|
||||
emit_function(state, f);
|
||||
}
|
||||
f->add_signature(sig->clone_prototype(f, NULL));
|
||||
sig = sig->clone_prototype(f, NULL);
|
||||
f->add_signature(sig);
|
||||
}
|
||||
}
|
||||
return sig;
|
||||
|
@@ -2117,6 +2117,7 @@ link_intrastage_shaders(void *mem_ctx,
|
||||
|
||||
if (ok) {
|
||||
memcpy(linking_shaders, shader_list, num_shaders * sizeof(gl_shader *));
|
||||
_mesa_glsl_initialize_builtin_functions();
|
||||
linking_shaders[num_shaders] = _mesa_glsl_get_builtin_function_shader();
|
||||
|
||||
ok = link_function_calls(prog, linked, linking_shaders, num_shaders + 1);
|
||||
@@ -2626,6 +2627,13 @@ assign_attribute_or_color_locations(gl_shader_program *prog,
|
||||
continue;
|
||||
}
|
||||
|
||||
if (num_attr >= ARRAY_SIZE(to_assign)) {
|
||||
linker_error(prog, "too many %s (max %u)",
|
||||
target_index == MESA_SHADER_VERTEX ?
|
||||
"vertex shader inputs" : "fragment shader outputs",
|
||||
(unsigned)ARRAY_SIZE(to_assign));
|
||||
return false;
|
||||
}
|
||||
to_assign[num_attr].slots = slots;
|
||||
to_assign[num_attr].var = var;
|
||||
num_attr++;
|
||||
|
@@ -83,6 +83,8 @@ insert_mov(nir_alu_instr *vec, unsigned start_idx, nir_shader *shader)
|
||||
}
|
||||
}
|
||||
|
||||
unsigned channels_handled = mov->dest.write_mask;
|
||||
|
||||
/* In some situations (if the vecN is involved in a phi-web), we can end
|
||||
* up with a mov from a register to itself. Some of those channels may end
|
||||
* up doing nothing and there's no reason to have them as part of the mov.
|
||||
@@ -103,7 +105,7 @@ insert_mov(nir_alu_instr *vec, unsigned start_idx, nir_shader *shader)
|
||||
ralloc_free(mov);
|
||||
}
|
||||
|
||||
return mov->dest.write_mask;
|
||||
return channels_handled;
|
||||
}
|
||||
|
||||
static bool
|
||||
|
@@ -1102,9 +1102,14 @@ dri2BindExtensions(struct dri2_screen *psc, struct glx_display * priv,
|
||||
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context");
|
||||
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context_profile");
|
||||
|
||||
if ((mask & (1 << __DRI_API_GLES2)) != 0)
|
||||
__glXEnableDirectExtension(&psc->base,
|
||||
"GLX_EXT_create_context_es2_profile");
|
||||
if ((mask & ((1 << __DRI_API_GLES) |
|
||||
(1 << __DRI_API_GLES2) |
|
||||
(1 << __DRI_API_GLES3))) != 0) {
|
||||
__glXEnableDirectExtension(&psc->base,
|
||||
"GLX_EXT_create_context_es_profile");
|
||||
__glXEnableDirectExtension(&psc->base,
|
||||
"GLX_EXT_create_context_es2_profile");
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; extensions[i]; i++) {
|
||||
|
@@ -665,9 +665,14 @@ dri3_bind_extensions(struct dri3_screen *psc, struct glx_display * priv,
|
||||
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context");
|
||||
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context_profile");
|
||||
|
||||
if ((mask & (1 << __DRI_API_GLES2)) != 0)
|
||||
if ((mask & ((1 << __DRI_API_GLES) |
|
||||
(1 << __DRI_API_GLES2) |
|
||||
(1 << __DRI_API_GLES3))) != 0) {
|
||||
__glXEnableDirectExtension(&psc->base,
|
||||
"GLX_EXT_create_context_es_profile");
|
||||
__glXEnableDirectExtension(&psc->base,
|
||||
"GLX_EXT_create_context_es2_profile");
|
||||
}
|
||||
|
||||
for (i = 0; extensions[i]; i++) {
|
||||
/* when on a different gpu than the server, the server pixmaps
|
||||
|
@@ -547,9 +547,18 @@ dri2_convert_glx_attribs(unsigned num_attribs, const uint32_t *attribs,
|
||||
case GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB:
|
||||
*api = __DRI_API_OPENGL;
|
||||
break;
|
||||
case GLX_CONTEXT_ES2_PROFILE_BIT_EXT:
|
||||
*api = __DRI_API_GLES2;
|
||||
break;
|
||||
case GLX_CONTEXT_ES_PROFILE_BIT_EXT:
|
||||
if (*major_ver >= 3)
|
||||
*api = __DRI_API_GLES3;
|
||||
else if (*major_ver == 2 && *minor_ver == 0)
|
||||
*api = __DRI_API_GLES2;
|
||||
else if (*major_ver == 1 && *minor_ver < 2)
|
||||
*api = __DRI_API_GLES;
|
||||
else {
|
||||
*error = __DRI_CTX_ERROR_BAD_API;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
*error = __DRI_CTX_ERROR_BAD_API;
|
||||
return false;
|
||||
@@ -580,19 +589,6 @@ dri2_convert_glx_attribs(unsigned num_attribs, const uint32_t *attribs,
|
||||
return false;
|
||||
}
|
||||
|
||||
/* The GLX_EXT_create_context_es2_profile spec says:
|
||||
*
|
||||
* "... If the version requested is 2.0, and the
|
||||
* GLX_CONTEXT_ES2_PROFILE_BIT_EXT bit is set in the
|
||||
* GLX_CONTEXT_PROFILE_MASK_ARB attribute (see below), then the context
|
||||
* returned will implement OpenGL ES 2.0. This is the only way in which
|
||||
* an implementation may request an OpenGL ES 2.0 context."
|
||||
*/
|
||||
if (*api == __DRI_API_GLES2 && (*major_ver != 2 || *minor_ver != 0)) {
|
||||
*error = __DRI_CTX_ERROR_BAD_API;
|
||||
return false;
|
||||
}
|
||||
|
||||
*error = __DRI_CTX_ERROR_SUCCESS;
|
||||
return true;
|
||||
}
|
||||
|
@@ -623,8 +623,10 @@ driswBindExtensions(struct drisw_screen *psc, const __DRIextension **extensions)
|
||||
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context");
|
||||
__glXEnableDirectExtension(&psc->base, "GLX_ARB_create_context_profile");
|
||||
|
||||
/* DRISW version >= 2 implies support for OpenGL ES 2.0.
|
||||
/* DRISW version >= 2 implies support for OpenGL ES.
|
||||
*/
|
||||
__glXEnableDirectExtension(&psc->base,
|
||||
"GLX_EXT_create_context_es_profile");
|
||||
__glXEnableDirectExtension(&psc->base,
|
||||
"GLX_EXT_create_context_es2_profile");
|
||||
}
|
||||
|
@@ -146,6 +146,7 @@ static const struct extension_info known_glx_extensions[] = {
|
||||
{ GLX(EXT_fbconfig_packed_float), VER(0,0), Y, Y, N, N },
|
||||
{ GLX(EXT_framebuffer_sRGB), VER(0,0), Y, Y, N, N },
|
||||
{ GLX(EXT_create_context_es2_profile), VER(0,0), Y, N, N, N },
|
||||
{ GLX(EXT_create_context_es_profile), VER(0,0), Y, N, N, N },
|
||||
{ GLX(MESA_copy_sub_buffer), VER(0,0), Y, N, N, N },
|
||||
{ GLX(MESA_multithread_makecurrent),VER(0,0), Y, N, Y, N },
|
||||
{ GLX(MESA_query_renderer), VER(0,0), Y, N, N, Y },
|
||||
|
@@ -45,6 +45,7 @@ enum
|
||||
EXT_import_context_bit,
|
||||
EXT_framebuffer_sRGB_bit,
|
||||
EXT_fbconfig_packed_float_bit,
|
||||
EXT_create_context_es_profile_bit,
|
||||
EXT_create_context_es2_profile_bit,
|
||||
MESA_copy_sub_buffer_bit,
|
||||
MESA_depth_float_bit,
|
||||
|
@@ -53,6 +53,12 @@ static const int radeonsi_chip_ids[] = {
|
||||
#undef CHIPSET
|
||||
};
|
||||
|
||||
static const int virtio_gpu_chip_ids[] = {
|
||||
#define CHIPSET(chip, name, family) chip,
|
||||
#include "pci_ids/virtio_gpu_pci_ids.h"
|
||||
#undef CHIPSET
|
||||
};
|
||||
|
||||
static const int vmwgfx_chip_ids[] = {
|
||||
#define CHIPSET(chip, name, family) chip,
|
||||
#include "pci_ids/vmwgfx_pci_ids.h"
|
||||
@@ -78,6 +84,7 @@ static const struct {
|
||||
{ 0x1002, "radeonsi", radeonsi_chip_ids, ARRAY_SIZE(radeonsi_chip_ids), _LOADER_GALLIUM},
|
||||
{ 0x10de, "nouveau_vieux", NULL, -1, _LOADER_DRI, is_nouveau_vieux },
|
||||
{ 0x10de, "nouveau", NULL, -1, _LOADER_GALLIUM },
|
||||
{ 0x1af4, "virtio_gpu", virtio_gpu_chip_ids, ARRAY_SIZE(virtio_gpu_chip_ids), _LOADER_GALLIUM },
|
||||
{ 0x15ad, "vmwgfx", vmwgfx_chip_ids, ARRAY_SIZE(vmwgfx_chip_ids), _LOADER_GALLIUM },
|
||||
{ 0x0000, NULL, NULL, 0 },
|
||||
};
|
||||
|
@@ -48,9 +48,8 @@ endif # x86
|
||||
endif # MESA_ENABLE_ASM
|
||||
|
||||
ifeq ($(ARCH_X86_HAVE_SSE4_1),true)
|
||||
LOCAL_SRC_FILES += \
|
||||
main/streaming-load-memcpy.c \
|
||||
main/sse_minmax.c
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES := \
|
||||
libmesa_sse41
|
||||
LOCAL_CFLAGS := \
|
||||
-msse4.1 \
|
||||
-DUSE_SSE41
|
||||
@@ -64,7 +63,7 @@ LOCAL_C_INCLUDES := \
|
||||
$(MESA_TOP)/src/gallium/include \
|
||||
$(MESA_TOP)/src/gallium/auxiliary
|
||||
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES := \
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES += \
|
||||
libmesa_program
|
||||
|
||||
include $(LOCAL_PATH)/Android.gen.mk
|
||||
|
44
src/mesa/Android.libmesa_sse41.mk
Normal file
44
src/mesa/Android.libmesa_sse41.mk
Normal file
@@ -0,0 +1,44 @@
|
||||
# Copyright 2012 Intel Corporation
|
||||
# Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com>
|
||||
# Copyright (C) 2010-2011 LunarG Inc.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
# to deal in the Software without restriction, including without limitation
|
||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
# and/or sell copies of the Software, and to permit persons to whom the
|
||||
# Software is furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
# DEALINGS IN THE SOFTWARE.
|
||||
|
||||
ifeq ($(ARCH_X86_HAVE_SSE4_1),true)
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(LOCAL_PATH)/Makefile.sources
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := libmesa_sse41
|
||||
|
||||
LOCAL_SRC_FILES += \
|
||||
$(X86_SSE41_FILES)
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
$(MESA_TOP)/src/mapi \
|
||||
$(MESA_TOP)/src/gallium/include \
|
||||
$(MESA_TOP)/src/gallium/auxiliary
|
||||
|
||||
include $(MESA_COMMON_MK)
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
endif
|
@@ -47,6 +47,8 @@ endif # x86
|
||||
endif # MESA_ENABLE_ASM
|
||||
|
||||
ifeq ($(ARCH_X86_HAVE_SSE4_1),true)
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES := \
|
||||
libmesa_sse41
|
||||
LOCAL_CFLAGS := \
|
||||
-DUSE_SSE41
|
||||
endif
|
||||
@@ -59,7 +61,7 @@ LOCAL_C_INCLUDES := \
|
||||
$(MESA_TOP)/src/gallium/auxiliary \
|
||||
$(MESA_TOP)/src/gallium/include
|
||||
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES := \
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES += \
|
||||
libmesa_program
|
||||
|
||||
include $(LOCAL_PATH)/Android.gen.mk
|
||||
|
@@ -24,5 +24,6 @@ include $(LOCAL_PATH)/Android.mesa_gen_matypes.mk
|
||||
include $(LOCAL_PATH)/Android.libmesa_glsl_utils.mk
|
||||
include $(LOCAL_PATH)/Android.libmesa_dricore.mk
|
||||
include $(LOCAL_PATH)/Android.libmesa_st_mesa.mk
|
||||
include $(LOCAL_PATH)/Android.libmesa_sse41.mk
|
||||
|
||||
include $(LOCAL_PATH)/program/Android.mk
|
||||
|
@@ -578,6 +578,10 @@ X86_64_FILES = \
|
||||
x86-64/x86-64.h \
|
||||
x86-64/xform4.S
|
||||
|
||||
X86_SSE41_FILES = \
|
||||
main/streaming-load-memcpy.c \
|
||||
main/sse_minmax.c
|
||||
|
||||
SPARC_FILES = \
|
||||
sparc/sparc.h \
|
||||
sparc/sparc_clip.S \
|
||||
|
@@ -203,7 +203,7 @@ _mesa_meta_CopyImageSubData_uncompressed(struct gl_context *ctx,
|
||||
src_tex_image = wrap_renderbuffer(ctx, src_renderbuffer);
|
||||
}
|
||||
if (!make_view(ctx, src_tex_image, &src_view_tex_image, &src_view_texture,
|
||||
dst_tex_image->InternalFormat))
|
||||
dst_internal_format))
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
@@ -28,9 +28,6 @@ include $(LOCAL_PATH)/common/Makefile.sources
|
||||
#-----------------------------------------------
|
||||
# Variables common to all DRI drivers
|
||||
|
||||
MESA_DRI_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/dri
|
||||
MESA_DRI_MODULE_UNSTRIPPED_PATH := $(TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED)/dri
|
||||
|
||||
MESA_DRI_CFLAGS := \
|
||||
-DHAVE_ANDROID_PLATFORM
|
||||
|
||||
|
@@ -74,20 +74,24 @@ $(intermediates)/xmlpool/%.po: $(LOCAL_PATH)/xmlpool/%.po $(POT)
|
||||
sed -i -e 's/charset=.*\\n/charset=UTF-8\\n/' $@; \
|
||||
fi
|
||||
|
||||
$(intermediates)/xmlpool/%/LC_MESSAGES/options.mo: $(intermediates)/xmlpool/%.po
|
||||
PRIVATE_SCRIPT := $(LOCAL_PATH)/xmlpool/gen_xmlpool.py
|
||||
PRIVATE_LOCALEDIR := $(intermediates)/xmlpool
|
||||
PRIVATE_TEMPLATE_HEADER := $(LOCAL_PATH)/xmlpool/t_options.h
|
||||
PRIVATE_MO_FILES := $(MESA_DRI_OPTIONS_LANGS:%=$(intermediates)/xmlpool/%/LC_MESSAGES/options.mo)
|
||||
|
||||
LOCAL_GENERATED_SOURCES += $(PRIVATE_MO_FILES)
|
||||
|
||||
$(PRIVATE_MO_FILES): $(intermediates)/xmlpool/%/LC_MESSAGES/options.mo: $(intermediates)/xmlpool/%.po
|
||||
mkdir -p $(dir $@)
|
||||
msgfmt -o $@ $<
|
||||
|
||||
$(MESA_DRI_OPTIONS_H): PRIVATE_SCRIPT := $(LOCAL_PATH)/xmlpool/gen_xmlpool.py
|
||||
$(MESA_DRI_OPTIONS_H): PRIVATE_LOCALEDIR := $(intermediates)/xmlpool
|
||||
$(MESA_DRI_OPTIONS_H): PRIVATE_TEMPLATE_HEADER := $(LOCAL_PATH)/xmlpool/t_options.h
|
||||
$(MESA_DRI_OPTIONS_H): PRIVATE_MO_FILES := $(MESA_DRI_OPTIONS_LANGS:%=$(intermediates)/xmlpool/%/LC_MESSAGES/options.mo)
|
||||
.SECONDEXPANSION:
|
||||
$(MESA_DRI_OPTIONS_H): $$(PRIVATE_SCRIPT) $$(PRIVATE_TEMPLATE_HEADER) $$(PRIVATE_MO_FILES)
|
||||
@mkdir -p $(dir $@)
|
||||
$(hide) $(MESA_PYTHON2) $(PRIVATE_SCRIPT) $(PRIVATE_TEMPLATE_HEADER) \
|
||||
$(LOCAL_GENERATED_SOURCES): PRIVATE_PYTHON := $(MESA_PYTHON2)
|
||||
$(LOCAL_GENERATED_SOURCES): PRIVATE_CUSTOM_TOOL = $(PRIVATE_PYTHON) $^ $(PRIVATE_TEMPLATE_HEADER) \
|
||||
$(PRIVATE_LOCALEDIR) $(MESA_DRI_OPTIONS_LANGS) > $@
|
||||
|
||||
$(MESA_DRI_OPTIONS_H): $(PRIVATE_SCRIPT) $(PRIVATE_TEMPLATE_HEADER) $(PRIVATE_MO_FILES)
|
||||
$(transform-generated-source)
|
||||
|
||||
include $(MESA_COMMON_MK)
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
|
@@ -27,7 +27,7 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := i915_dri
|
||||
ifeq ($(MESA_LOLLIPOP_BUILD),true)
|
||||
LOCAL_MODULE_RELATIVE_PATH := $(notdir $(MESA_DRI_MODULE_PATH))
|
||||
LOCAL_MODULE_RELATIVE_PATH := $(MESA_DRI_MODULE_REL_PATH)
|
||||
else
|
||||
LOCAL_MODULE_PATH := $(MESA_DRI_MODULE_PATH)
|
||||
LOCAL_UNSTRIPPED_PATH := $(MESA_DRI_MODULE_UNSTRIPPED_PATH)
|
||||
|
@@ -27,7 +27,7 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := i965_dri
|
||||
ifeq ($(MESA_LOLLIPOP_BUILD),true)
|
||||
LOCAL_MODULE_RELATIVE_PATH := $(notdir $(MESA_DRI_MODULE_PATH))
|
||||
LOCAL_MODULE_RELATIVE_PATH := $(MESA_DRI_MODULE_REL_PATH)
|
||||
else
|
||||
LOCAL_MODULE_PATH := $(MESA_DRI_MODULE_PATH)
|
||||
LOCAL_UNSTRIPPED_PATH := $(MESA_DRI_MODULE_UNSTRIPPED_PATH)
|
||||
|
@@ -322,8 +322,14 @@ brw_hiz_op_params::brw_hiz_op_params(struct intel_mipmap_tree *mt,
|
||||
* not 8. But commit 1f112cc increased the alignment from 4 to 8, which
|
||||
* prevents the clobbering.
|
||||
*/
|
||||
depth.width = ALIGN(depth.width, 8);
|
||||
depth.height = ALIGN(depth.height, 4);
|
||||
dst.num_samples = mt->num_samples;
|
||||
if (dst.num_samples > 1) {
|
||||
depth.width = ALIGN(mt->logical_width0, 8);
|
||||
depth.height = ALIGN(mt->logical_height0, 4);
|
||||
} else {
|
||||
depth.width = ALIGN(depth.width, 8);
|
||||
depth.height = ALIGN(depth.height, 4);
|
||||
}
|
||||
|
||||
x1 = depth.width;
|
||||
y1 = depth.height;
|
||||
|
@@ -2374,8 +2374,10 @@ fs_visitor::opt_sampler_eot()
|
||||
* we have enough space, but it will make sure the dead code eliminator kills
|
||||
* the instruction that this will replace.
|
||||
*/
|
||||
if (tex_inst->header_size != 0)
|
||||
if (tex_inst->header_size != 0) {
|
||||
invalidate_live_intervals();
|
||||
return true;
|
||||
}
|
||||
|
||||
fs_reg send_header = ibld.vgrf(BRW_REGISTER_TYPE_F,
|
||||
load_payload->sources + 1);
|
||||
@@ -2406,6 +2408,7 @@ fs_visitor::opt_sampler_eot()
|
||||
tex_inst->insert_before(cfg->blocks[cfg->num_blocks - 1], new_load_payload);
|
||||
tex_inst->src[0] = send_header;
|
||||
|
||||
invalidate_live_intervals();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -5056,12 +5059,18 @@ fs_visitor::optimize()
|
||||
void
|
||||
fs_visitor::fixup_3src_null_dest()
|
||||
{
|
||||
bool progress = false;
|
||||
|
||||
foreach_block_and_inst_safe (block, fs_inst, inst, cfg) {
|
||||
if (inst->is_3src() && inst->dst.is_null()) {
|
||||
inst->dst = fs_reg(VGRF, alloc.allocate(dispatch_width / 8),
|
||||
inst->dst.type);
|
||||
progress = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (progress)
|
||||
invalidate_live_intervals();
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -137,6 +137,8 @@ operands_match(const fs_inst *a, const fs_inst *b, bool *negate)
|
||||
ys[1].f = ys1_imm;
|
||||
|
||||
*negate = (xs0_negate != xs1_negate) != (ys0_negate != ys1_negate);
|
||||
if (*negate && (a->saturate || b->saturate))
|
||||
return false;
|
||||
return ret;
|
||||
} else if (!a->is_commutative()) {
|
||||
bool match = true;
|
||||
|
@@ -1002,6 +1002,7 @@ vec4_visitor::opt_register_coalesce()
|
||||
|
||||
if (is_nop_mov) {
|
||||
inst->remove(block);
|
||||
progress = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@@ -256,8 +256,8 @@ try_constant_propagate(const struct brw_device_info *devinfo,
|
||||
|
||||
static bool
|
||||
try_copy_propagate(const struct brw_device_info *devinfo,
|
||||
vec4_instruction *inst,
|
||||
int arg, struct copy_entry *entry)
|
||||
vec4_instruction *inst, int arg,
|
||||
struct copy_entry *entry, int attributes_per_reg)
|
||||
{
|
||||
/* Build up the value we are propagating as if it were the source of a
|
||||
* single MOV
|
||||
@@ -322,7 +322,8 @@ try_copy_propagate(const struct brw_device_info *devinfo,
|
||||
unsigned composed_swizzle = brw_compose_swizzle(inst->src[arg].swizzle,
|
||||
value.swizzle);
|
||||
if (inst->is_3src() &&
|
||||
value.file == UNIFORM &&
|
||||
(value.file == UNIFORM ||
|
||||
(value.file == ATTR && attributes_per_reg != 1)) &&
|
||||
!brw_is_single_value_swizzle(composed_swizzle))
|
||||
return false;
|
||||
|
||||
@@ -397,6 +398,11 @@ try_copy_propagate(const struct brw_device_info *devinfo,
|
||||
bool
|
||||
vec4_visitor::opt_copy_propagation(bool do_constant_prop)
|
||||
{
|
||||
/* If we are in dual instanced or single mode, then attributes are going
|
||||
* to be interleaved, so one register contains two attribute slots.
|
||||
*/
|
||||
const int attributes_per_reg =
|
||||
prog_data->dispatch_mode == DISPATCH_MODE_4X2_DUAL_OBJECT ? 1 : 2;
|
||||
bool progress = false;
|
||||
struct copy_entry entries[alloc.total_size];
|
||||
|
||||
@@ -467,7 +473,7 @@ vec4_visitor::opt_copy_propagation(bool do_constant_prop)
|
||||
if (do_constant_prop && try_constant_propagate(devinfo, inst, i, &entry))
|
||||
progress = true;
|
||||
|
||||
if (try_copy_propagate(devinfo, inst, i, &entry))
|
||||
if (try_copy_propagate(devinfo, inst, i, &entry, attributes_per_reg))
|
||||
progress = true;
|
||||
}
|
||||
|
||||
|
@@ -1320,6 +1320,11 @@ brw_upload_image_surfaces(struct brw_context *brw,
|
||||
}
|
||||
|
||||
brw->ctx.NewDriverState |= BRW_NEW_SURFACES;
|
||||
/* This may have changed the image metadata dependent on the context
|
||||
* image unit state and passed to the program as uniforms, make sure
|
||||
* that push and pull constants are reuploaded.
|
||||
*/
|
||||
brw->NewGLState |= _NEW_PROGRAM_CONSTANTS;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -140,9 +140,9 @@ copy_image_with_memcpy(struct brw_context *brw,
|
||||
_mesa_get_format_block_size(src_mt->format, &src_bw, &src_bh);
|
||||
|
||||
assert(src_width % src_bw == 0);
|
||||
assert(src_height % src_bw == 0);
|
||||
assert(src_height % src_bh == 0);
|
||||
assert(src_x % src_bw == 0);
|
||||
assert(src_y % src_bw == 0);
|
||||
assert(src_y % src_bh == 0);
|
||||
|
||||
/* If we are on the same miptree, same level, and same slice, then
|
||||
* intel_miptree_map won't let us map it twice. We have to do things a
|
||||
@@ -153,7 +153,7 @@ copy_image_with_memcpy(struct brw_context *brw,
|
||||
|
||||
if (same_slice) {
|
||||
assert(dst_x % src_bw == 0);
|
||||
assert(dst_y % src_bw == 0);
|
||||
assert(dst_y % src_bh == 0);
|
||||
|
||||
map_x1 = MIN2(src_x, dst_x);
|
||||
map_y1 = MIN2(src_y, dst_y);
|
||||
@@ -212,6 +212,7 @@ intel_copy_image_sub_data(struct gl_context *ctx,
|
||||
struct brw_context *brw = brw_context(ctx);
|
||||
struct intel_mipmap_tree *src_mt, *dst_mt;
|
||||
unsigned src_level, dst_level;
|
||||
GLuint bw, bh;
|
||||
|
||||
if (_mesa_meta_CopyImageSubData_uncompressed(ctx,
|
||||
src_image, src_renderbuffer,
|
||||
@@ -275,6 +276,19 @@ intel_copy_image_sub_data(struct gl_context *ctx,
|
||||
intel_miptree_all_slices_resolve_depth(brw, dst_mt);
|
||||
intel_miptree_resolve_color(brw, dst_mt);
|
||||
|
||||
_mesa_get_format_block_size(src_mt->format, &bw, &bh);
|
||||
|
||||
/* It's legal to have a WxH that's smaller than a compressed block. This
|
||||
* happens for example when you are using a higher level LOD. For this case,
|
||||
* we still want to copy the entire block, or else the decompression will be
|
||||
* incorrect.
|
||||
*/
|
||||
if (src_width < bw)
|
||||
src_width = ALIGN_NPOT(src_width, bw);
|
||||
|
||||
if (src_height < bh)
|
||||
src_height = ALIGN_NPOT(src_height, bh);
|
||||
|
||||
if (copy_image_with_blitter(brw, src_mt, src_level,
|
||||
src_x, src_y, src_z,
|
||||
dst_mt, dst_level,
|
||||
|
@@ -51,7 +51,7 @@ intel_miptree_create_for_teximage(struct brw_context *brw,
|
||||
width <<= 1;
|
||||
if (height != 1)
|
||||
height <<= 1;
|
||||
if (depth != 1)
|
||||
if (intelObj->base.Target == GL_TEXTURE_3D)
|
||||
depth <<= 1;
|
||||
}
|
||||
|
||||
|
@@ -40,6 +40,7 @@ public:
|
||||
struct gl_context *ctx;
|
||||
struct gl_shader_program *shader_prog;
|
||||
struct brw_vertex_program *vp;
|
||||
struct brw_vue_prog_data *prog_data;
|
||||
vec4_visitor *v;
|
||||
};
|
||||
|
||||
@@ -47,9 +48,13 @@ class cmod_propagation_vec4_visitor : public vec4_visitor
|
||||
{
|
||||
public:
|
||||
cmod_propagation_vec4_visitor(struct brw_compiler *compiler,
|
||||
nir_shader *shader)
|
||||
: vec4_visitor(compiler, NULL, NULL, NULL, shader, NULL,
|
||||
false, -1) {}
|
||||
nir_shader *shader,
|
||||
struct brw_vue_prog_data *prog_data)
|
||||
: vec4_visitor(compiler, NULL, NULL, prog_data, shader, NULL,
|
||||
false, -1)
|
||||
{
|
||||
prog_data->dispatch_mode = DISPATCH_MODE_4X2_DUAL_OBJECT;
|
||||
}
|
||||
|
||||
protected:
|
||||
/* Dummy implementation for pure virtual methods */
|
||||
@@ -96,13 +101,14 @@ void cmod_propagation_test::SetUp()
|
||||
ctx = (struct gl_context *)calloc(1, sizeof(*ctx));
|
||||
compiler = (struct brw_compiler *)calloc(1, sizeof(*compiler));
|
||||
devinfo = (struct brw_device_info *)calloc(1, sizeof(*devinfo));
|
||||
prog_data = (struct brw_vue_prog_data *)calloc(1, sizeof(*prog_data));
|
||||
compiler->devinfo = devinfo;
|
||||
|
||||
vp = ralloc(NULL, struct brw_vertex_program);
|
||||
|
||||
nir_shader *shader = nir_shader_create(NULL, MESA_SHADER_VERTEX, NULL);
|
||||
|
||||
v = new cmod_propagation_vec4_visitor(compiler, shader);
|
||||
v = new cmod_propagation_vec4_visitor(compiler, shader, prog_data);
|
||||
|
||||
_mesa_init_gl_program(&vp->program.Base, GL_VERTEX_SHADER, 0);
|
||||
|
||||
|
@@ -38,6 +38,7 @@ public:
|
||||
struct gl_context *ctx;
|
||||
struct gl_shader_program *shader_prog;
|
||||
struct brw_vertex_program *vp;
|
||||
struct brw_vue_prog_data *prog_data;
|
||||
vec4_visitor *v;
|
||||
};
|
||||
|
||||
@@ -45,10 +46,12 @@ class copy_propagation_vec4_visitor : public vec4_visitor
|
||||
{
|
||||
public:
|
||||
copy_propagation_vec4_visitor(struct brw_compiler *compiler,
|
||||
nir_shader *shader)
|
||||
: vec4_visitor(compiler, NULL, NULL, NULL, shader, NULL,
|
||||
nir_shader *shader,
|
||||
struct brw_vue_prog_data *prog_data)
|
||||
: vec4_visitor(compiler, NULL, NULL, prog_data, shader, NULL,
|
||||
false /* no_spills */, -1)
|
||||
{
|
||||
prog_data->dispatch_mode = DISPATCH_MODE_4X2_DUAL_OBJECT;
|
||||
}
|
||||
|
||||
protected:
|
||||
@@ -90,13 +93,14 @@ void copy_propagation_test::SetUp()
|
||||
ctx = (struct gl_context *)calloc(1, sizeof(*ctx));
|
||||
compiler = (struct brw_compiler *)calloc(1, sizeof(*compiler));
|
||||
devinfo = (struct brw_device_info *)calloc(1, sizeof(*devinfo));
|
||||
prog_data = (struct brw_vue_prog_data *)calloc(1, sizeof(*prog_data));
|
||||
compiler->devinfo = devinfo;
|
||||
|
||||
vp = ralloc(NULL, struct brw_vertex_program);
|
||||
|
||||
nir_shader *shader = nir_shader_create(NULL, MESA_SHADER_VERTEX, NULL);
|
||||
|
||||
v = new copy_propagation_vec4_visitor(compiler, shader);
|
||||
v = new copy_propagation_vec4_visitor(compiler, shader, prog_data);
|
||||
|
||||
_mesa_init_gl_program(&vp->program.Base, GL_VERTEX_SHADER, 0);
|
||||
|
||||
|
@@ -40,6 +40,7 @@ public:
|
||||
struct gl_context *ctx;
|
||||
struct gl_shader_program *shader_prog;
|
||||
struct brw_vertex_program *vp;
|
||||
struct brw_vue_prog_data *prog_data;
|
||||
vec4_visitor *v;
|
||||
};
|
||||
|
||||
@@ -48,10 +49,12 @@ class register_coalesce_vec4_visitor : public vec4_visitor
|
||||
{
|
||||
public:
|
||||
register_coalesce_vec4_visitor(struct brw_compiler *compiler,
|
||||
nir_shader *shader)
|
||||
: vec4_visitor(compiler, NULL, NULL, NULL, shader, NULL,
|
||||
nir_shader *shader,
|
||||
struct brw_vue_prog_data *prog_data)
|
||||
: vec4_visitor(compiler, NULL, NULL, prog_data, shader, NULL,
|
||||
false /* no_spills */, -1)
|
||||
{
|
||||
prog_data->dispatch_mode = DISPATCH_MODE_4X2_DUAL_OBJECT;
|
||||
}
|
||||
|
||||
protected:
|
||||
@@ -93,13 +96,14 @@ void register_coalesce_test::SetUp()
|
||||
ctx = (struct gl_context *)calloc(1, sizeof(*ctx));
|
||||
compiler = (struct brw_compiler *)calloc(1, sizeof(*compiler));
|
||||
devinfo = (struct brw_device_info *)calloc(1, sizeof(*devinfo));
|
||||
prog_data = (struct brw_vue_prog_data *)calloc(1, sizeof(*prog_data));
|
||||
compiler->devinfo = devinfo;
|
||||
|
||||
vp = ralloc(NULL, struct brw_vertex_program);
|
||||
|
||||
nir_shader *shader = nir_shader_create(NULL, MESA_SHADER_VERTEX, NULL);
|
||||
|
||||
v = new register_coalesce_vec4_visitor(compiler, shader);
|
||||
v = new register_coalesce_vec4_visitor(compiler, shader, prog_data);
|
||||
|
||||
_mesa_init_gl_program(&vp->program.Base, GL_VERTEX_SHADER, 0);
|
||||
|
||||
|
@@ -758,15 +758,11 @@ _mesa_set_debug_state_int(struct gl_context *ctx, GLenum pname, GLint val)
|
||||
GLint
|
||||
_mesa_get_debug_state_int(struct gl_context *ctx, GLenum pname)
|
||||
{
|
||||
struct gl_debug_state *debug;
|
||||
GLint val;
|
||||
|
||||
mtx_lock(&ctx->DebugMutex);
|
||||
debug = ctx->Debug;
|
||||
if (!debug) {
|
||||
mtx_unlock(&ctx->DebugMutex);
|
||||
struct gl_debug_state *debug = _mesa_lock_debug_state(ctx);
|
||||
if (!debug)
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (pname) {
|
||||
case GL_DEBUG_OUTPUT:
|
||||
@@ -791,7 +787,7 @@ _mesa_get_debug_state_int(struct gl_context *ctx, GLenum pname)
|
||||
break;
|
||||
}
|
||||
|
||||
mtx_unlock(&ctx->DebugMutex);
|
||||
_mesa_unlock_debug_state(ctx);
|
||||
|
||||
return val;
|
||||
}
|
||||
@@ -803,15 +799,11 @@ _mesa_get_debug_state_int(struct gl_context *ctx, GLenum pname)
|
||||
void *
|
||||
_mesa_get_debug_state_ptr(struct gl_context *ctx, GLenum pname)
|
||||
{
|
||||
struct gl_debug_state *debug;
|
||||
void *val;
|
||||
struct gl_debug_state *debug = _mesa_lock_debug_state(ctx);
|
||||
|
||||
mtx_lock(&ctx->DebugMutex);
|
||||
debug = ctx->Debug;
|
||||
if (!debug) {
|
||||
mtx_unlock(&ctx->DebugMutex);
|
||||
if (!debug)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
switch (pname) {
|
||||
case GL_DEBUG_CALLBACK_FUNCTION_ARB:
|
||||
@@ -826,7 +818,7 @@ _mesa_get_debug_state_ptr(struct gl_context *ctx, GLenum pname)
|
||||
break;
|
||||
}
|
||||
|
||||
mtx_unlock(&ctx->DebugMutex);
|
||||
_mesa_unlock_debug_state(ctx);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
@@ -2795,6 +2795,7 @@ reuse_framebuffer_texture_attachment(struct gl_framebuffer *fb,
|
||||
dst_att->Complete = src_att->Complete;
|
||||
dst_att->TextureLevel = src_att->TextureLevel;
|
||||
dst_att->Zoffset = src_att->Zoffset;
|
||||
dst_att->Layered = src_att->Layered;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1022,6 +1022,8 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
|
||||
}
|
||||
break;
|
||||
/* GL_KHR_DEBUG */
|
||||
case GL_DEBUG_OUTPUT:
|
||||
case GL_DEBUG_OUTPUT_SYNCHRONOUS:
|
||||
case GL_DEBUG_LOGGED_MESSAGES:
|
||||
case GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH:
|
||||
case GL_DEBUG_GROUP_STACK_DEPTH:
|
||||
|
@@ -126,6 +126,8 @@ descriptor=[
|
||||
[ "MAX_TEXTURE_MAX_ANISOTROPY_EXT", "CONTEXT_FLOAT(Const.MaxTextureMaxAnisotropy), extra_EXT_texture_filter_anisotropic" ],
|
||||
|
||||
# GL_KHR_debug (GL 4.3)/ GL_ARB_debug_output
|
||||
[ "DEBUG_OUTPUT", "LOC_CUSTOM, TYPE_BOOLEAN, 0, NO_EXTRA" ],
|
||||
[ "DEBUG_OUTPUT_SYNCHRONOUS", "LOC_CUSTOM, TYPE_BOOLEAN, 0, NO_EXTRA" ],
|
||||
[ "DEBUG_LOGGED_MESSAGES", "LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA" ],
|
||||
[ "DEBUG_NEXT_LOGGED_MESSAGE_LENGTH", "LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA" ],
|
||||
[ "MAX_DEBUG_LOGGED_MESSAGES", "CONST(MAX_DEBUG_LOGGED_MESSAGES), NO_EXTRA" ],
|
||||
@@ -742,6 +744,7 @@ descriptor=[
|
||||
[ "DEPTH_CLAMP", "CONTEXT_BOOL(Transform.DepthClamp), extra_ARB_depth_clamp" ],
|
||||
|
||||
# GL_ATI_fragment_shader
|
||||
[ "FRAGMENT_SHADER_ATI", "CONTEXT_BOOL(ATIFragmentShader.Enabled), extra_ATI_fragment_shader" ],
|
||||
[ "NUM_FRAGMENT_REGISTERS_ATI", "CONST(6), extra_ATI_fragment_shader" ],
|
||||
[ "NUM_FRAGMENT_CONSTANTS_ATI", "CONST(8), extra_ATI_fragment_shader" ],
|
||||
[ "NUM_PASSES_ATI", "CONST(2), extra_ATI_fragment_shader" ],
|
||||
|
@@ -670,7 +670,7 @@ _mesa_clip_drawpixels(const struct gl_context *ctx,
|
||||
* so that the image region is entirely within the window bounds.
|
||||
* Note: this is different from _mesa_clip_drawpixels() in that the
|
||||
* scissor box is ignored, and we use the bounds of the current readbuffer
|
||||
* surface.
|
||||
* surface or the attached image.
|
||||
*
|
||||
* \return GL_TRUE if region to read is in bounds
|
||||
* GL_FALSE if region is completely out of bounds (nothing to read)
|
||||
@@ -682,6 +682,18 @@ _mesa_clip_readpixels(const struct gl_context *ctx,
|
||||
struct gl_pixelstore_attrib *pack)
|
||||
{
|
||||
const struct gl_framebuffer *buffer = ctx->ReadBuffer;
|
||||
struct gl_renderbuffer *rb = buffer->_ColorReadBuffer;
|
||||
GLsizei clip_width;
|
||||
GLsizei clip_height;
|
||||
|
||||
if (rb) {
|
||||
clip_width = rb->Width;
|
||||
clip_height = rb->Height;
|
||||
} else {
|
||||
clip_width = buffer->Width;
|
||||
clip_height = buffer->Height;
|
||||
}
|
||||
|
||||
|
||||
if (pack->RowLength == 0) {
|
||||
pack->RowLength = *width;
|
||||
@@ -694,8 +706,8 @@ _mesa_clip_readpixels(const struct gl_context *ctx,
|
||||
*srcX = 0;
|
||||
}
|
||||
/* right clipping */
|
||||
if (*srcX + *width > (GLsizei) buffer->Width)
|
||||
*width -= (*srcX + *width - buffer->Width);
|
||||
if (*srcX + *width > clip_width)
|
||||
*width -= (*srcX + *width - clip_width);
|
||||
|
||||
if (*width <= 0)
|
||||
return GL_FALSE;
|
||||
@@ -707,8 +719,8 @@ _mesa_clip_readpixels(const struct gl_context *ctx,
|
||||
*srcY = 0;
|
||||
}
|
||||
/* top clipping */
|
||||
if (*srcY + *height > (GLsizei) buffer->Height)
|
||||
*height -= (*srcY + *height - buffer->Height);
|
||||
if (*srcY + *height > clip_height)
|
||||
*height -= (*srcY + *height - clip_height);
|
||||
|
||||
if (*height <= 0)
|
||||
return GL_FALSE;
|
||||
|
@@ -288,16 +288,18 @@ void GLAPIENTRY
|
||||
_mesa_ObjectPtrLabel(const void *ptr, GLsizei length, const GLchar *label)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_sync_object *const syncObj = (struct gl_sync_object *) ptr;
|
||||
struct gl_sync_object *syncObj;
|
||||
const char *callerstr;
|
||||
char **labelPtr;
|
||||
|
||||
syncObj = _mesa_get_and_ref_sync(ctx, (void*)ptr, true);
|
||||
|
||||
if (_mesa_is_desktop_gl(ctx))
|
||||
callerstr = "glObjectPtrLabel";
|
||||
else
|
||||
callerstr = "glObjectPtrLabelKHR";
|
||||
|
||||
if (!_mesa_validate_sync(ctx, syncObj)) {
|
||||
if (!syncObj) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE, "%s (not a valid sync object)",
|
||||
callerstr);
|
||||
return;
|
||||
@@ -306,6 +308,7 @@ _mesa_ObjectPtrLabel(const void *ptr, GLsizei length, const GLchar *label)
|
||||
labelPtr = &syncObj->Label;
|
||||
|
||||
set_label(ctx, labelPtr, label, length, callerstr);
|
||||
_mesa_unref_sync_object(ctx, syncObj, 1);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
@@ -313,7 +316,7 @@ _mesa_GetObjectPtrLabel(const void *ptr, GLsizei bufSize, GLsizei *length,
|
||||
GLchar *label)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_sync_object *const syncObj = (struct gl_sync_object *) ptr;
|
||||
struct gl_sync_object *syncObj;
|
||||
const char *callerstr;
|
||||
char **labelPtr;
|
||||
|
||||
@@ -328,7 +331,8 @@ _mesa_GetObjectPtrLabel(const void *ptr, GLsizei bufSize, GLsizei *length,
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_mesa_validate_sync(ctx, syncObj)) {
|
||||
syncObj = _mesa_get_and_ref_sync(ctx, (void*)ptr, true);
|
||||
if (!syncObj) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE, "%s (not a valid sync object)",
|
||||
callerstr);
|
||||
return;
|
||||
@@ -337,4 +341,5 @@ _mesa_GetObjectPtrLabel(const void *ptr, GLsizei bufSize, GLsizei *length,
|
||||
labelPtr = &syncObj->Label;
|
||||
|
||||
copy_label(*labelPtr, label, length, bufSize);
|
||||
_mesa_unref_sync_object(ctx, syncObj, 1);
|
||||
}
|
||||
|
@@ -993,6 +993,7 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height,
|
||||
{
|
||||
GLenum err = GL_NO_ERROR;
|
||||
struct gl_renderbuffer *rb;
|
||||
struct gl_pixelstore_attrib clippedPacking;
|
||||
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
@@ -1094,7 +1095,9 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height,
|
||||
}
|
||||
}
|
||||
|
||||
if (width == 0 || height == 0)
|
||||
/* Do all needed clipping here, so that we can forget about it later */
|
||||
clippedPacking = ctx->Pack;
|
||||
if (!_mesa_clip_readpixels(ctx, &x, &y, &width, &height, &clippedPacking))
|
||||
return; /* nothing to do */
|
||||
|
||||
if (!_mesa_validate_pbo_access(2, &ctx->Pack, width, height, 1,
|
||||
@@ -1118,7 +1121,7 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height,
|
||||
}
|
||||
|
||||
ctx->Driver.ReadPixels(ctx, x, y, width, height,
|
||||
format, type, &ctx->Pack, pixels);
|
||||
format, type, &clippedPacking, pixels);
|
||||
}
|
||||
|
||||
void GLAPIENTRY
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user