Compare commits

...

35 Commits

Author SHA1 Message Date
Emil Velikov
ee57c22141 docs: add release notes for 11.0.5
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2015-11-11 10:05:57 +00:00
Emil Velikov
a12fdff695 Update version to 11.0.5
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2015-11-11 09:56:00 +00:00
Marek Olšák
6a2a631bf9 radeonsi: add register definitions for Stoney
There are a few non-stoney changes too.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit d57ede92b7)
Nominated-by: Emil Velikov <emil.velikov@collabora.co.uk>
2015-11-11 09:54:17 +00:00
Emil Velikov
18fed2011f Revert "mesa/glformats: Undo code changes from _mesa_base_tex_format() move"
This reverts commit 2294f6f311.

It introduces a regression in the following test
   piglit.spec.oes_compressed_paletted_texture.basic api

In general this commit is needed to prevent regressions in
GL_KHR_texture_compression_astc_ldr, which... isn't in 11.0

Reported-by: Mark Janes <mark.a.janes@intel.com>
2015-11-10 20:17:41 +00:00
Julien Isorce
774dd015bd st/va: add more errors checks in vlVaBufferSetNumElements and vlVaMapBuffer
Signed-off-by: Julien Isorce <j.isorce@samsung.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
(cherry picked from commit 5e763aaa21)
Nominated-by: Emil Velikov <emil.velikov@collabora.co.uk>
2015-11-07 15:17:49 +00:00
Julien Isorce
507b589685 st/va: do not destroy old buffer when new one failed
If formats are not the same vlVaPutImage re-creates the video
buffer with the right format. But if the creation of this new
video buffer fails then the surface looses its current buffer.
Let's just destroy the previous buffer on success.

Signed-off-by: Julien Isorce <j.isorce@samsung.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
(cherry picked from commit d42029d2d9)
Nominated-by: Emil Velikov <emil.velikov@collabora.co.uk>
2015-11-07 15:17:49 +00:00
Julien Isorce
bc47b385b4 nvc0: fix crash when nv50_miptree_from_handle fails
Signed-off-by: Julien Isorce <j.isorce@samsung.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 3bbb8715ac)
Nominated-by: Emil Velikov <emil.velikov@collabora.co.uk>
2015-11-07 15:17:49 +00:00
Julien Isorce
dff2b9ed8a st/va: pass picture desc to begin and decode
At least vl_mpeg12_decoder uses the picture
desc in begin_frame and decode_bitstream.

https://bugs.freedesktop.org/show_bug.cgi?id=92634

Signed-off-by: Julien Isorce <j.isorce@samsung.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
(cherry picked from commit a61be1a798)
Nominated-by: Emil Velikov <emil.velikov@collabora.co.uk>
2015-11-07 15:17:49 +00:00
Ilia Mirkin
a4fbfc8189 nouveau: relax fence emit space assert
We also have the "reserved for kick" space available. Some of my earlier
changes can probably be removed, but this is a quick fix for some of the
rarer fallout.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: <mesa-stable@lists.freedesktop.org>
(cherry picked from commit bb73fc4cb8)
2015-11-07 15:17:49 +00:00
Eric Anholt
c323f97963 vc4: When the create ioctl fails, free our cache and try again.
This greatly increases the pressure you can put on the driver before
create fails.  Ultimately we need to let the kernel take control of
our cached BOs and just take them from us (and other clients)
directly, but this is a very easy patch for the moment.

Cc: "11.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 6d3a24bce8)
2015-11-07 15:17:49 +00:00
Kenneth Graunke
7cfd87ce84 nir: Properly invalidate metadata in nir_opt_remove_phis().
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 59bbe2681b)
2015-11-07 15:17:49 +00:00
Kenneth Graunke
5f565d7645 nir: Properly invalidate metadata in nir_lower_vec_to_movs().
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit bc3942e297)
2015-11-07 15:17:49 +00:00
Jason Ekstrand
ef4e862396 nir: Report progress from lower_vec_to_movs().
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
(cherry picked from commit 9f5e7ae9d8)
[Emil Velikov] Correctly derive nir_shader from vec_to_movs_state
Signed-off-by: Emil Velikov <emil.velikov@collabora.co.uk>

Conflicts:
        src/glsl/nir/nir.h
        src/glsl/nir/nir_lower_vec_to_movs.c
2015-11-07 15:17:49 +00:00
Jason Ekstrand
2cc4e97396 nir/lower_vec_to_movs: Pass the shader around directly
Previously, we were passing the shader around, we were just calling it
"mem_ctx".  However, the nir_shader is (and must be for the purposes of
mark-and-sweep) the mem_ctx so we might as well pass it around explicitly.

Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
(cherry picked from commit b7eeced3c7)
2015-11-07 15:17:49 +00:00
Kenneth Graunke
ba0c78f4e2 nir: Properly invalidate metadata in nir_opt_copy_prop().
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 0f037bd71f)
2015-11-07 15:17:49 +00:00
Kenneth Graunke
a4b73eeff0 nir: Properly invalidate metadata in nir_split_var_copies().
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 8bb44510fc)
2015-11-07 15:17:49 +00:00
Kenneth Graunke
800217a165 nir: Report progress from nir_split_var_copies().
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
(cherry picked from commit dc18b9357b)
2015-11-07 15:17:48 +00:00
Ben Widawsky
aa739dff86 i965/skl: Add GT4 PCI IDs
Like other gen8+ hardware, the hardware automatically scales up thread counts.
We must be careful about the URB sizes since GT4 adds another slice.

One of the existing PCI IDs is actually mislabeled as GT3. Arguably this is a
real bug since the URB size will be wrong. Because this patch is simply meant to
add the missing IDs, that will be fixed in a later patch.

v2: No longer relevant.

v3: Update the wm thread count to support GT4. The WM thread count is used to
determine the maximum scratch space required. Currently the code always
allocates the maximum amount even though lower GT SKUs require less. The formula
is threads_per_psd * subslices_per_slice * slices

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
(cherry picked from commit 7cbd6608f5)
2015-11-07 15:17:48 +00:00
Ilia Mirkin
16bc98fb5e nouveau: set MaxDrawBuffers to the same value as MaxColorAttachments
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 985b51551a)
2015-11-07 15:17:48 +00:00
Emmanuel Gil Peyrot
addd501acd gbm.h: Add a missing stddef.h include for size_t.
This was causing compilation issues when one of its providers wasn’t
already included before gbm.h.

Cc: "11.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit f3d4d10a1d)
2015-11-05 14:05:20 +00:00
Ivan Kalvachev
d9474cb70e r600g: Fix special negative immediate constants when using ABS modifier.
Some constants (like 1.0 and 0.5) could be inlined as immediate inputs
without using their literal value. The r600_bytecode_special_constants()
function emulates the negative of these constants by using NEG modifier.

However some shaders define -1.0 constant and want to use it as 1.0.
They do so by using ABS modifier. But r600_bytecode_special_constants()
set NEG in addition to ABS. Since NEG modifier have priority over ABS one,
we get -|1.0| as result, instead of |1.0|.

The patch simply prevents the additional switching of NEG when ABS is set.

[According to Ivan Kalvachev, this bug was fond via
https://github.com/iXit/Mesa-3D/issues/126 and
https://github.com/iXit/Mesa-3D/issues/127]

Signed-off-by: Ivan Kalvachev <ikalvachev@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
CC: <mesa-stable@lists.freedesktop.org>
(cherry picked from commit f75f21a24a)
2015-11-05 14:05:20 +00:00
Nicolai Hähnle
7aba6fa3eb st/mesa: fix mipmap generation for immutable textures with incomplete pyramids
Without the clamping by NumLevels, the state tracker would reallocate the
texture storage (incorrect) and even fail to copy the base level image
after reallocation, leading to the graphical glitch of
https://bugs.freedesktop.org/show_bug.cgi?id=91993 .

A piglit test has been submitted for review as well (subtest of
arb_texture_storage-texture-storage).

v2: also bypass all calls to st_finalize_texture (suggested by Marek Olšák)

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 24c90888ae)
2015-11-05 14:05:19 +00:00
Kenneth Graunke
05fdf4b1c9 i965: Fix missing BRW_NEW_*_PROG_DATA flagging caused by cache reuse.
Consider the case of two nearly identical GLSL fragment shaders:

   out vec4 color;
   void main() { color = vec4(1); }

and

   layout(early_fragment_tests) in;
   out vec4 color;
   void main() { color = vec4(1); }

These shaders compile to the exact same assembly, but have distinct
values for brw_wm_prog_data::early_fragment_tests.

Since these are two independent GLSL shaders, they have different
program keys - notably, brw_wm_prog_key::program_string_id differs.

When uploading the second, brw_upload_cache will find an existing copy
of the assembly in the cache BO, which means matching_data will be
non-NULL.  Although we create a second cache item (with the new key
and prog_data), we set item->offset to the existing copy and avoid
re-uploading duplicate assembly.

However, brw_search_cache() would only flag BRW_NEW_*_PROG_DATA if
item->offset differed from the supplied offset.  With reuse, both
programs have the same offset, but prog_data changed.  We have to
flag it, but failed to.

To fix this, we simply need to check if the aux (prog_data) pointer
changed.  If either the assembly or the prog_data differs, flag it.

This fixes a regression since 1bba29ed40,
where Topi fixed brw_upload_cache() to actually reuse identical
assembly.  Prior to that, reuse basically never happened due to bugs.
Unfortunately, this code apparently wasn't prepared to handle reuse!

Fixes GPU hangs in Dolphin on Broadwell.

Huge thanks to Pierre Bourdon and Ilia Mirkin for debugging this
and helping track down the real issue.

Cc: "11.0" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92623
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Tested-by: Pierre Bourdon <delroth@gmail.com>
(cherry picked from commit bf05af3f0e)
2015-11-05 14:05:19 +00:00
Ian Romanick
d8c58ff25a i965: Fix is-renderable check in intel_image_target_renderbuffer_storage
Previously we could create a renderbuffer with format
MESA_FORMAT_R8G8B8A8_UNORM, convert that renderbuffer to an EGLImage,
then FAIL to convert the EGLImage back to a renderbuffer because
reasons.  Just use the same check in
intel_image_target_renderbuffer_storage that brw_render_target_supported
uses.

There are more checks in brw_render_target_supported, but I don't think
they are necessary here.  A different approach would be to refactor
brw_render_target_supported to take rb->Format and rb->NumSamples as
parameters (instead of a gl_renderbuffer) and use the new function here.

Fixes:

    ES2-CTS.gtf.GL2ExtensionTests.egl_image.egl_image

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Tested-by: Tapani Pälli <tapani.palli@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92476
Cc: "10.3 10.4 10.5 10.6 11.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 7070c8879a)
2015-11-05 14:05:19 +00:00
Samuel Li
f86028cf07 radeonsi: add Stoney pci ids
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Samuel Li <samuel.li@amd.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 98546bfd03)
2015-11-05 14:05:19 +00:00
Samuel Li
64e903f82e radeonsi: add support for Stoney asics (v3)
v2 (agd): rebase on mesa master, split pci ids to
separate commit
v3 (agd): use carrizo for llvm processor name for
llvm 3.7 and older

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Samuel Li <samuel.li@amd.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit bf0d0ce0d5)
2015-11-05 14:05:19 +00:00
Ilia Mirkin
55cd3ab8e7 nvc0: respect edgeflag attribute width
The edgeflag comes in as ubyte with glEdgeFlagPointer but as float with
plain immediate glEdgeFlag. Avoid reading bytes that weren't meant for
the edgeflag in the pointer case.

Fixes intermittent failures with gl-2.0-edgeflag piglit (and valgrind
complaints about reading uninitialized memory).

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit e05021ff72)
2015-11-05 14:05:19 +00:00
Roland Scheidegger
4a4e148ac7 gallivm: disable f16c when not using AVX
f16c intrinsic can only be emitted when AVX is used. So when we disable AVX
due to forcing 128bit vectors we must not use this intrinsic (depending on
llvm version, this worked previously because llvm used AVX even when we didn't
tell it to, however I've seen this fail with llvm 3.3 since
718249843b which seems to have the side effect
of disabling avx in llvm albeit it only touches sse flags really, but
with ea421e919a it's now really disabled).
Albeit being able to use AVX with 128bit vectors also would have its uses, the
code as is really was meant to emulate jit code creation for less capable cpus.
v2: add some (ifdefed out) missing de-featuring options for simulating
less capable cpus.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
(cherry picked from commit 711489648b)
Nominated-by: Roland Scheidegger <sroland@vmware.com>
2015-11-05 14:05:19 +00:00
Jose Fonseca
7f6f273a55 gallivm: Explicitly disable unsupported CPU features.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92214
CC: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
(cherry picked from commit ea421e919a)
2015-11-05 14:05:19 +00:00
Alex Deucher
5ce639c001 radeon/uvd: don't expose HEVC on old UVD hw (v3)
The section for UVD 2 and older was not updated
when HEVC support was added. Reported by Kano
on irc.

v2: integrate the UVD2 and older checks into the
main switch statement.
v3: handle encode checking as well.  Encode is
already checked in the top case statement, so
drop encode checks in the lower case statement.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 7b63658125)
2015-11-05 14:05:19 +00:00
Jose Fonseca
38a8b467cb gallivm: Translate all util_cpu_caps bits to LLVM attributes.
This should prevent disparity between features Mesa and LLVM
believe are supported by the CPU.

http://lists.freedesktop.org/archives/mesa-dev/2015-October/thread.html#96990

Tested on a i7-3720QM w/ LLVM 3.3 and 3.6.

v2: Increase SmallVector initial size as suggested by Gustaw Smolarczyk.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
CC: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 718249843b)
2015-11-05 14:05:19 +00:00
Nanley Chery
2294f6f311 mesa/glformats: Undo code changes from _mesa_base_tex_format() move
The refactoring commit, c6bf1cd, accidentally reverted cd49b97
and 99b1f47. These changes caused more code to be added to the
function and removed the existing support for ASTC. This patch
reverts those modifications.

v2. Actually include ASTC support again.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92221
Cc: "11.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit f1147a238a)
[Emil Velikov]
 - Drop the KHR_texture_compression_astc_ldr check
 - Add texcompress.h include.
Signed-off-by: Emil Velikov <emil.velikov@collabora.co.uk>
2015-11-05 14:04:38 +00:00
Nigel Stewart
a333791259 osmesa: Expose GL entry points for Windows build via DEF file.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92437
CC: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Jose Fonseca <jfonseca@vmware.com>
(cherry picked from commit 04703762e5)
2015-11-05 11:44:42 +00:00
Emil Velikov
bfd14ebb05 cherry-ignore: ignore a possible wrong nomination
The commit base varies greatly between master and 11.0. It seems that
the commit (in it's current form) is not applicable for the branch.

Signed-off-by: Emil Velikov <emil.velikov@collabora.co.uk>
2015-11-05 11:29:44 +00:00
Emil Velikov
ec14e6f8fd docs: add sha256 checksums for 11.0.4
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2015-10-25 10:05:01 +00:00
41 changed files with 1459 additions and 135 deletions

View File

@@ -1 +1 @@
11.0.4
11.0.5

2
bin/.cherry-ignore Normal file
View File

@@ -0,0 +1,2 @@
# The commit base differs greatly between 11.0 and master
2832ca95ecce064c7d841a3a374c2179f56161be glsl: fix stream qualifier for blocks with an instance name

View File

@@ -31,7 +31,8 @@ because compatibility contexts are not supported.
<h2>SHA256 checksums</h2>
<pre>
TBD
ed412ca6a46d1bd055120e5c12806c15419ae8c4dd6d3f6ea20a83091d5c78bf mesa-11.0.4.tar.gz
40201bf7fc6fa12a6d9edfe870b41eb4dd6669154e3c42c48a96f70805f5483d mesa-11.0.4.tar.xz
</pre>

173
docs/relnotes/11.0.5.html Normal file
View File

@@ -0,0 +1,173 @@
<!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.0.5 Release Notes / November 11, 2015</h1>
<p>
Mesa 11.0.5 is a bug fix release which fixes bugs found since the 11.0.4 release.
</p>
<p>
Mesa 11.0.5 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>
<ul>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=91993">Bug 91993</a> - Graphical glitch in Astromenace (open-source game).</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92214">Bug 92214</a> - Flightgear crashes during splashboot with R600 driver, LLVM 3.7.0 and mesa 11.0.2</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92437">Bug 92437</a> - osmesa: Expose GL entry points for Windows build, via .def file</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92476">Bug 92476</a> - [cts] ES2-CTS.gtf.GL2ExtensionTests.egl_image.egl_image fails</li>
<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=92623">Bug 92623</a> - Differences in prog_data ignored when caching fragment programs (causes hangs)</li>
</ul>
<h2>Changes</h2>
<p>Alex Deucher (1):</p>
<ul>
<li>radeon/uvd: don't expose HEVC on old UVD hw (v3)</li>
</ul>
<p>Ben Widawsky (1):</p>
<ul>
<li>i965/skl: Add GT4 PCI IDs</li>
</ul>
<p>Emil Velikov (4):</p>
<ul>
<li>docs: add sha256 checksums for 11.0.4</li>
<li>cherry-ignore: ignore a possible wrong nomination</li>
<li>Revert "mesa/glformats: Undo code changes from _mesa_base_tex_format() move"</li>
<li>Update version to 11.0.5</li>
</ul>
<p>Emmanuel Gil Peyrot (1):</p>
<ul>
<li>gbm.h: Add a missing stddef.h include for size_t.</li>
</ul>
<p>Eric Anholt (1):</p>
<ul>
<li>vc4: When the create ioctl fails, free our cache and try again.</li>
</ul>
<p>Ian Romanick (1):</p>
<ul>
<li>i965: Fix is-renderable check in intel_image_target_renderbuffer_storage</li>
</ul>
<p>Ilia Mirkin (3):</p>
<ul>
<li>nvc0: respect edgeflag attribute width</li>
<li>nouveau: set MaxDrawBuffers to the same value as MaxColorAttachments</li>
<li>nouveau: relax fence emit space assert</li>
</ul>
<p>Ivan Kalvachev (1):</p>
<ul>
<li>r600g: Fix special negative immediate constants when using ABS modifier.</li>
</ul>
<p>Jason Ekstrand (2):</p>
<ul>
<li>nir/lower_vec_to_movs: Pass the shader around directly</li>
<li>nir: Report progress from lower_vec_to_movs().</li>
</ul>
<p>Jose Fonseca (2):</p>
<ul>
<li>gallivm: Translate all util_cpu_caps bits to LLVM attributes.</li>
<li>gallivm: Explicitly disable unsupported CPU features.</li>
</ul>
<p>Julien Isorce (4):</p>
<ul>
<li>st/va: pass picture desc to begin and decode</li>
<li>nvc0: fix crash when nv50_miptree_from_handle fails</li>
<li>st/va: do not destroy old buffer when new one failed</li>
<li>st/va: add more errors checks in vlVaBufferSetNumElements and vlVaMapBuffer</li>
</ul>
<p>Kenneth Graunke (6):</p>
<ul>
<li>i965: Fix missing BRW_NEW_*_PROG_DATA flagging caused by cache reuse.</li>
<li>nir: Report progress from nir_split_var_copies().</li>
<li>nir: Properly invalidate metadata in nir_split_var_copies().</li>
<li>nir: Properly invalidate metadata in nir_opt_copy_prop().</li>
<li>nir: Properly invalidate metadata in nir_lower_vec_to_movs().</li>
<li>nir: Properly invalidate metadata in nir_opt_remove_phis().</li>
</ul>
<p>Marek Olšák (1):</p>
<ul>
<li>radeonsi: add register definitions for Stoney</li>
</ul>
<p>Nanley Chery (1):</p>
<ul>
<li>mesa/glformats: Undo code changes from _mesa_base_tex_format() move</li>
</ul>
<p>Nicolai Hähnle (1):</p>
<ul>
<li>st/mesa: fix mipmap generation for immutable textures with incomplete pyramids</li>
</ul>
<p>Nigel Stewart (1):</p>
<ul>
<li>osmesa: Expose GL entry points for Windows build via DEF file.</li>
</ul>
<p>Roland Scheidegger (1):</p>
<ul>
<li>gallivm: disable f16c when not using AVX</li>
</ul>
<p>Samuel Li (2):</p>
<ul>
<li>radeonsi: add support for Stoney asics (v3)</li>
<li>radeonsi: add Stoney pci ids</li>
</ul>
</div>
</body>
</html>

View File

@@ -124,6 +124,10 @@ CHIPSET(0x1921, skl_gt2, "Intel(R) Skylake ULT GT2F")
CHIPSET(0x1926, skl_gt3, "Intel(R) Skylake ULT GT3")
CHIPSET(0x192A, skl_gt3, "Intel(R) Skylake SRV GT3")
CHIPSET(0x192B, skl_gt3, "Intel(R) Skylake Halo 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")
CHIPSET(0x193D, skl_gt4, "Intel(R) Skylake GT4")
CHIPSET(0x22B0, chv, "Intel(R) HD Graphics (Cherryview)")
CHIPSET(0x22B1, chv, "Intel(R) HD Graphics (Cherryview)")
CHIPSET(0x22B2, chv, "Intel(R) HD Graphics (Cherryview)")

View File

@@ -181,3 +181,5 @@ CHIPSET(0x9876, CARRIZO_, CARRIZO)
CHIPSET(0x9877, CARRIZO_, CARRIZO)
CHIPSET(0x7300, FIJI_, FIJI)
CHIPSET(0x98E4, STONEY_, STONEY)

View File

@@ -427,6 +427,7 @@ lp_build_init(void)
*/
util_cpu_caps.has_avx = 0;
util_cpu_caps.has_avx2 = 0;
util_cpu_caps.has_f16c = 0;
}
#ifdef PIPE_ARCH_PPC_64
@@ -458,7 +459,9 @@ lp_build_init(void)
util_cpu_caps.has_sse3 = 0;
util_cpu_caps.has_ssse3 = 0;
util_cpu_caps.has_sse4_1 = 0;
util_cpu_caps.has_sse4_2 = 0;
util_cpu_caps.has_avx = 0;
util_cpu_caps.has_avx2 = 0;
util_cpu_caps.has_f16c = 0;
#endif

View File

@@ -497,20 +497,48 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
#endif
}
llvm::SmallVector<std::string, 1> MAttrs;
if (util_cpu_caps.has_avx) {
/*
* AVX feature is not automatically detected from CPUID by the X86 target
* yet, because the old (yet default) JIT engine is not capable of
* emitting the opcodes. On newer llvm versions it is and at least some
* versions (tested with 3.3) will emit avx opcodes without this anyway.
*/
MAttrs.push_back("+avx");
if (util_cpu_caps.has_f16c) {
MAttrs.push_back("+f16c");
}
builder.setMAttrs(MAttrs);
}
llvm::SmallVector<std::string, 16> MAttrs;
#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
/*
* We need to unset attributes because sometimes LLVM mistakenly assumes
* certain features are present given the processor name.
*
* https://bugs.freedesktop.org/show_bug.cgi?id=92214
* http://llvm.org/PR25021
* http://llvm.org/PR19429
* http://llvm.org/PR16721
*/
MAttrs.push_back(util_cpu_caps.has_sse ? "+sse" : "-sse" );
MAttrs.push_back(util_cpu_caps.has_sse2 ? "+sse2" : "-sse2" );
MAttrs.push_back(util_cpu_caps.has_sse3 ? "+sse3" : "-sse3" );
MAttrs.push_back(util_cpu_caps.has_ssse3 ? "+ssse3" : "-ssse3" );
#if HAVE_LLVM >= 0x0304
MAttrs.push_back(util_cpu_caps.has_sse4_1 ? "+sse4.1" : "-sse4.1");
#else
MAttrs.push_back(util_cpu_caps.has_sse4_1 ? "+sse41" : "-sse41" );
#endif
#if HAVE_LLVM >= 0x0304
MAttrs.push_back(util_cpu_caps.has_sse4_2 ? "+sse4.2" : "-sse4.2");
#else
MAttrs.push_back(util_cpu_caps.has_sse4_2 ? "+sse42" : "-sse42" );
#endif
/*
* AVX feature is not automatically detected from CPUID by the X86 target
* yet, because the old (yet default) JIT engine is not capable of
* emitting the opcodes. On newer llvm versions it is and at least some
* versions (tested with 3.3) will emit avx opcodes without this anyway.
*/
MAttrs.push_back(util_cpu_caps.has_avx ? "+avx" : "-avx");
MAttrs.push_back(util_cpu_caps.has_f16c ? "+f16c" : "-f16c");
MAttrs.push_back(util_cpu_caps.has_avx2 ? "+avx2" : "-avx2");
#endif
#if defined(PIPE_ARCH_PPC)
MAttrs.push_back(util_cpu_caps.has_altivec ? "+altivec" : "-altivec");
#endif
builder.setMAttrs(MAttrs);
#if HAVE_LLVM >= 0x0305
StringRef MCPU = llvm::sys::getHostCPUName();

View File

@@ -349,7 +349,7 @@ nv30_screen_fence_emit(struct pipe_screen *pscreen, uint32_t *sequence)
*sequence = ++screen->base.fence.sequence;
assert(PUSH_AVAIL(push) >= 3);
assert(PUSH_AVAIL(push) + push->rsvd_kick >= 3);
PUSH_DATA (push, NV30_3D_FENCE_OFFSET |
(2 /* size */ << 18) | (7 /* subchan */ << 13));
PUSH_DATA (push, 0);

View File

@@ -388,7 +388,7 @@ nv50_screen_fence_emit(struct pipe_screen *pscreen, u32 *sequence)
/* we need to do it after possible flush in MARK_RING */
*sequence = ++screen->base.fence.sequence;
assert(PUSH_AVAIL(push) >= 5);
assert(PUSH_AVAIL(push) + push->rsvd_kick >= 5);
PUSH_DATA (push, NV50_FIFO_PKHDR(NV50_3D(QUERY_ADDRESS_HIGH), 4));
PUSH_DATAh(push, screen->fence.bo->offset);
PUSH_DATA (push, screen->fence.bo->offset);

View File

@@ -26,7 +26,8 @@ nvc0_resource_from_handle(struct pipe_screen * screen,
} else {
struct pipe_resource *res = nv50_miptree_from_handle(screen,
templ, whandle);
nv04_resource(res)->vtbl = &nvc0_miptree_vtbl;
if (res)
nv04_resource(res)->vtbl = &nvc0_miptree_vtbl;
return res;
}
}

View File

@@ -537,7 +537,7 @@ nvc0_screen_fence_emit(struct pipe_screen *pscreen, u32 *sequence)
/* we need to do it after possible flush in MARK_RING */
*sequence = ++screen->base.fence.sequence;
assert(PUSH_AVAIL(push) >= 5);
assert(PUSH_AVAIL(push) + push->rsvd_kick >= 5);
PUSH_DATA (push, NVC0_FIFO_PKHDR_SQ(NVC0_3D(QUERY_ADDRESS_HIGH), 4));
PUSH_DATAh(push, screen->fence.bo->offset);
PUSH_DATA (push, screen->fence.bo->offset);

View File

@@ -27,6 +27,7 @@ struct push_context {
struct {
bool enabled;
bool value;
uint8_t width;
unsigned stride;
const uint8_t *data;
} edgeflag;
@@ -53,6 +54,7 @@ nvc0_push_context_init(struct nvc0_context *nvc0, struct push_context *ctx)
/* silence warnings */
ctx->edgeflag.data = NULL;
ctx->edgeflag.stride = 0;
ctx->edgeflag.width = 0;
}
static inline void
@@ -100,6 +102,7 @@ nvc0_push_map_edgeflag(struct push_context *ctx, struct nvc0_context *nvc0,
struct nv04_resource *buf = nv04_resource(vb->buffer);
ctx->edgeflag.stride = vb->stride;
ctx->edgeflag.width = util_format_get_blocksize(ve->src_format);
if (buf) {
unsigned offset = vb->buffer_offset + ve->src_offset;
ctx->edgeflag.data = nouveau_resource_map_offset(&nvc0->base,
@@ -137,10 +140,17 @@ prim_restart_search_i32(const uint32_t *elts, unsigned push, uint32_t index)
}
static inline bool
ef_value(const struct push_context *ctx, uint32_t index)
ef_value_8(const struct push_context *ctx, uint32_t index)
{
float *pf = (float *)&ctx->edgeflag.data[index * ctx->edgeflag.stride];
return *pf ? true : false;
uint8_t *pf = (uint8_t *)&ctx->edgeflag.data[index * ctx->edgeflag.stride];
return !!*pf;
}
static inline bool
ef_value_32(const struct push_context *ctx, uint32_t index)
{
uint32_t *pf = (uint32_t *)&ctx->edgeflag.data[index * ctx->edgeflag.stride];
return !!*pf;
}
static inline bool
@@ -154,7 +164,11 @@ static inline unsigned
ef_toggle_search_i08(struct push_context *ctx, const uint8_t *elts, unsigned n)
{
unsigned i;
for (i = 0; i < n && ef_value(ctx, elts[i]) == ctx->edgeflag.value; ++i);
bool ef = ctx->edgeflag.value;
if (ctx->edgeflag.width == 1)
for (i = 0; i < n && ef_value_8(ctx, elts[i]) == ef; ++i);
else
for (i = 0; i < n && ef_value_32(ctx, elts[i]) == ef; ++i);
return i;
}
@@ -162,7 +176,11 @@ static inline unsigned
ef_toggle_search_i16(struct push_context *ctx, const uint16_t *elts, unsigned n)
{
unsigned i;
for (i = 0; i < n && ef_value(ctx, elts[i]) == ctx->edgeflag.value; ++i);
bool ef = ctx->edgeflag.value;
if (ctx->edgeflag.width == 1)
for (i = 0; i < n && ef_value_8(ctx, elts[i]) == ef; ++i);
else
for (i = 0; i < n && ef_value_32(ctx, elts[i]) == ef; ++i);
return i;
}
@@ -170,7 +188,11 @@ static inline unsigned
ef_toggle_search_i32(struct push_context *ctx, const uint32_t *elts, unsigned n)
{
unsigned i;
for (i = 0; i < n && ef_value(ctx, elts[i]) == ctx->edgeflag.value; ++i);
bool ef = ctx->edgeflag.value;
if (ctx->edgeflag.width == 1)
for (i = 0; i < n && ef_value_8(ctx, elts[i]) == ef; ++i);
else
for (i = 0; i < n && ef_value_32(ctx, elts[i]) == ef; ++i);
return i;
}
@@ -178,7 +200,11 @@ static inline unsigned
ef_toggle_search_seq(struct push_context *ctx, unsigned start, unsigned n)
{
unsigned i;
for (i = 0; i < n && ef_value(ctx, start++) == ctx->edgeflag.value; ++i);
bool ef = ctx->edgeflag.value;
if (ctx->edgeflag.width == 1)
for (i = 0; i < n && ef_value_8(ctx, start++) == ef; ++i);
else
for (i = 0; i < n && ef_value_32(ctx, start++) == ef; ++i);
return i;
}

View File

@@ -621,7 +621,7 @@ static int replace_gpr_with_pv_ps(struct r600_bytecode *bc,
return 0;
}
void r600_bytecode_special_constants(uint32_t value, unsigned *sel, unsigned *neg)
void r600_bytecode_special_constants(uint32_t value, unsigned *sel, unsigned *neg, unsigned abs)
{
switch(value) {
case 0:
@@ -641,11 +641,11 @@ void r600_bytecode_special_constants(uint32_t value, unsigned *sel, unsigned *ne
break;
case 0xBF800000: /* -1.0f */
*sel = V_SQ_ALU_SRC_1;
*neg ^= 1;
*neg ^= !abs;
break;
case 0xBF000000: /* -0.5f */
*sel = V_SQ_ALU_SRC_0_5;
*neg ^= 1;
*neg ^= !abs;
break;
default:
*sel = V_SQ_ALU_SRC_LITERAL;
@@ -1194,7 +1194,7 @@ int r600_bytecode_add_alu_type(struct r600_bytecode *bc,
}
if (nalu->src[i].sel == V_SQ_ALU_SRC_LITERAL)
r600_bytecode_special_constants(nalu->src[i].value,
&nalu->src[i].sel, &nalu->src[i].neg);
&nalu->src[i].sel, &nalu->src[i].neg, nalu->src[i].abs);
}
if (nalu->dst.sel >= bc->ngpr) {
bc->ngpr = nalu->dst.sel + 1;

View File

@@ -254,7 +254,7 @@ int r600_bytecode_add_cfinst(struct r600_bytecode *bc,
int r600_bytecode_add_alu_type(struct r600_bytecode *bc,
const struct r600_bytecode_alu *alu, unsigned type);
void r600_bytecode_special_constants(uint32_t value,
unsigned *sel, unsigned *neg);
unsigned *sel, unsigned *neg, unsigned abs);
void r600_bytecode_disasm(struct r600_bytecode *bc);
void r600_bytecode_alu_read(struct r600_bytecode *bc,
struct r600_bytecode_alu *alu, uint32_t word0, uint32_t word1);

View File

@@ -1004,7 +1004,7 @@ static void tgsi_src(struct r600_shader_ctx *ctx,
(tgsi_src->Register.SwizzleX == tgsi_src->Register.SwizzleW)) {
index = tgsi_src->Register.Index * 4 + tgsi_src->Register.SwizzleX;
r600_bytecode_special_constants(ctx->literals[index], &r600_src->sel, &r600_src->neg);
r600_bytecode_special_constants(ctx->literals[index], &r600_src->sel, &r600_src->neg, r600_src->abs);
if (r600_src->sel != V_SQ_ALU_SRC_LITERAL)
return;
}

View File

@@ -415,6 +415,7 @@ static const char* r600_get_chip_name(struct r600_common_screen *rscreen)
case CHIP_ICELAND: return "AMD ICELAND";
case CHIP_CARRIZO: return "AMD CARRIZO";
case CHIP_FIJI: return "AMD FIJI";
case CHIP_STONEY: return "AMD STONEY";
default: return "AMD unknown";
}
}
@@ -543,6 +544,11 @@ const char *r600_get_llvm_processor_name(enum radeon_family family)
case CHIP_ICELAND: return "iceland";
case CHIP_CARRIZO: return "carrizo";
case CHIP_FIJI: return "fiji";
#if HAVE_LLVM <= 0x0307
case CHIP_STONEY: return "carrizo";
#else
case CHIP_STONEY: return "stoney";
#endif
default: return "";
}
}

View File

@@ -205,11 +205,12 @@ int rvid_get_video_param(struct pipe_screen *screen,
enum pipe_video_cap param)
{
struct r600_common_screen *rscreen = (struct r600_common_screen *)screen;
enum pipe_video_format codec = u_reduce_video_profile(profile);
if (entrypoint == PIPE_VIDEO_ENTRYPOINT_ENCODE) {
switch (param) {
case PIPE_VIDEO_CAP_SUPPORTED:
return u_reduce_video_profile(profile) == PIPE_VIDEO_FORMAT_MPEG4_AVC &&
return codec == PIPE_VIDEO_FORMAT_MPEG4_AVC &&
rvce_is_fw_version_supported(rscreen);
case PIPE_VIDEO_CAP_NPOT_TEXTURES:
return 1;
@@ -232,38 +233,19 @@ int rvid_get_video_param(struct pipe_screen *screen,
}
}
/* UVD 2.x limits */
if (rscreen->family < CHIP_PALM) {
enum pipe_video_format codec = u_reduce_video_profile(profile);
switch (param) {
case PIPE_VIDEO_CAP_SUPPORTED:
/* no support for MPEG4 */
return codec != PIPE_VIDEO_FORMAT_MPEG4 &&
/* FIXME: VC-1 simple/main profile is broken */
profile != PIPE_VIDEO_PROFILE_VC1_SIMPLE &&
profile != PIPE_VIDEO_PROFILE_VC1_MAIN;
case PIPE_VIDEO_CAP_PREFERS_INTERLACED:
case PIPE_VIDEO_CAP_SUPPORTS_INTERLACED:
/* MPEG2 only with shaders and no support for
interlacing on R6xx style UVD */
return codec != PIPE_VIDEO_FORMAT_MPEG12 &&
rscreen->family > CHIP_RV770;
default:
break;
}
}
switch (param) {
case PIPE_VIDEO_CAP_SUPPORTED:
switch (u_reduce_video_profile(profile)) {
switch (codec) {
case PIPE_VIDEO_FORMAT_MPEG12:
case PIPE_VIDEO_FORMAT_MPEG4:
case PIPE_VIDEO_FORMAT_MPEG4_AVC:
return entrypoint != PIPE_VIDEO_ENTRYPOINT_ENCODE;
if (rscreen->family < CHIP_PALM)
/* no support for MPEG4 */
return codec != PIPE_VIDEO_FORMAT_MPEG4;
return true;
case PIPE_VIDEO_FORMAT_VC1:
/* FIXME: VC-1 simple/main profile is broken */
return profile == PIPE_VIDEO_PROFILE_VC1_ADVANCED &&
entrypoint != PIPE_VIDEO_ENTRYPOINT_ENCODE;
return profile == PIPE_VIDEO_PROFILE_VC1_ADVANCED;
case PIPE_VIDEO_FORMAT_HEVC:
/* Carrizo only supports HEVC Main */
return rscreen->family >= CHIP_CARRIZO &&
@@ -280,13 +262,17 @@ int rvid_get_video_param(struct pipe_screen *screen,
case PIPE_VIDEO_CAP_PREFERED_FORMAT:
return PIPE_FORMAT_NV12;
case PIPE_VIDEO_CAP_PREFERS_INTERLACED:
if (u_reduce_video_profile(profile) == PIPE_VIDEO_FORMAT_HEVC)
return false; //The hardware doesn't support interlaced HEVC.
return true;
case PIPE_VIDEO_CAP_SUPPORTS_INTERLACED:
if (u_reduce_video_profile(profile) == PIPE_VIDEO_FORMAT_HEVC)
return false; //The hardware doesn't support interlaced HEVC.
return true;
if (rscreen->family < CHIP_PALM) {
/* MPEG2 only with shaders and no support for
interlacing on R6xx style UVD */
return codec != PIPE_VIDEO_FORMAT_MPEG12 &&
rscreen->family > CHIP_RV770;
} else {
if (u_reduce_video_profile(profile) == PIPE_VIDEO_FORMAT_HEVC)
return false; //The firmware doesn't support interlaced HEVC.
return true;
}
case PIPE_VIDEO_CAP_SUPPORTS_PROGRESSIVE:
return true;
case PIPE_VIDEO_CAP_MAX_LEVEL:

View File

@@ -137,6 +137,7 @@ enum radeon_family {
CHIP_ICELAND,
CHIP_CARRIZO,
CHIP_FIJI,
CHIP_STONEY,
CHIP_LAST,
};

View File

@@ -3266,6 +3266,7 @@ static void si_init_config(struct si_context *sctx)
break;
case CHIP_KABINI:
case CHIP_MULLINS:
case CHIP_STONEY:
raster_config = 0x00000000;
raster_config_1 = 0x00000000;
break;

View File

@@ -6732,6 +6732,9 @@
#define S_00B854_WAVES_PER_SH(x) (((x) & 0x3F) << 0) /* mask is 0x3FF on CIK */
#define G_00B854_WAVES_PER_SH(x) (((x) >> 0) & 0x3F) /* mask is 0x3FF on CIK */
#define C_00B854_WAVES_PER_SH 0xFFFFFFC0 /* mask is 0x3FF on CIK */
#define S_00B854_WAVES_PER_SH_CIK(x) (((x) & 0x3FF) << 0)
#define G_00B854_WAVES_PER_SH_CIK(x) (((x) >> 0) & 0x3FF)
#define C_00B854_WAVES_PER_SH_CIK 0xFFFFFC00
#define S_00B854_TG_PER_CU(x) (((x) & 0x0F) << 12)
#define G_00B854_TG_PER_CU(x) (((x) >> 12) & 0x0F)
#define C_00B854_TG_PER_CU 0xFFFF0FFF
@@ -8335,6 +8338,296 @@
#define V_028714_SPI_SHADER_UINT16_ABGR 0x07
#define V_028714_SPI_SHADER_SINT16_ABGR 0x08
#define V_028714_SPI_SHADER_32_ABGR 0x09
/* Stoney */
#define R_028754_SX_PS_DOWNCONVERT 0x028754
#define S_028754_MRT0(x) (((x) & 0x0F) << 0)
#define G_028754_MRT0(x) (((x) >> 0) & 0x0F)
#define C_028754_MRT0 0xFFFFFFF0
#define V_028754_SX_RT_EXPORT_NO_CONVERSION 0
#define V_028754_SX_RT_EXPORT_32_R 1
#define V_028754_SX_RT_EXPORT_32_A 2
#define V_028754_SX_RT_EXPORT_10_11_11 3
#define V_028754_SX_RT_EXPORT_2_10_10_10 4
#define V_028754_SX_RT_EXPORT_8_8_8_8 5
#define V_028754_SX_RT_EXPORT_5_6_5 6
#define V_028754_SX_RT_EXPORT_1_5_5_5 7
#define V_028754_SX_RT_EXPORT_4_4_4_4 8
#define V_028754_SX_RT_EXPORT_16_16_GR 9
#define V_028754_SX_RT_EXPORT_16_16_AR 10
#define S_028754_MRT1(x) (((x) & 0x0F) << 4)
#define G_028754_MRT1(x) (((x) >> 4) & 0x0F)
#define C_028754_MRT1 0xFFFFFF0F
#define S_028754_MRT2(x) (((x) & 0x0F) << 8)
#define G_028754_MRT2(x) (((x) >> 8) & 0x0F)
#define C_028754_MRT2 0xFFFFF0FF
#define S_028754_MRT3(x) (((x) & 0x0F) << 12)
#define G_028754_MRT3(x) (((x) >> 12) & 0x0F)
#define C_028754_MRT3 0xFFFF0FFF
#define S_028754_MRT4(x) (((x) & 0x0F) << 16)
#define G_028754_MRT4(x) (((x) >> 16) & 0x0F)
#define C_028754_MRT4 0xFFF0FFFF
#define S_028754_MRT5(x) (((x) & 0x0F) << 20)
#define G_028754_MRT5(x) (((x) >> 20) & 0x0F)
#define C_028754_MRT5 0xFF0FFFFF
#define S_028754_MRT6(x) (((x) & 0x0F) << 24)
#define G_028754_MRT6(x) (((x) >> 24) & 0x0F)
#define C_028754_MRT6 0xF0FFFFFF
#define S_028754_MRT7(x) (((x) & 0x0F) << 28)
#define G_028754_MRT7(x) (((x) >> 28) & 0x0F)
#define C_028754_MRT7 0x0FFFFFFF
#define R_028758_SX_BLEND_OPT_EPSILON 0x028758
#define S_028758_MRT0_EPSILON(x) (((x) & 0x0F) << 0)
#define G_028758_MRT0_EPSILON(x) (((x) >> 0) & 0x0F)
#define C_028758_MRT0_EPSILON 0xFFFFFFF0
#define V_028758_EXACT 0
#define V_028758_11BIT_FORMAT 1
#define V_028758_10BIT_FORMAT 3
#define V_028758_8BIT_FORMAT 7
#define V_028758_6BIT_FORMAT 11
#define V_028758_5BIT_FORMAT 13
#define V_028758_4BIT_FORMAT 15
#define S_028758_MRT1_EPSILON(x) (((x) & 0x0F) << 4)
#define G_028758_MRT1_EPSILON(x) (((x) >> 4) & 0x0F)
#define C_028758_MRT1_EPSILON 0xFFFFFF0F
#define S_028758_MRT2_EPSILON(x) (((x) & 0x0F) << 8)
#define G_028758_MRT2_EPSILON(x) (((x) >> 8) & 0x0F)
#define C_028758_MRT2_EPSILON 0xFFFFF0FF
#define S_028758_MRT3_EPSILON(x) (((x) & 0x0F) << 12)
#define G_028758_MRT3_EPSILON(x) (((x) >> 12) & 0x0F)
#define C_028758_MRT3_EPSILON 0xFFFF0FFF
#define S_028758_MRT4_EPSILON(x) (((x) & 0x0F) << 16)
#define G_028758_MRT4_EPSILON(x) (((x) >> 16) & 0x0F)
#define C_028758_MRT4_EPSILON 0xFFF0FFFF
#define S_028758_MRT5_EPSILON(x) (((x) & 0x0F) << 20)
#define G_028758_MRT5_EPSILON(x) (((x) >> 20) & 0x0F)
#define C_028758_MRT5_EPSILON 0xFF0FFFFF
#define S_028758_MRT6_EPSILON(x) (((x) & 0x0F) << 24)
#define G_028758_MRT6_EPSILON(x) (((x) >> 24) & 0x0F)
#define C_028758_MRT6_EPSILON 0xF0FFFFFF
#define S_028758_MRT7_EPSILON(x) (((x) & 0x0F) << 28)
#define G_028758_MRT7_EPSILON(x) (((x) >> 28) & 0x0F)
#define C_028758_MRT7_EPSILON 0x0FFFFFFF
#define R_02875C_SX_BLEND_OPT_CONTROL 0x02875C
#define S_02875C_MRT0_COLOR_OPT_DISABLE(x) (((x) & 0x1) << 0)
#define G_02875C_MRT0_COLOR_OPT_DISABLE(x) (((x) >> 0) & 0x1)
#define C_02875C_MRT0_COLOR_OPT_DISABLE 0xFFFFFFFE
#define S_02875C_MRT0_ALPHA_OPT_DISABLE(x) (((x) & 0x1) << 1)
#define G_02875C_MRT0_ALPHA_OPT_DISABLE(x) (((x) >> 1) & 0x1)
#define C_02875C_MRT0_ALPHA_OPT_DISABLE 0xFFFFFFFD
#define S_02875C_MRT1_COLOR_OPT_DISABLE(x) (((x) & 0x1) << 4)
#define G_02875C_MRT1_COLOR_OPT_DISABLE(x) (((x) >> 4) & 0x1)
#define C_02875C_MRT1_COLOR_OPT_DISABLE 0xFFFFFFEF
#define S_02875C_MRT1_ALPHA_OPT_DISABLE(x) (((x) & 0x1) << 5)
#define G_02875C_MRT1_ALPHA_OPT_DISABLE(x) (((x) >> 5) & 0x1)
#define C_02875C_MRT1_ALPHA_OPT_DISABLE 0xFFFFFFDF
#define S_02875C_MRT2_COLOR_OPT_DISABLE(x) (((x) & 0x1) << 8)
#define G_02875C_MRT2_COLOR_OPT_DISABLE(x) (((x) >> 8) & 0x1)
#define C_02875C_MRT2_COLOR_OPT_DISABLE 0xFFFFFEFF
#define S_02875C_MRT2_ALPHA_OPT_DISABLE(x) (((x) & 0x1) << 9)
#define G_02875C_MRT2_ALPHA_OPT_DISABLE(x) (((x) >> 9) & 0x1)
#define C_02875C_MRT2_ALPHA_OPT_DISABLE 0xFFFFFDFF
#define S_02875C_MRT3_COLOR_OPT_DISABLE(x) (((x) & 0x1) << 12)
#define G_02875C_MRT3_COLOR_OPT_DISABLE(x) (((x) >> 12) & 0x1)
#define C_02875C_MRT3_COLOR_OPT_DISABLE 0xFFFFEFFF
#define S_02875C_MRT3_ALPHA_OPT_DISABLE(x) (((x) & 0x1) << 13)
#define G_02875C_MRT3_ALPHA_OPT_DISABLE(x) (((x) >> 13) & 0x1)
#define C_02875C_MRT3_ALPHA_OPT_DISABLE 0xFFFFDFFF
#define S_02875C_MRT4_COLOR_OPT_DISABLE(x) (((x) & 0x1) << 16)
#define G_02875C_MRT4_COLOR_OPT_DISABLE(x) (((x) >> 16) & 0x1)
#define C_02875C_MRT4_COLOR_OPT_DISABLE 0xFFFEFFFF
#define S_02875C_MRT4_ALPHA_OPT_DISABLE(x) (((x) & 0x1) << 17)
#define G_02875C_MRT4_ALPHA_OPT_DISABLE(x) (((x) >> 17) & 0x1)
#define C_02875C_MRT4_ALPHA_OPT_DISABLE 0xFFFDFFFF
#define S_02875C_MRT5_COLOR_OPT_DISABLE(x) (((x) & 0x1) << 20)
#define G_02875C_MRT5_COLOR_OPT_DISABLE(x) (((x) >> 20) & 0x1)
#define C_02875C_MRT5_COLOR_OPT_DISABLE 0xFFEFFFFF
#define S_02875C_MRT5_ALPHA_OPT_DISABLE(x) (((x) & 0x1) << 21)
#define G_02875C_MRT5_ALPHA_OPT_DISABLE(x) (((x) >> 21) & 0x1)
#define C_02875C_MRT5_ALPHA_OPT_DISABLE 0xFFDFFFFF
#define S_02875C_MRT6_COLOR_OPT_DISABLE(x) (((x) & 0x1) << 24)
#define G_02875C_MRT6_COLOR_OPT_DISABLE(x) (((x) >> 24) & 0x1)
#define C_02875C_MRT6_COLOR_OPT_DISABLE 0xFEFFFFFF
#define S_02875C_MRT6_ALPHA_OPT_DISABLE(x) (((x) & 0x1) << 25)
#define G_02875C_MRT6_ALPHA_OPT_DISABLE(x) (((x) >> 25) & 0x1)
#define C_02875C_MRT6_ALPHA_OPT_DISABLE 0xFDFFFFFF
#define S_02875C_MRT7_COLOR_OPT_DISABLE(x) (((x) & 0x1) << 28)
#define G_02875C_MRT7_COLOR_OPT_DISABLE(x) (((x) >> 28) & 0x1)
#define C_02875C_MRT7_COLOR_OPT_DISABLE 0xEFFFFFFF
#define S_02875C_MRT7_ALPHA_OPT_DISABLE(x) (((x) & 0x1) << 29)
#define G_02875C_MRT7_ALPHA_OPT_DISABLE(x) (((x) >> 29) & 0x1)
#define C_02875C_MRT7_ALPHA_OPT_DISABLE 0xDFFFFFFF
#define S_02875C_PIXEN_ZERO_OPT_DISABLE(x) (((x) & 0x1) << 31)
#define G_02875C_PIXEN_ZERO_OPT_DISABLE(x) (((x) >> 31) & 0x1)
#define C_02875C_PIXEN_ZERO_OPT_DISABLE 0x7FFFFFFF
#define R_028760_SX_MRT0_BLEND_OPT 0x028760
#define S_028760_COLOR_SRC_OPT(x) (((x) & 0x07) << 0)
#define G_028760_COLOR_SRC_OPT(x) (((x) >> 0) & 0x07)
#define C_028760_COLOR_SRC_OPT 0xFFFFFFF8
#define V_028760_BLEND_OPT_PRESERVE_NONE_IGNORE_ALL 0
#define V_028760_BLEND_OPT_PRESERVE_ALL_IGNORE_NONE 1
#define V_028760_BLEND_OPT_PRESERVE_C1_IGNORE_C0 2
#define V_028760_BLEND_OPT_PRESERVE_C0_IGNORE_C1 3
#define V_028760_BLEND_OPT_PRESERVE_A1_IGNORE_A0 4
#define V_028760_BLEND_OPT_PRESERVE_A0_IGNORE_A1 5
#define V_028760_BLEND_OPT_PRESERVE_NONE_IGNORE_A0 6
#define V_028760_BLEND_OPT_PRESERVE_NONE_IGNORE_NONE 7
#define S_028760_COLOR_DST_OPT(x) (((x) & 0x07) << 4)
#define G_028760_COLOR_DST_OPT(x) (((x) >> 4) & 0x07)
#define C_028760_COLOR_DST_OPT 0xFFFFFF8F
#define S_028760_COLOR_COMB_FCN(x) (((x) & 0x07) << 8)
#define G_028760_COLOR_COMB_FCN(x) (((x) >> 8) & 0x07)
#define C_028760_COLOR_COMB_FCN 0xFFFFF8FF
#define V_028760_OPT_COMB_NONE 0
#define V_028760_OPT_COMB_ADD 1
#define V_028760_OPT_COMB_SUBTRACT 2
#define V_028760_OPT_COMB_MIN 3
#define V_028760_OPT_COMB_MAX 4
#define V_028760_OPT_COMB_REVSUBTRACT 5
#define V_028760_OPT_COMB_BLEND_DISABLED 6
#define V_028760_OPT_COMB_SAFE_ADD 7
#define S_028760_ALPHA_SRC_OPT(x) (((x) & 0x07) << 16)
#define G_028760_ALPHA_SRC_OPT(x) (((x) >> 16) & 0x07)
#define C_028760_ALPHA_SRC_OPT 0xFFF8FFFF
#define S_028760_ALPHA_DST_OPT(x) (((x) & 0x07) << 20)
#define G_028760_ALPHA_DST_OPT(x) (((x) >> 20) & 0x07)
#define C_028760_ALPHA_DST_OPT 0xFF8FFFFF
#define S_028760_ALPHA_COMB_FCN(x) (((x) & 0x07) << 24)
#define G_028760_ALPHA_COMB_FCN(x) (((x) >> 24) & 0x07)
#define C_028760_ALPHA_COMB_FCN 0xF8FFFFFF
#define R_028764_SX_MRT1_BLEND_OPT 0x028764
#define S_028764_COLOR_SRC_OPT(x) (((x) & 0x07) << 0)
#define G_028764_COLOR_SRC_OPT(x) (((x) >> 0) & 0x07)
#define C_028764_COLOR_SRC_OPT 0xFFFFFFF8
#define S_028764_COLOR_DST_OPT(x) (((x) & 0x07) << 4)
#define G_028764_COLOR_DST_OPT(x) (((x) >> 4) & 0x07)
#define C_028764_COLOR_DST_OPT 0xFFFFFF8F
#define S_028764_COLOR_COMB_FCN(x) (((x) & 0x07) << 8)
#define G_028764_COLOR_COMB_FCN(x) (((x) >> 8) & 0x07)
#define C_028764_COLOR_COMB_FCN 0xFFFFF8FF
#define S_028764_ALPHA_SRC_OPT(x) (((x) & 0x07) << 16)
#define G_028764_ALPHA_SRC_OPT(x) (((x) >> 16) & 0x07)
#define C_028764_ALPHA_SRC_OPT 0xFFF8FFFF
#define S_028764_ALPHA_DST_OPT(x) (((x) & 0x07) << 20)
#define G_028764_ALPHA_DST_OPT(x) (((x) >> 20) & 0x07)
#define C_028764_ALPHA_DST_OPT 0xFF8FFFFF
#define S_028764_ALPHA_COMB_FCN(x) (((x) & 0x07) << 24)
#define G_028764_ALPHA_COMB_FCN(x) (((x) >> 24) & 0x07)
#define C_028764_ALPHA_COMB_FCN 0xF8FFFFFF
#define R_028768_SX_MRT2_BLEND_OPT 0x028768
#define S_028768_COLOR_SRC_OPT(x) (((x) & 0x07) << 0)
#define G_028768_COLOR_SRC_OPT(x) (((x) >> 0) & 0x07)
#define C_028768_COLOR_SRC_OPT 0xFFFFFFF8
#define S_028768_COLOR_DST_OPT(x) (((x) & 0x07) << 4)
#define G_028768_COLOR_DST_OPT(x) (((x) >> 4) & 0x07)
#define C_028768_COLOR_DST_OPT 0xFFFFFF8F
#define S_028768_COLOR_COMB_FCN(x) (((x) & 0x07) << 8)
#define G_028768_COLOR_COMB_FCN(x) (((x) >> 8) & 0x07)
#define C_028768_COLOR_COMB_FCN 0xFFFFF8FF
#define S_028768_ALPHA_SRC_OPT(x) (((x) & 0x07) << 16)
#define G_028768_ALPHA_SRC_OPT(x) (((x) >> 16) & 0x07)
#define C_028768_ALPHA_SRC_OPT 0xFFF8FFFF
#define S_028768_ALPHA_DST_OPT(x) (((x) & 0x07) << 20)
#define G_028768_ALPHA_DST_OPT(x) (((x) >> 20) & 0x07)
#define C_028768_ALPHA_DST_OPT 0xFF8FFFFF
#define S_028768_ALPHA_COMB_FCN(x) (((x) & 0x07) << 24)
#define G_028768_ALPHA_COMB_FCN(x) (((x) >> 24) & 0x07)
#define C_028768_ALPHA_COMB_FCN 0xF8FFFFFF
#define R_02876C_SX_MRT3_BLEND_OPT 0x02876C
#define S_02876C_COLOR_SRC_OPT(x) (((x) & 0x07) << 0)
#define G_02876C_COLOR_SRC_OPT(x) (((x) >> 0) & 0x07)
#define C_02876C_COLOR_SRC_OPT 0xFFFFFFF8
#define S_02876C_COLOR_DST_OPT(x) (((x) & 0x07) << 4)
#define G_02876C_COLOR_DST_OPT(x) (((x) >> 4) & 0x07)
#define C_02876C_COLOR_DST_OPT 0xFFFFFF8F
#define S_02876C_COLOR_COMB_FCN(x) (((x) & 0x07) << 8)
#define G_02876C_COLOR_COMB_FCN(x) (((x) >> 8) & 0x07)
#define C_02876C_COLOR_COMB_FCN 0xFFFFF8FF
#define S_02876C_ALPHA_SRC_OPT(x) (((x) & 0x07) << 16)
#define G_02876C_ALPHA_SRC_OPT(x) (((x) >> 16) & 0x07)
#define C_02876C_ALPHA_SRC_OPT 0xFFF8FFFF
#define S_02876C_ALPHA_DST_OPT(x) (((x) & 0x07) << 20)
#define G_02876C_ALPHA_DST_OPT(x) (((x) >> 20) & 0x07)
#define C_02876C_ALPHA_DST_OPT 0xFF8FFFFF
#define S_02876C_ALPHA_COMB_FCN(x) (((x) & 0x07) << 24)
#define G_02876C_ALPHA_COMB_FCN(x) (((x) >> 24) & 0x07)
#define C_02876C_ALPHA_COMB_FCN 0xF8FFFFFF
#define R_028770_SX_MRT4_BLEND_OPT 0x028770
#define S_028770_COLOR_SRC_OPT(x) (((x) & 0x07) << 0)
#define G_028770_COLOR_SRC_OPT(x) (((x) >> 0) & 0x07)
#define C_028770_COLOR_SRC_OPT 0xFFFFFFF8
#define S_028770_COLOR_DST_OPT(x) (((x) & 0x07) << 4)
#define G_028770_COLOR_DST_OPT(x) (((x) >> 4) & 0x07)
#define C_028770_COLOR_DST_OPT 0xFFFFFF8F
#define S_028770_COLOR_COMB_FCN(x) (((x) & 0x07) << 8)
#define G_028770_COLOR_COMB_FCN(x) (((x) >> 8) & 0x07)
#define C_028770_COLOR_COMB_FCN 0xFFFFF8FF
#define S_028770_ALPHA_SRC_OPT(x) (((x) & 0x07) << 16)
#define G_028770_ALPHA_SRC_OPT(x) (((x) >> 16) & 0x07)
#define C_028770_ALPHA_SRC_OPT 0xFFF8FFFF
#define S_028770_ALPHA_DST_OPT(x) (((x) & 0x07) << 20)
#define G_028770_ALPHA_DST_OPT(x) (((x) >> 20) & 0x07)
#define C_028770_ALPHA_DST_OPT 0xFF8FFFFF
#define S_028770_ALPHA_COMB_FCN(x) (((x) & 0x07) << 24)
#define G_028770_ALPHA_COMB_FCN(x) (((x) >> 24) & 0x07)
#define C_028770_ALPHA_COMB_FCN 0xF8FFFFFF
#define R_028774_SX_MRT5_BLEND_OPT 0x028774
#define S_028774_COLOR_SRC_OPT(x) (((x) & 0x07) << 0)
#define G_028774_COLOR_SRC_OPT(x) (((x) >> 0) & 0x07)
#define C_028774_COLOR_SRC_OPT 0xFFFFFFF8
#define S_028774_COLOR_DST_OPT(x) (((x) & 0x07) << 4)
#define G_028774_COLOR_DST_OPT(x) (((x) >> 4) & 0x07)
#define C_028774_COLOR_DST_OPT 0xFFFFFF8F
#define S_028774_COLOR_COMB_FCN(x) (((x) & 0x07) << 8)
#define G_028774_COLOR_COMB_FCN(x) (((x) >> 8) & 0x07)
#define C_028774_COLOR_COMB_FCN 0xFFFFF8FF
#define S_028774_ALPHA_SRC_OPT(x) (((x) & 0x07) << 16)
#define G_028774_ALPHA_SRC_OPT(x) (((x) >> 16) & 0x07)
#define C_028774_ALPHA_SRC_OPT 0xFFF8FFFF
#define S_028774_ALPHA_DST_OPT(x) (((x) & 0x07) << 20)
#define G_028774_ALPHA_DST_OPT(x) (((x) >> 20) & 0x07)
#define C_028774_ALPHA_DST_OPT 0xFF8FFFFF
#define S_028774_ALPHA_COMB_FCN(x) (((x) & 0x07) << 24)
#define G_028774_ALPHA_COMB_FCN(x) (((x) >> 24) & 0x07)
#define C_028774_ALPHA_COMB_FCN 0xF8FFFFFF
#define R_028778_SX_MRT6_BLEND_OPT 0x028778
#define S_028778_COLOR_SRC_OPT(x) (((x) & 0x07) << 0)
#define G_028778_COLOR_SRC_OPT(x) (((x) >> 0) & 0x07)
#define C_028778_COLOR_SRC_OPT 0xFFFFFFF8
#define S_028778_COLOR_DST_OPT(x) (((x) & 0x07) << 4)
#define G_028778_COLOR_DST_OPT(x) (((x) >> 4) & 0x07)
#define C_028778_COLOR_DST_OPT 0xFFFFFF8F
#define S_028778_COLOR_COMB_FCN(x) (((x) & 0x07) << 8)
#define G_028778_COLOR_COMB_FCN(x) (((x) >> 8) & 0x07)
#define C_028778_COLOR_COMB_FCN 0xFFFFF8FF
#define S_028778_ALPHA_SRC_OPT(x) (((x) & 0x07) << 16)
#define G_028778_ALPHA_SRC_OPT(x) (((x) >> 16) & 0x07)
#define C_028778_ALPHA_SRC_OPT 0xFFF8FFFF
#define S_028778_ALPHA_DST_OPT(x) (((x) & 0x07) << 20)
#define G_028778_ALPHA_DST_OPT(x) (((x) >> 20) & 0x07)
#define C_028778_ALPHA_DST_OPT 0xFF8FFFFF
#define S_028778_ALPHA_COMB_FCN(x) (((x) & 0x07) << 24)
#define G_028778_ALPHA_COMB_FCN(x) (((x) >> 24) & 0x07)
#define C_028778_ALPHA_COMB_FCN 0xF8FFFFFF
#define R_02877C_SX_MRT7_BLEND_OPT 0x02877C
#define S_02877C_COLOR_SRC_OPT(x) (((x) & 0x07) << 0)
#define G_02877C_COLOR_SRC_OPT(x) (((x) >> 0) & 0x07)
#define C_02877C_COLOR_SRC_OPT 0xFFFFFFF8
#define S_02877C_COLOR_DST_OPT(x) (((x) & 0x07) << 4)
#define G_02877C_COLOR_DST_OPT(x) (((x) >> 4) & 0x07)
#define C_02877C_COLOR_DST_OPT 0xFFFFFF8F
#define S_02877C_COLOR_COMB_FCN(x) (((x) & 0x07) << 8)
#define G_02877C_COLOR_COMB_FCN(x) (((x) >> 8) & 0x07)
#define C_02877C_COLOR_COMB_FCN 0xFFFFF8FF
#define S_02877C_ALPHA_SRC_OPT(x) (((x) & 0x07) << 16)
#define G_02877C_ALPHA_SRC_OPT(x) (((x) >> 16) & 0x07)
#define C_02877C_ALPHA_SRC_OPT 0xFFF8FFFF
#define S_02877C_ALPHA_DST_OPT(x) (((x) & 0x07) << 20)
#define G_02877C_ALPHA_DST_OPT(x) (((x) >> 20) & 0x07)
#define C_02877C_ALPHA_DST_OPT 0xFF8FFFFF
#define S_02877C_ALPHA_COMB_FCN(x) (((x) & 0x07) << 24)
#define G_02877C_ALPHA_COMB_FCN(x) (((x) >> 24) & 0x07)
#define C_02877C_ALPHA_COMB_FCN 0xF8FFFFFF
/* */
#define R_028780_CB_BLEND0_CONTROL 0x028780
#define S_028780_COLOR_SRCBLEND(x) (((x) & 0x1F) << 0)
#define G_028780_COLOR_SRCBLEND(x) (((x) >> 0) & 0x1F)
@@ -8597,6 +8890,7 @@
#define V_028808_CB_ELIMINATE_FAST_CLEAR 0x02
#define V_028808_CB_RESOLVE 0x03
#define V_028808_CB_FMASK_DECOMPRESS 0x05
#define V_028808_CB_DCC_DECOMPRESS 0x06
#define S_028808_ROP3(x) (((x) & 0xFF) << 16)
#define G_028808_ROP3(x) (((x) >> 16) & 0xFF)
#define C_028808_ROP3 0xFF00FFFF
@@ -8675,6 +8969,11 @@
#define V_02880C_EXPORT_GREATER_THAN_Z 2
#define V_02880C_EXPORT_RESERVED 3
/* */
/* Stoney */
#define S_02880C_DUAL_QUAD_DISABLE(x) (((x) & 0x1) << 15)
#define G_02880C_DUAL_QUAD_DISABLE(x) (((x) >> 15) & 0x1)
#define C_02880C_DUAL_QUAD_DISABLE 0xFFFF7FFF
/* */
#define R_028810_PA_CL_CLIP_CNTL 0x028810
#define S_028810_UCP_ENA_0(x) (((x) & 0x1) << 0)
#define G_028810_UCP_ENA_0(x) (((x) >> 0) & 0x1)
@@ -9256,6 +9555,9 @@
#define V_028A40_GS_SCENARIO_G 0x03
#define V_028A40_GS_SCENARIO_C 0x04
#define V_028A40_SPRITE_EN 0x05
#define S_028A40_RESERVED_0(x) (((x) & 0x1) << 3)
#define G_028A40_RESERVED_0(x) (((x) >> 3) & 0x1)
#define C_028A40_RESERVED_0 0xFFFFFFF7
#define S_028A40_CUT_MODE(x) (((x) & 0x03) << 4)
#define G_028A40_CUT_MODE(x) (((x) >> 4) & 0x03)
#define C_028A40_CUT_MODE 0xFFFFFFCF
@@ -9263,12 +9565,19 @@
#define V_028A40_GS_CUT_512 0x01
#define V_028A40_GS_CUT_256 0x02
#define V_028A40_GS_CUT_128 0x03
#define S_028A40_RESERVED_1(x) (((x) & 0x1F) << 6)
#define G_028A40_RESERVED_1(x) (((x) >> 6) & 0x1F)
#define C_028A40_RESERVED_1 0xFFFFF83F
#define S_028A40_GS_C_PACK_EN(x) (((x) & 0x1) << 11)
#define G_028A40_GS_C_PACK_EN(x) (((x) >> 11) & 0x1)
#define C_028A40_GS_C_PACK_EN 0xFFFFF7FF
#define S_028A40_RESERVED_2(x) (((x) & 0x1) << 12)
#define G_028A40_RESERVED_2(x) (((x) >> 12) & 0x1)
#define C_028A40_RESERVED_2 0xFFFFEFFF
#define S_028A40_ES_PASSTHRU(x) (((x) & 0x1) << 13)
#define G_028A40_ES_PASSTHRU(x) (((x) >> 13) & 0x1)
#define C_028A40_ES_PASSTHRU 0xFFFFDFFF
/* SI-CIK */
#define S_028A40_COMPUTE_MODE(x) (((x) & 0x1) << 14)
#define G_028A40_COMPUTE_MODE(x) (((x) >> 14) & 0x1)
#define C_028A40_COMPUTE_MODE 0xFFFFBFFF
@@ -9278,6 +9587,7 @@
#define S_028A40_ELEMENT_INFO_EN(x) (((x) & 0x1) << 16)
#define G_028A40_ELEMENT_INFO_EN(x) (((x) >> 16) & 0x1)
#define C_028A40_ELEMENT_INFO_EN 0xFFFEFFFF
/* */
#define S_028A40_PARTIAL_THD_AT_EOI(x) (((x) & 0x1) << 17)
#define G_028A40_PARTIAL_THD_AT_EOI(x) (((x) >> 17) & 0x1)
#define C_028A40_PARTIAL_THD_AT_EOI 0xFFFDFFFF
@@ -9463,6 +9773,9 @@
#define C_028A7C_RDREQ_POLICY 0xFFFFFF3F
#define V_028A7C_VGT_POLICY_LRU 0x00
#define V_028A7C_VGT_POLICY_STREAM 0x01
#define S_028A7C_RDREQ_POLICY_VI(x) (((x) & 0x1) << 6)
#define G_028A7C_RDREQ_POLICY_VI(x) (((x) >> 6) & 0x1)
#define C_028A7C_RDREQ_POLICY_VI 0xFFFFFFBF
#define S_028A7C_ATC(x) (((x) & 0x1) << 8)
#define G_028A7C_ATC(x) (((x) >> 8) & 0x1)
#define C_028A7C_ATC 0xFFFFFEFF
@@ -9839,6 +10152,9 @@
#define V_028B6C_VGT_POLICY_BYPASS 0x02
/* */
/* VI */
#define S_028B6C_RDREQ_POLICY_VI(x) (((x) & 0x1) << 15)
#define G_028B6C_RDREQ_POLICY_VI(x) (((x) >> 15) & 0x1)
#define C_028B6C_RDREQ_POLICY_VI 0xFFFF7FFF
#define S_028B6C_DISTRIBUTION_MODE(x) (((x) & 0x03) << 17)
#define G_028B6C_DISTRIBUTION_MODE(x) (((x) >> 17) & 0x03)
#define C_028B6C_DISTRIBUTION_MODE 0xFFF9FFFF
@@ -10441,6 +10757,12 @@
#define S_028C3C_AA_MASK_X1Y1(x) (((x) & 0xFFFF) << 16)
#define G_028C3C_AA_MASK_X1Y1(x) (((x) >> 16) & 0xFFFF)
#define C_028C3C_AA_MASK_X1Y1 0x0000FFFF
/* Stoney */
#define R_028C40_PA_SC_SHADER_CONTROL 0x028C40
#define S_028C40_REALIGN_DQUADS_AFTER_N_WAVES(x) (((x) & 0x03) << 0)
#define G_028C40_REALIGN_DQUADS_AFTER_N_WAVES(x) (((x) >> 0) & 0x03)
#define C_028C40_REALIGN_DQUADS_AFTER_N_WAVES 0xFFFFFFFC
/* */
#define R_028C58_VGT_VERTEX_REUSE_BLOCK_CNTL 0x028C58
#define S_028C58_VTX_REUSE_DEPTH(x) (((x) & 0xFF) << 0)
#define G_028C58_VTX_REUSE_DEPTH(x) (((x) >> 0) & 0xFF)

View File

@@ -36,6 +36,9 @@
static bool dump_stats = false;
static void
vc4_bo_cache_free_all(struct vc4_bo_cache *cache);
static void
vc4_bo_dump_stats(struct vc4_screen *screen)
{
@@ -136,6 +139,8 @@ vc4_bo_alloc(struct vc4_screen *screen, uint32_t size, const char *name)
bo->name = name;
bo->private = true;
bool cleared_and_retried = false;
retry:
if (!using_vc4_simulator) {
struct drm_vc4_create_bo create;
memset(&create, 0, sizeof(create));
@@ -157,6 +162,12 @@ vc4_bo_alloc(struct vc4_screen *screen, uint32_t size, const char *name)
assert(create.size >= size);
}
if (ret != 0) {
if (!list_empty(&screen->bo_cache.time_list) &&
!cleared_and_retried) {
cleared_and_retried = true;
vc4_bo_cache_free_all(&screen->bo_cache);
goto retry;
}
fprintf(stderr, "create ioctl failure\n");
abort();
}
@@ -248,6 +259,18 @@ free_stale_bos(struct vc4_screen *screen, time_t time)
}
}
static void
vc4_bo_cache_free_all(struct vc4_bo_cache *cache)
{
pipe_mutex_lock(cache->lock);
list_for_each_entry_safe(struct vc4_bo, bo, &cache->time_list,
time_list) {
vc4_bo_remove_from_cache(cache, bo);
vc4_bo_free(bo);
}
pipe_mutex_unlock(cache->lock);
}
void
vc4_bo_last_unreference_locked_timed(struct vc4_bo *bo, time_t time)
{
@@ -600,11 +623,7 @@ vc4_bufmgr_destroy(struct pipe_screen *pscreen)
struct vc4_screen *screen = vc4_screen(pscreen);
struct vc4_bo_cache *cache = &screen->bo_cache;
list_for_each_entry_safe(struct vc4_bo, bo, &cache->time_list,
time_list) {
vc4_bo_remove_from_cache(cache, bo);
vc4_bo_free(bo);
}
vc4_bo_cache_free_all(cache);
if (dump_stats) {
fprintf(stderr, "BO stats after screen destroy:\n");

View File

@@ -73,6 +73,9 @@ vlVaBufferSetNumElements(VADriverContextP ctx, VABufferID buf_id,
return VA_STATUS_ERROR_INVALID_CONTEXT;
buf = handle_table_get(VL_VA_DRIVER(ctx)->htab, buf_id);
if (!buf)
return VA_STATUS_ERROR_INVALID_BUFFER;
buf->data = REALLOC(buf->data, buf->size * buf->num_elements,
buf->size * num_elements);
buf->num_elements = num_elements;
@@ -91,6 +94,9 @@ vlVaMapBuffer(VADriverContextP ctx, VABufferID buf_id, void **pbuff)
if (!ctx)
return VA_STATUS_ERROR_INVALID_CONTEXT;
if (!pbuff)
return VA_STATUS_ERROR_INVALID_PARAMETER;
buf = handle_table_get(VL_VA_DRIVER(ctx)->htab, buf_id);
if (!buf)
return VA_STATUS_ERROR_INVALID_BUFFER;

View File

@@ -332,13 +332,20 @@ vlVaPutImage(VADriverContextP ctx, VASurfaceID surface, VAImageID image,
if (format == PIPE_FORMAT_NONE)
return VA_STATUS_ERROR_OPERATION_FAILED;
if (surf->buffer == NULL || format != surf->buffer->buffer_format) {
if (surf->buffer)
surf->buffer->destroy(surf->buffer);
if (format != surf->buffer->buffer_format) {
struct pipe_video_buffer *tmp_buf;
enum pipe_format old_surf_format = surf->templat.buffer_format;
surf->templat.buffer_format = format;
surf->buffer = drv->pipe->create_video_buffer(drv->pipe, &surf->templat);
if (!surf->buffer)
return VA_STATUS_ERROR_ALLOCATION_FAILED;
tmp_buf = drv->pipe->create_video_buffer(drv->pipe, &surf->templat);
if (!tmp_buf) {
surf->templat.buffer_format = old_surf_format;
return VA_STATUS_ERROR_ALLOCATION_FAILED;
}
surf->buffer->destroy(surf->buffer);
surf->buffer = tmp_buf;
}
views = surf->buffer->get_sampler_view_planes(surf->buffer);

View File

@@ -58,7 +58,7 @@ vlVaBeginPicture(VADriverContextP ctx, VAContextID context_id, VASurfaceID rende
return VA_STATUS_ERROR_INVALID_SURFACE;
context->target = surf->buffer;
context->decoder->begin_frame(context->decoder, context->target, NULL);
context->decoder->begin_frame(context->decoder, context->target, &context->desc.base);
return VA_STATUS_SUCCESS;
}
@@ -517,7 +517,7 @@ handleVASliceDataBufferType(vlVaContext *context, vlVaBuffer *buf)
buffers[num_buffers] = buf->data;
sizes[num_buffers] = buf->size;
++num_buffers;
context->decoder->decode_bitstream(context->decoder, context->target, NULL,
context->decoder->decode_bitstream(context->decoder, context->target, &context->desc.base,
num_buffers, (const void * const*)buffers, sizes);
}

View File

@@ -14,3 +14,340 @@ EXPORTS
OSMesaGetProcAddress
OSMesaColorClamp
OSMesaPostprocess
glAccum
glAlphaFunc
glAreTexturesResident
glArrayElement
glBegin
glBindTexture
glBitmap
glBlendFunc
glCallList
glCallLists
glClear
glClearAccum
glClearColor
glClearDepth
glClearIndex
glClearStencil
glClipPlane
glColor3b
glColor3bv
glColor3d
glColor3dv
glColor3f
glColor3fv
glColor3i
glColor3iv
glColor3s
glColor3sv
glColor3ub
glColor3ubv
glColor3ui
glColor3uiv
glColor3us
glColor3usv
glColor4b
glColor4bv
glColor4d
glColor4dv
glColor4f
glColor4fv
glColor4i
glColor4iv
glColor4s
glColor4sv
glColor4ub
glColor4ubv
glColor4ui
glColor4uiv
glColor4us
glColor4usv
glColorMask
glColorMaterial
glColorPointer
glCopyPixels
glCopyTexImage1D
glCopyTexImage2D
glCopyTexSubImage1D
glCopyTexSubImage2D
glCullFace
; glDebugEntry
glDeleteLists
glDeleteTextures
glDepthFunc
glDepthMask
glDepthRange
glDisable
glDisableClientState
glDrawArrays
glDrawBuffer
glDrawElements
glDrawPixels
glEdgeFlag
glEdgeFlagPointer
glEdgeFlagv
glEnable
glEnableClientState
glEnd
glEndList
glEvalCoord1d
glEvalCoord1dv
glEvalCoord1f
glEvalCoord1fv
glEvalCoord2d
glEvalCoord2dv
glEvalCoord2f
glEvalCoord2fv
glEvalMesh1
glEvalMesh2
glEvalPoint1
glEvalPoint2
glFeedbackBuffer
glFinish
glFlush
glFogf
glFogfv
glFogi
glFogiv
glFrontFace
glFrustum
glGenLists
glGenTextures
glGetBooleanv
glGetClipPlane
glGetDoublev
glGetError
glGetFloatv
glGetIntegerv
glGetLightfv
glGetLightiv
glGetMapdv
glGetMapfv
glGetMapiv
glGetMaterialfv
glGetMaterialiv
glGetPixelMapfv
glGetPixelMapuiv
glGetPixelMapusv
glGetPointerv
glGetPolygonStipple
glGetString
glGetTexEnvfv
glGetTexEnviv
glGetTexGendv
glGetTexGenfv
glGetTexGeniv
glGetTexImage
glGetTexLevelParameterfv
glGetTexLevelParameteriv
glGetTexParameterfv
glGetTexParameteriv
glHint
glIndexMask
glIndexPointer
glIndexd
glIndexdv
glIndexf
glIndexfv
glIndexi
glIndexiv
glIndexs
glIndexsv
glIndexub
glIndexubv
glInitNames
glInterleavedArrays
glIsEnabled
glIsList
glIsTexture
glLightModelf
glLightModelfv
glLightModeli
glLightModeliv
glLightf
glLightfv
glLighti
glLightiv
glLineStipple
glLineWidth
glListBase
glLoadIdentity
glLoadMatrixd
glLoadMatrixf
glLoadName
glLogicOp
glMap1d
glMap1f
glMap2d
glMap2f
glMapGrid1d
glMapGrid1f
glMapGrid2d
glMapGrid2f
glMaterialf
glMaterialfv
glMateriali
glMaterialiv
glMatrixMode
glMultMatrixd
glMultMatrixf
glNewList
glNormal3b
glNormal3bv
glNormal3d
glNormal3dv
glNormal3f
glNormal3fv
glNormal3i
glNormal3iv
glNormal3s
glNormal3sv
glNormalPointer
glOrtho
glPassThrough
glPixelMapfv
glPixelMapuiv
glPixelMapusv
glPixelStoref
glPixelStorei
glPixelTransferf
glPixelTransferi
glPixelZoom
glPointSize
glPolygonMode
glPolygonOffset
glPolygonStipple
glPopAttrib
glPopClientAttrib
glPopMatrix
glPopName
glPrioritizeTextures
glPushAttrib
glPushClientAttrib
glPushMatrix
glPushName
glRasterPos2d
glRasterPos2dv
glRasterPos2f
glRasterPos2fv
glRasterPos2i
glRasterPos2iv
glRasterPos2s
glRasterPos2sv
glRasterPos3d
glRasterPos3dv
glRasterPos3f
glRasterPos3fv
glRasterPos3i
glRasterPos3iv
glRasterPos3s
glRasterPos3sv
glRasterPos4d
glRasterPos4dv
glRasterPos4f
glRasterPos4fv
glRasterPos4i
glRasterPos4iv
glRasterPos4s
glRasterPos4sv
glReadBuffer
glReadPixels
glRectd
glRectdv
glRectf
glRectfv
glRecti
glRectiv
glRects
glRectsv
glRenderMode
glRotated
glRotatef
glScaled
glScalef
glScissor
glSelectBuffer
glShadeModel
glStencilFunc
glStencilMask
glStencilOp
glTexCoord1d
glTexCoord1dv
glTexCoord1f
glTexCoord1fv
glTexCoord1i
glTexCoord1iv
glTexCoord1s
glTexCoord1sv
glTexCoord2d
glTexCoord2dv
glTexCoord2f
glTexCoord2fv
glTexCoord2i
glTexCoord2iv
glTexCoord2s
glTexCoord2sv
glTexCoord3d
glTexCoord3dv
glTexCoord3f
glTexCoord3fv
glTexCoord3i
glTexCoord3iv
glTexCoord3s
glTexCoord3sv
glTexCoord4d
glTexCoord4dv
glTexCoord4f
glTexCoord4fv
glTexCoord4i
glTexCoord4iv
glTexCoord4s
glTexCoord4sv
glTexCoordPointer
glTexEnvf
glTexEnvfv
glTexEnvi
glTexEnviv
glTexGend
glTexGendv
glTexGenf
glTexGenfv
glTexGeni
glTexGeniv
glTexImage1D
glTexImage2D
glTexParameterf
glTexParameterfv
glTexParameteri
glTexParameteriv
glTexSubImage1D
glTexSubImage2D
glTranslated
glTranslatef
glVertex2d
glVertex2dv
glVertex2f
glVertex2fv
glVertex2i
glVertex2iv
glVertex2s
glVertex2sv
glVertex3d
glVertex3dv
glVertex3f
glVertex3fv
glVertex3i
glVertex3iv
glVertex3s
glVertex3sv
glVertex4d
glVertex4dv
glVertex4f
glVertex4fv
glVertex4i
glVertex4iv
glVertex4s
glVertex4sv
glVertexPointer
glViewport

View File

@@ -11,3 +11,340 @@ EXPORTS
OSMesaGetProcAddress = OSMesaGetProcAddress@4
OSMesaColorClamp = OSMesaColorClamp@4
OSMesaPostprocess = OSMesaPostprocess@12
glAccum = glAccum@8
glAlphaFunc = glAlphaFunc@8
glAreTexturesResident = glAreTexturesResident@12
glArrayElement = glArrayElement@4
glBegin = glBegin@4
glBindTexture = glBindTexture@8
glBitmap = glBitmap@28
glBlendFunc = glBlendFunc@8
glCallList = glCallList@4
glCallLists = glCallLists@12
glClear = glClear@4
glClearAccum = glClearAccum@16
glClearColor = glClearColor@16
glClearDepth = glClearDepth@8
glClearIndex = glClearIndex@4
glClearStencil = glClearStencil@4
glClipPlane = glClipPlane@8
glColor3b = glColor3b@12
glColor3bv = glColor3bv@4
glColor3d = glColor3d@24
glColor3dv = glColor3dv@4
glColor3f = glColor3f@12
glColor3fv = glColor3fv@4
glColor3i = glColor3i@12
glColor3iv = glColor3iv@4
glColor3s = glColor3s@12
glColor3sv = glColor3sv@4
glColor3ub = glColor3ub@12
glColor3ubv = glColor3ubv@4
glColor3ui = glColor3ui@12
glColor3uiv = glColor3uiv@4
glColor3us = glColor3us@12
glColor3usv = glColor3usv@4
glColor4b = glColor4b@16
glColor4bv = glColor4bv@4
glColor4d = glColor4d@32
glColor4dv = glColor4dv@4
glColor4f = glColor4f@16
glColor4fv = glColor4fv@4
glColor4i = glColor4i@16
glColor4iv = glColor4iv@4
glColor4s = glColor4s@16
glColor4sv = glColor4sv@4
glColor4ub = glColor4ub@16
glColor4ubv = glColor4ubv@4
glColor4ui = glColor4ui@16
glColor4uiv = glColor4uiv@4
glColor4us = glColor4us@16
glColor4usv = glColor4usv@4
glColorMask = glColorMask@16
glColorMaterial = glColorMaterial@8
glColorPointer = glColorPointer@16
glCopyPixels = glCopyPixels@20
glCopyTexImage1D = glCopyTexImage1D@28
glCopyTexImage2D = glCopyTexImage2D@32
glCopyTexSubImage1D = glCopyTexSubImage1D@24
glCopyTexSubImage2D = glCopyTexSubImage2D@32
glCullFace = glCullFace@4
; glDebugEntry = glDebugEntry@8
glDeleteLists = glDeleteLists@8
glDeleteTextures = glDeleteTextures@8
glDepthFunc = glDepthFunc@4
glDepthMask = glDepthMask@4
glDepthRange = glDepthRange@16
glDisable = glDisable@4
glDisableClientState = glDisableClientState@4
glDrawArrays = glDrawArrays@12
glDrawBuffer = glDrawBuffer@4
glDrawElements = glDrawElements@16
glDrawPixels = glDrawPixels@20
glEdgeFlag = glEdgeFlag@4
glEdgeFlagPointer = glEdgeFlagPointer@8
glEdgeFlagv = glEdgeFlagv@4
glEnable = glEnable@4
glEnableClientState = glEnableClientState@4
glEnd = glEnd@0
glEndList = glEndList@0
glEvalCoord1d = glEvalCoord1d@8
glEvalCoord1dv = glEvalCoord1dv@4
glEvalCoord1f = glEvalCoord1f@4
glEvalCoord1fv = glEvalCoord1fv@4
glEvalCoord2d = glEvalCoord2d@16
glEvalCoord2dv = glEvalCoord2dv@4
glEvalCoord2f = glEvalCoord2f@8
glEvalCoord2fv = glEvalCoord2fv@4
glEvalMesh1 = glEvalMesh1@12
glEvalMesh2 = glEvalMesh2@20
glEvalPoint1 = glEvalPoint1@4
glEvalPoint2 = glEvalPoint2@8
glFeedbackBuffer = glFeedbackBuffer@12
glFinish = glFinish@0
glFlush = glFlush@0
glFogf = glFogf@8
glFogfv = glFogfv@8
glFogi = glFogi@8
glFogiv = glFogiv@8
glFrontFace = glFrontFace@4
glFrustum = glFrustum@48
glGenLists = glGenLists@4
glGenTextures = glGenTextures@8
glGetBooleanv = glGetBooleanv@8
glGetClipPlane = glGetClipPlane@8
glGetDoublev = glGetDoublev@8
glGetError = glGetError@0
glGetFloatv = glGetFloatv@8
glGetIntegerv = glGetIntegerv@8
glGetLightfv = glGetLightfv@12
glGetLightiv = glGetLightiv@12
glGetMapdv = glGetMapdv@12
glGetMapfv = glGetMapfv@12
glGetMapiv = glGetMapiv@12
glGetMaterialfv = glGetMaterialfv@12
glGetMaterialiv = glGetMaterialiv@12
glGetPixelMapfv = glGetPixelMapfv@8
glGetPixelMapuiv = glGetPixelMapuiv@8
glGetPixelMapusv = glGetPixelMapusv@8
glGetPointerv = glGetPointerv@8
glGetPolygonStipple = glGetPolygonStipple@4
glGetString = glGetString@4
glGetTexEnvfv = glGetTexEnvfv@12
glGetTexEnviv = glGetTexEnviv@12
glGetTexGendv = glGetTexGendv@12
glGetTexGenfv = glGetTexGenfv@12
glGetTexGeniv = glGetTexGeniv@12
glGetTexImage = glGetTexImage@20
glGetTexLevelParameterfv = glGetTexLevelParameterfv@16
glGetTexLevelParameteriv = glGetTexLevelParameteriv@16
glGetTexParameterfv = glGetTexParameterfv@12
glGetTexParameteriv = glGetTexParameteriv@12
glHint = glHint@8
glIndexMask = glIndexMask@4
glIndexPointer = glIndexPointer@12
glIndexd = glIndexd@8
glIndexdv = glIndexdv@4
glIndexf = glIndexf@4
glIndexfv = glIndexfv@4
glIndexi = glIndexi@4
glIndexiv = glIndexiv@4
glIndexs = glIndexs@4
glIndexsv = glIndexsv@4
glIndexub = glIndexub@4
glIndexubv = glIndexubv@4
glInitNames = glInitNames@0
glInterleavedArrays = glInterleavedArrays@12
glIsEnabled = glIsEnabled@4
glIsList = glIsList@4
glIsTexture = glIsTexture@4
glLightModelf = glLightModelf@8
glLightModelfv = glLightModelfv@8
glLightModeli = glLightModeli@8
glLightModeliv = glLightModeliv@8
glLightf = glLightf@12
glLightfv = glLightfv@12
glLighti = glLighti@12
glLightiv = glLightiv@12
glLineStipple = glLineStipple@8
glLineWidth = glLineWidth@4
glListBase = glListBase@4
glLoadIdentity = glLoadIdentity@0
glLoadMatrixd = glLoadMatrixd@4
glLoadMatrixf = glLoadMatrixf@4
glLoadName = glLoadName@4
glLogicOp = glLogicOp@4
glMap1d = glMap1d@32
glMap1f = glMap1f@24
glMap2d = glMap2d@56
glMap2f = glMap2f@40
glMapGrid1d = glMapGrid1d@20
glMapGrid1f = glMapGrid1f@12
glMapGrid2d = glMapGrid2d@40
glMapGrid2f = glMapGrid2f@24
glMaterialf = glMaterialf@12
glMaterialfv = glMaterialfv@12
glMateriali = glMateriali@12
glMaterialiv = glMaterialiv@12
glMatrixMode = glMatrixMode@4
glMultMatrixd = glMultMatrixd@4
glMultMatrixf = glMultMatrixf@4
glNewList = glNewList@8
glNormal3b = glNormal3b@12
glNormal3bv = glNormal3bv@4
glNormal3d = glNormal3d@24
glNormal3dv = glNormal3dv@4
glNormal3f = glNormal3f@12
glNormal3fv = glNormal3fv@4
glNormal3i = glNormal3i@12
glNormal3iv = glNormal3iv@4
glNormal3s = glNormal3s@12
glNormal3sv = glNormal3sv@4
glNormalPointer = glNormalPointer@12
glOrtho = glOrtho@48
glPassThrough = glPassThrough@4
glPixelMapfv = glPixelMapfv@12
glPixelMapuiv = glPixelMapuiv@12
glPixelMapusv = glPixelMapusv@12
glPixelStoref = glPixelStoref@8
glPixelStorei = glPixelStorei@8
glPixelTransferf = glPixelTransferf@8
glPixelTransferi = glPixelTransferi@8
glPixelZoom = glPixelZoom@8
glPointSize = glPointSize@4
glPolygonMode = glPolygonMode@8
glPolygonOffset = glPolygonOffset@8
glPolygonStipple = glPolygonStipple@4
glPopAttrib = glPopAttrib@0
glPopClientAttrib = glPopClientAttrib@0
glPopMatrix = glPopMatrix@0
glPopName = glPopName@0
glPrioritizeTextures = glPrioritizeTextures@12
glPushAttrib = glPushAttrib@4
glPushClientAttrib = glPushClientAttrib@4
glPushMatrix = glPushMatrix@0
glPushName = glPushName@4
glRasterPos2d = glRasterPos2d@16
glRasterPos2dv = glRasterPos2dv@4
glRasterPos2f = glRasterPos2f@8
glRasterPos2fv = glRasterPos2fv@4
glRasterPos2i = glRasterPos2i@8
glRasterPos2iv = glRasterPos2iv@4
glRasterPos2s = glRasterPos2s@8
glRasterPos2sv = glRasterPos2sv@4
glRasterPos3d = glRasterPos3d@24
glRasterPos3dv = glRasterPos3dv@4
glRasterPos3f = glRasterPos3f@12
glRasterPos3fv = glRasterPos3fv@4
glRasterPos3i = glRasterPos3i@12
glRasterPos3iv = glRasterPos3iv@4
glRasterPos3s = glRasterPos3s@12
glRasterPos3sv = glRasterPos3sv@4
glRasterPos4d = glRasterPos4d@32
glRasterPos4dv = glRasterPos4dv@4
glRasterPos4f = glRasterPos4f@16
glRasterPos4fv = glRasterPos4fv@4
glRasterPos4i = glRasterPos4i@16
glRasterPos4iv = glRasterPos4iv@4
glRasterPos4s = glRasterPos4s@16
glRasterPos4sv = glRasterPos4sv@4
glReadBuffer = glReadBuffer@4
glReadPixels = glReadPixels@28
glRectd = glRectd@32
glRectdv = glRectdv@8
glRectf = glRectf@16
glRectfv = glRectfv@8
glRecti = glRecti@16
glRectiv = glRectiv@8
glRects = glRects@16
glRectsv = glRectsv@8
glRenderMode = glRenderMode@4
glRotated = glRotated@32
glRotatef = glRotatef@16
glScaled = glScaled@24
glScalef = glScalef@12
glScissor = glScissor@16
glSelectBuffer = glSelectBuffer@8
glShadeModel = glShadeModel@4
glStencilFunc = glStencilFunc@12
glStencilMask = glStencilMask@4
glStencilOp = glStencilOp@12
glTexCoord1d = glTexCoord1d@8
glTexCoord1dv = glTexCoord1dv@4
glTexCoord1f = glTexCoord1f@4
glTexCoord1fv = glTexCoord1fv@4
glTexCoord1i = glTexCoord1i@4
glTexCoord1iv = glTexCoord1iv@4
glTexCoord1s = glTexCoord1s@4
glTexCoord1sv = glTexCoord1sv@4
glTexCoord2d = glTexCoord2d@16
glTexCoord2dv = glTexCoord2dv@4
glTexCoord2f = glTexCoord2f@8
glTexCoord2fv = glTexCoord2fv@4
glTexCoord2i = glTexCoord2i@8
glTexCoord2iv = glTexCoord2iv@4
glTexCoord2s = glTexCoord2s@8
glTexCoord2sv = glTexCoord2sv@4
glTexCoord3d = glTexCoord3d@24
glTexCoord3dv = glTexCoord3dv@4
glTexCoord3f = glTexCoord3f@12
glTexCoord3fv = glTexCoord3fv@4
glTexCoord3i = glTexCoord3i@12
glTexCoord3iv = glTexCoord3iv@4
glTexCoord3s = glTexCoord3s@12
glTexCoord3sv = glTexCoord3sv@4
glTexCoord4d = glTexCoord4d@32
glTexCoord4dv = glTexCoord4dv@4
glTexCoord4f = glTexCoord4f@16
glTexCoord4fv = glTexCoord4fv@4
glTexCoord4i = glTexCoord4i@16
glTexCoord4iv = glTexCoord4iv@4
glTexCoord4s = glTexCoord4s@16
glTexCoord4sv = glTexCoord4sv@4
glTexCoordPointer = glTexCoordPointer@16
glTexEnvf = glTexEnvf@12
glTexEnvfv = glTexEnvfv@12
glTexEnvi = glTexEnvi@12
glTexEnviv = glTexEnviv@12
glTexGend = glTexGend@16
glTexGendv = glTexGendv@12
glTexGenf = glTexGenf@12
glTexGenfv = glTexGenfv@12
glTexGeni = glTexGeni@12
glTexGeniv = glTexGeniv@12
glTexImage1D = glTexImage1D@32
glTexImage2D = glTexImage2D@36
glTexParameterf = glTexParameterf@12
glTexParameterfv = glTexParameterfv@12
glTexParameteri = glTexParameteri@12
glTexParameteriv = glTexParameteriv@12
glTexSubImage1D = glTexSubImage1D@28
glTexSubImage2D = glTexSubImage2D@36
glTranslated = glTranslated@24
glTranslatef = glTranslatef@12
glVertex2d = glVertex2d@16
glVertex2dv = glVertex2dv@4
glVertex2f = glVertex2f@8
glVertex2fv = glVertex2fv@4
glVertex2i = glVertex2i@8
glVertex2iv = glVertex2iv@4
glVertex2s = glVertex2s@8
glVertex2sv = glVertex2sv@4
glVertex3d = glVertex3d@24
glVertex3dv = glVertex3dv@4
glVertex3f = glVertex3f@12
glVertex3fv = glVertex3fv@4
glVertex3i = glVertex3i@12
glVertex3iv = glVertex3iv@4
glVertex3s = glVertex3s@12
glVertex3sv = glVertex3sv@4
glVertex4d = glVertex4d@32
glVertex4dv = glVertex4dv@4
glVertex4f = glVertex4f@16
glVertex4fv = glVertex4fv@4
glVertex4i = glVertex4i@16
glVertex4iv = glVertex4iv@4
glVertex4s = glVertex4s@16
glVertex4sv = glVertex4sv@4
glVertexPointer = glVertexPointer@16
glViewport = glViewport@16

View File

@@ -151,11 +151,15 @@ enum {
/* CZ specific rev IDs */
enum {
CZ_CARRIZO_A0 = 0x01,
CARRIZO_A0 = 0x01,
STONEY_A0 = 0x61,
CZ_UNKNOWN = 0xFF
};
#define ASICREV_IS_CARRIZO(eChipRev) \
(eChipRev >= CARRIZO_A0)
((eChipRev >= CARRIZO_A0) && (eChipRev < STONEY_A0))
#define ASICREV_IS_STONEY(eChipRev) \
((eChipRev >= STONEY_A0) && (eChipRev < CZ_UNKNOWN))
#endif /* AMDGPU_ID_H */

View File

@@ -226,7 +226,11 @@ static boolean do_winsys_init(struct amdgpu_winsys *ws)
break;
case CHIP_CARRIZO:
ws->family = FAMILY_CZ;
ws->rev_id = CZ_CARRIZO_A0;
ws->rev_id = CARRIZO_A0;
break;
case CHIP_STONEY:
ws->family = FAMILY_CZ;
ws->rev_id = STONEY_A0;
break;
case CHIP_FIJI:
ws->family = FAMILY_VI;

View File

@@ -35,6 +35,7 @@ extern "C" {
#define __GBM__ 1
#include <stddef.h>
#include <stdint.h>
/**

View File

@@ -1629,7 +1629,7 @@ void nir_dump_dom_frontier(nir_shader *shader, FILE *fp);
void nir_dump_cfg_impl(nir_function_impl *impl, FILE *fp);
void nir_dump_cfg(nir_shader *shader, FILE *fp);
void nir_split_var_copies(nir_shader *shader);
bool nir_split_var_copies(nir_shader *shader);
void nir_lower_var_copy_instr(nir_intrinsic_instr *copy, void *mem_ctx);
void nir_lower_var_copies(nir_shader *shader);
@@ -1653,7 +1653,7 @@ void nir_lower_vars_to_ssa(nir_shader *shader);
void nir_remove_dead_variables(nir_shader *shader);
void nir_lower_vec_to_movs(nir_shader *shader);
bool nir_lower_vec_to_movs(nir_shader *shader);
void nir_lower_alu_to_scalar(nir_shader *shader);
void nir_lower_load_const_to_scalar(nir_shader *shader);

View File

@@ -32,6 +32,11 @@
* moves with partial writes.
*/
struct vec_to_movs_state {
nir_function_impl *impl;
bool progress;
};
static bool
src_matches_dest_reg(nir_dest *dest, nir_src *src)
{
@@ -54,12 +59,12 @@ src_matches_dest_reg(nir_dest *dest, nir_src *src)
*/
static unsigned
insert_mov(nir_alu_instr *vec, unsigned start_channel,
unsigned start_src_idx, void *mem_ctx)
unsigned start_src_idx, nir_shader *shader)
{
unsigned src_idx = start_src_idx;
assert(src_idx < nir_op_infos[vec->op].num_inputs);
nir_alu_instr *mov = nir_alu_instr_create(mem_ctx, nir_op_imov);
nir_alu_instr *mov = nir_alu_instr_create(shader, nir_op_imov);
nir_alu_src_copy(&mov->src[0], &vec->src[src_idx], mov);
nir_alu_dest_copy(&mov->dest, &vec->dest, mov);
@@ -84,8 +89,12 @@ insert_mov(nir_alu_instr *vec, unsigned start_channel,
}
static bool
lower_vec_to_movs_block(nir_block *block, void *mem_ctx)
lower_vec_to_movs_block(nir_block *block, void *void_state)
{
struct vec_to_movs_state *state = void_state;
nir_function_impl *impl = state->impl;
nir_shader *shader = impl->overload->function->shader;
nir_foreach_instr_safe(block, instr) {
if (instr->type != nir_instr_type_alu)
continue;
@@ -115,7 +124,7 @@ lower_vec_to_movs_block(nir_block *block, void *mem_ctx)
continue;
if (src_matches_dest_reg(&vec->dest.dest, &vec->src[src_idx].src)) {
finished_write_mask |= insert_mov(vec, i, src_idx, mem_ctx);
finished_write_mask |= insert_mov(vec, i, src_idx, shader);
break;
}
src_idx++;
@@ -127,29 +136,43 @@ lower_vec_to_movs_block(nir_block *block, void *mem_ctx)
continue;
if (!(finished_write_mask & (1 << i)))
finished_write_mask |= insert_mov(vec, i, src_idx, mem_ctx);
finished_write_mask |= insert_mov(vec, i, src_idx, shader);
src_idx++;
}
nir_instr_remove(&vec->instr);
ralloc_free(vec);
state->progress = true;
}
return true;
}
static void
static bool
nir_lower_vec_to_movs_impl(nir_function_impl *impl)
{
nir_foreach_block(impl, lower_vec_to_movs_block, ralloc_parent(impl));
struct vec_to_movs_state state = { impl, false };
nir_foreach_block(impl, lower_vec_to_movs_block, &state);
if (state.progress) {
nir_metadata_preserve(impl, nir_metadata_block_index |
nir_metadata_dominance);
}
return state.progress;
}
void
bool
nir_lower_vec_to_movs(nir_shader *shader)
{
bool progress = false;
nir_foreach_overload(shader, overload) {
if (overload->impl)
nir_lower_vec_to_movs_impl(overload->impl);
progress = nir_lower_vec_to_movs_impl(overload->impl) || progress;
}
return progress;
}

View File

@@ -262,6 +262,12 @@ nir_copy_prop_impl(nir_function_impl *impl)
bool progress = false;
nir_foreach_block(impl, copy_prop_block, &progress);
if (progress) {
nir_metadata_preserve(impl, nir_metadata_block_index |
nir_metadata_dominance);
}
return progress;
}

View File

@@ -92,6 +92,11 @@ remove_phis_impl(nir_function_impl *impl)
nir_foreach_block(impl, remove_phis_block, &progress);
if (progress) {
nir_metadata_preserve(impl, nir_metadata_block_index |
nir_metadata_dominance);
}
return progress;
}

View File

@@ -64,6 +64,7 @@
struct split_var_copies_state {
void *mem_ctx;
void *dead_ctx;
bool progress;
};
static nir_deref *
@@ -198,6 +199,7 @@ split_var_copy_instr(nir_intrinsic_instr *old_copy,
* remove the old one later.
*/
nir_instr_insert_after(&old_copy->instr, &new_copy->instr);
state->progress = true;
}
break;
@@ -256,24 +258,36 @@ split_var_copies_block(nir_block *block, void *void_state)
return true;
}
static void
static bool
split_var_copies_impl(nir_function_impl *impl)
{
struct split_var_copies_state state;
state.mem_ctx = ralloc_parent(impl);
state.dead_ctx = ralloc_context(NULL);
state.progress = false;
nir_foreach_block(impl, split_var_copies_block, &state);
ralloc_free(state.dead_ctx);
if (state.progress) {
nir_metadata_preserve(impl, nir_metadata_block_index |
nir_metadata_dominance);
}
return state.progress;
}
void
bool
nir_split_var_copies(nir_shader *shader)
{
bool progress = false;
nir_foreach_overload(shader, overload) {
if (overload->impl)
split_var_copies_impl(overload->impl);
progress = split_var_copies_impl(overload->impl) || progress;
}
return progress;
}

View File

@@ -311,7 +311,7 @@ static const struct brw_device_info brw_device_info_chv = {
.max_gs_threads = 336, \
.max_hs_threads = 336, \
.max_ds_threads = 336, \
.max_wm_threads = 64 * 6, \
.max_wm_threads = 64 * 9, \
.max_cs_threads = 56, \
.urb = { \
.size = 192, \
@@ -334,6 +334,10 @@ static const struct brw_device_info brw_device_info_skl_gt3 = {
GEN9_FEATURES, .gt = 3,
};
static const struct brw_device_info brw_device_info_skl_gt4 = {
GEN9_FEATURES, .gt = 4,
};
static const struct brw_device_info brw_device_info_bxt = {
GEN9_FEATURES,
.is_broxton = 1,

View File

@@ -221,7 +221,7 @@ bool brw_search_cache(struct brw_cache *cache,
enum brw_cache_id cache_id,
const void *key,
GLuint key_size,
uint32_t *inout_offset, void *out_aux);
uint32_t *inout_offset, void *inout_aux);
void brw_state_cache_check_size( struct brw_context *brw );
void brw_init_caches( struct brw_context *brw );

View File

@@ -137,7 +137,7 @@ bool
brw_search_cache(struct brw_cache *cache,
enum brw_cache_id cache_id,
const void *key, GLuint key_size,
uint32_t *inout_offset, void *out_aux)
uint32_t *inout_offset, void *inout_aux)
{
struct brw_context *brw = cache->brw;
struct brw_cache_item *item;
@@ -155,11 +155,12 @@ brw_search_cache(struct brw_cache *cache,
if (item == NULL)
return false;
*(void **)out_aux = ((char *)item->key + item->key_size);
void *aux = ((char *) item->key) + item->key_size;
if (item->offset != *inout_offset) {
if (item->offset != *inout_offset || aux != *((void **) inout_aux)) {
brw->ctx.NewDriverState |= (1 << cache_id);
*inout_offset = item->offset;
*((void **) inout_aux) = aux;
}
return true;

View File

@@ -364,14 +364,10 @@ intel_image_target_renderbuffer_storage(struct gl_context *ctx,
}
/* __DRIimage is opaque to the core so it has to be checked here */
switch (image->format) {
case MESA_FORMAT_R8G8B8A8_UNORM:
if (!brw->format_supported_as_render_target[image->format]) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glEGLImageTargetRenderbufferStorage(unsupported image format");
return;
break;
default:
break;
}
irb = intel_renderbuffer(rb);

View File

@@ -188,7 +188,7 @@ nouveau_context_init(struct gl_context *ctx, gl_api api,
ctx->Extensions.EXT_blend_minmax = true;
ctx->Extensions.EXT_texture_filter_anisotropic = true;
ctx->Extensions.NV_texture_env_combine4 = true;
ctx->Const.MaxColorAttachments = 1;
ctx->Const.MaxDrawBuffers = ctx->Const.MaxColorAttachments = 1;
/* This effectively disables 3D textures */
ctx->Const.Max3DTextureLevels = 1;

View File

@@ -61,6 +61,8 @@ compute_num_levels(struct gl_context *ctx,
numLevels = texObj->BaseLevel + baseImage->MaxNumLevels;
numLevels = MIN2(numLevels, (GLuint) texObj->MaxLevel + 1);
if (texObj->Immutable)
numLevels = MIN2(numLevels, texObj->NumLevels);
assert(numLevels >= 1);
return numLevels;
@@ -99,38 +101,40 @@ st_generate_mipmap(struct gl_context *ctx, GLenum target,
*/
stObj->lastLevel = lastLevel;
if (pt->last_level < lastLevel) {
/* The current gallium texture doesn't have space for all the
* mipmap levels we need to generate. So allocate a new texture.
*/
struct pipe_resource *oldTex = stObj->pt;
if (!texObj->Immutable) {
if (pt->last_level < lastLevel) {
/* The current gallium texture doesn't have space for all the
* mipmap levels we need to generate. So allocate a new texture.
*/
struct pipe_resource *oldTex = stObj->pt;
/* create new texture with space for more levels */
stObj->pt = st_texture_create(st,
oldTex->target,
oldTex->format,
lastLevel,
oldTex->width0,
oldTex->height0,
oldTex->depth0,
oldTex->array_size,
0,
oldTex->bind);
/* create new texture with space for more levels */
stObj->pt = st_texture_create(st,
oldTex->target,
oldTex->format,
lastLevel,
oldTex->width0,
oldTex->height0,
oldTex->depth0,
oldTex->array_size,
0,
oldTex->bind);
/* This will copy the old texture's base image into the new texture
* which we just allocated.
*/
st_finalize_texture(ctx, st->pipe, texObj);
/* This will copy the old texture's base image into the new texture
* which we just allocated.
*/
st_finalize_texture(ctx, st->pipe, texObj);
/* release the old tex (will likely be freed too) */
pipe_resource_reference(&oldTex, NULL);
st_texture_release_all_sampler_views(st, stObj);
}
else {
/* Make sure that the base texture image data is present in the
* texture buffer.
*/
st_finalize_texture(ctx, st->pipe, texObj);
/* release the old tex (will likely be freed too) */
pipe_resource_reference(&oldTex, NULL);
st_texture_release_all_sampler_views(st, stObj);
}
else {
/* Make sure that the base texture image data is present in the
* texture buffer.
*/
st_finalize_texture(ctx, st->pipe, texObj);
}
}
pt = stObj->pt;