Eric Anholt [Thu, 6 Oct 2016 21:45:23 +0000 (14:45 -0700)]
vc4: Try to fix the HW-2116 workaround.
We were incrementing the count at the end of vc4_start_draw(), except that
that function returns immediately if we've already started drawing on this
batch. It also failed to count the statechanges from the GFXH-515
workaround.
This incidentally allows repeated glClear() to be coalesced, because the
fast clears aren't counted in draw_calls_queued any more. Fixes most of
the extra flushes in Processing, which emits glClear(Z|S); glClear(Z);
glClear(C) during its frame setup.
Improves performance of Processing's QuadRendering demo at 5000 quads by
3.33538% +/- 2.05846% (n=21 before, 15 after)
Eric Anholt [Thu, 6 Oct 2016 21:35:58 +0000 (14:35 -0700)]
vc4: Drop dead argument from vc4_start_draw().
Eric Anholt [Wed, 5 Oct 2016 21:10:30 +0000 (14:10 -0700)]
vc4: Fix fallback to quad clears of depth in GLX.
The fix in the vc4-jobs series ended up triggering the fallback path on
GLX apps that use depth but not stencil.
Eric Anholt [Wed, 5 Oct 2016 21:22:09 +0000 (14:22 -0700)]
vc4: Add the format name in miptree_debug.
I was curious if my Z/S buffer was actually ZS or ZX, and the vc4 format
of "0" didn't tell me much.
Eric Anholt [Wed, 5 Oct 2016 21:05:51 +0000 (14:05 -0700)]
vc4: Fix perf debug formatting on partial Z/S clear.
Eric Anholt [Wed, 5 Oct 2016 16:21:37 +0000 (09:21 -0700)]
vc4: Drop destination register when it's unused.
This slightly reduces instructions on shader-db, but I think it's just
perturbing register allocation -- the allocator should have always
trivially colored these nodes, before. This commit is just to make QIR
code failing more intelligible when register allocation fails.
Eric Anholt [Wed, 5 Oct 2016 16:07:46 +0000 (09:07 -0700)]
vc4: Fix live intervals analysis for screening defs in if statements.
If a conditional assignment is only conditioned on the exec mask, that's
still screening off the value in the executed channels (and, since we're
not storing to the unexcuted channels, we don't care what's in there).
Fixes a bunch of extra register pressure on Processing's Ribbons demo,
which is failing to allocate.
Eric Anholt [Tue, 4 Oct 2016 23:29:26 +0000 (16:29 -0700)]
vc4: Fix simulator when more than one vc4_screen is opened.
We would assertion fail in setting up the simulator the second time
around. This at least postpones the assertion failure until we've closed
all of the first set of screens and started opening a new set.
Eric Anholt [Thu, 6 Oct 2016 23:46:35 +0000 (16:46 -0700)]
vc4: Fix assertion fails from trying to cast non-ALU instrs to ALU.
Fixes 100 piglit tests since the assertions were added to nir.h. What's
amazing is that these tests used to pass, even when casting garbage.
Jason Ekstrand [Wed, 5 Oct 2016 23:54:57 +0000 (16:54 -0700)]
anv/cmd_buffer: Move the clear_subpasses calls to set_subpass
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Jason Ekstrand [Wed, 5 Oct 2016 23:51:02 +0000 (16:51 -0700)]
anv/cmd_buffer: Don't call set_subpass in a secondary
Initially, we had intended set_subpass to be an interesting function that
did whatever (presumably a lot) setup we needed for a subpass. In reality,
it just sets a pointer and a dirty bit and then emits depth and stencil
state. When we call BeginCommandBuffer on a secondary, there's no point in
setting depth and stencil state since it will already be set by the
primary. Instead, the only thing we need to do at the start of a secondary
is set the subpass pointer and the dirty bit.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Jason Ekstrand [Thu, 6 Oct 2016 22:50:21 +0000 (15:50 -0700)]
anv/cmd_buffer: Rework descriptor dirtying in set_subpass
We have a DIRTY_RENDER_TARGETS flag and that makes a lot more sense than
just dirtying fragment descriptors. We're checking for it in some of the
gen7 code but unfortunately, nothing was setting it and it didn't do what
it was supposed to do in cmd_buffer_flush_state.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Wed, 5 Oct 2016 20:23:22 +0000 (13:23 -0700)]
anv/wsi: Advertise UNORM formats as well as sRGB
Because WSI images are created with VkImageCreateInfo::flags explicitly set
to 0, they don't ever have the VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT set.
This means that you can't create an image view of it with a different
format so applications can't render directly in sRGB (without automatic
encoding) unless we actually advertise UNORM formats. There are a lot of
applications that want to do their own sRGB conversion, so we should allow
for that. We do, however, make UNORM come after sRGB in the list so that
the default for dumb apps that just grab the first thing is to render in
linear and let the sRGB conversion happen automatically.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Dave Airlie [Thu, 6 Oct 2016 23:27:36 +0000 (09:27 +1000)]
radv: fix configure.ac check
This should be positive test.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Gustaw Smolarczyk [Wed, 5 Oct 2016 23:09:54 +0000 (01:09 +0200)]
radv: Skip already signalled fences.
If the user created a fence with VK_FENCE_CREATE_SIGNALED_BIT set, we
shouldn't fail to wait for a fence if it was not submitted since that is
not necessary.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Thu, 6 Oct 2016 23:16:09 +0000 (09:16 +1000)]
radv: add initial non-conformant radv vulkan driver
This squashes all the radv development up until now into
one for merging.
History can be found:
https://github.com/airlied/mesa/tree/semi-interesting
This requires llvm 3.9 and is in no way considered
a conformant vulkan implementation. It can run a number
of vulkan applications, and supports all GPUs using
the amdgpu kernel driver.
Thanks to Intel for providing anv and spirv->nir,
and Emil Velikov for reviewing build integration.
Parts of this are:
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Authors: Bas Nieuwenhuizen and Dave Airlie
Signed-off-by: Dave Airlie <airlied@redhat.com>
Samuel Pitoiset [Thu, 6 Oct 2016 23:08:54 +0000 (01:08 +0200)]
nv50/ir: fix wrong check when optimizing MAD to SHLADD
Checking if MAD is supported is definitely wrong, and it's
more likely a typo I introduced few days ago which breaks
NV50 because SHLADD is not supported there.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Lionel Landwerlin [Tue, 4 Oct 2016 15:29:55 +0000 (16:29 +0100)]
intel: aubinator: use getopt to parse arguments
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sirisha Gandikota <sirisha.gandikota@intel.com>
Samuel Pitoiset [Thu, 6 Oct 2016 22:43:51 +0000 (00:43 +0200)]
nvc0: dump program binary only when NV50_PROG_DEBUG is set
When the chipset is forced with NV50_PROG_CHIPSET, we actually
only want to output the binary if NV50_PROG_DEBUG is also
enabled. Otherwise, this pollutes the shader-db output.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Jason Ekstrand [Thu, 6 Oct 2016 22:46:22 +0000 (15:46 -0700)]
nir: Fix the control flow tests for nir_loop_first_block changes
Commit
2ed17d46de045404042f13c6591895a1cf31b167 changed
nir_loop_first_cf_node and friends to return a nir_block instead of a
nir_cf_node. This broke one of the NIR control flow tests.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98128
Samuel Pitoiset [Sun, 11 Sep 2016 15:46:24 +0000 (17:46 +0200)]
docs: mark ARB_compute_variable_group_size as done for nvc0
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Samuel Pitoiset [Sat, 10 Sep 2016 14:45:32 +0000 (16:45 +0200)]
nvc0: expose ARB_compute_variable_group_size
Only expose 512 threads/block on Fermi to not be limited by
32 GPRs/thread.
v4: - use 512 threads on Fermi, 1024 on Kepler+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Samuel Pitoiset [Tue, 6 Sep 2016 22:12:51 +0000 (00:12 +0200)]
nv50/ir: set number of threads/block for variable local size
When a variable local size is defined as specified by
ARB_compute_variable_group_size, the fixed local size is set to 0
and a SIGFPE occurs when we compute the maximum number of regs.
This allows to use 64 GPRs/thread.
v4: - use 512 threads on Fermi, 1024 on Kepler+
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Samuel Pitoiset [Wed, 7 Sep 2016 16:00:16 +0000 (18:00 +0200)]
st/mesa: expose ARB_compute_variable_group_size
This extension is only exposed if the underlying driver supports
ARB_compute_shader and if PIPE_COMPUTE_MAX_VARIABLE_THREADS_PER_BLOCK
is set.
v3: - initialize max_variable_threads_per_block to 0
v2: - expose the ext based on that new cap
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Samuel Pitoiset [Tue, 6 Sep 2016 18:15:00 +0000 (20:15 +0200)]
st/mesa: add support for dispatching a variable local size
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Samuel Pitoiset [Thu, 8 Sep 2016 19:35:36 +0000 (21:35 +0200)]
st/mesa: add mapping for SYSTEM_VALUE_LOCAL_GROUP_SIZE
gl_LocalGroupSizeARB can be translated into TGSI_SEMANTIC_BLOCK_SIZE
which represents the block size in threads.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Samuel Pitoiset [Sat, 10 Sep 2016 14:31:27 +0000 (16:31 +0200)]
gallium: add PIPE_COMPUTE_CAP_MAX_VARIABLE_THREADS_PER_BLOCK
v3: - use a new case statement in r600_pipe_common.c
- fix compilation of softpipe...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Samuel Pitoiset [Thu, 8 Sep 2016 19:28:11 +0000 (21:28 +0200)]
glsl: add gl_LocalGroupSizeARB as a system value
v2: - only add it if the ext is enabled (Ilia)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Samuel Pitoiset [Tue, 6 Sep 2016 20:46:42 +0000 (22:46 +0200)]
glsl/linker: handle errors when a variable local size is used
Compute shaders can now include a fixed local size as defined by
ARB_compute_shader or a variable size as defined by
ARB_compute_variable_group_size.
v2: - update formatting spec quotations (Ian)
- various cosmetic changes (Ian)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Samuel Pitoiset [Wed, 7 Sep 2016 19:37:53 +0000 (21:37 +0200)]
glsl: reject compute shaders with fixed and variable local size
The ARB_compute_variable_group_size specification explains that
when a compute shader includes both a fixed and a variable local
size, a compile-time error occurs.
v2: - update formatting spec quotations (Ian)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Samuel Pitoiset [Tue, 6 Sep 2016 19:48:42 +0000 (21:48 +0200)]
glsl: process local_size_variable input qualifier
This is the new layout qualifier introduced by
ARB_compute_variable_group_size which allows to use a variable work
group size.
v4: - add missing '%s' in the monster format string
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Samuel Pitoiset [Wed, 7 Sep 2016 16:05:52 +0000 (18:05 +0200)]
glsl: add enable flags for ARB_compute_variable_group_size
This also initializes the default values for the standalone compiler.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Samuel Pitoiset [Wed, 7 Sep 2016 19:52:08 +0000 (21:52 +0200)]
mesa/main: add support for ARB_compute_variable_groups_size
v5: - replace fixed_local_size by !LocalSizeVariable (Nicolai)
v4: - slightly indent spec quotes (Nicolai)
- drop useless _mesa_has_compute_shaders() check (Nicolai)
- move the fixed local size outside of the loop (Nicolai)
- add missing check for invalid use of work group count
v2: - update formatting spec quotations (Ian)
- move the total_invocations check outside of the loop (Ian)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Samuel Pitoiset [Tue, 6 Sep 2016 14:23:58 +0000 (16:23 +0200)]
glapi: add entry points for GL_ARB_compute_variable_group_size
v2: - correctly sort that new extension (Ian)
- fix up the comment (Ian)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Karol Herbst [Wed, 5 Oct 2016 22:36:23 +0000 (00:36 +0200)]
nv50/ir: optimize sub(a, 0) to a
helped some ue4 demos and divinity OS shaders
total instructions in shared programs : 2818674 -> 2818606 (-0.00%)
total gprs used in shared programs : 379273 -> 379273 (0.00%)
total local used in shared programs : 9505 -> 9505 (0.00%)
total bytes used in shared programs :
25837792 ->
25837192 (-0.00%)
local gpr inst bytes
helped 0 0 33 33
hurt 0 0 0 0
Signed-off-by: Karol Herbst <karolherbst@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Pierre Moreau <pierre.morrow@free.fr>
Brian Paul [Mon, 3 Oct 2016 15:57:50 +0000 (09:57 -0600)]
st/mesa: move all sampler view code into new st_sampler_view.[ch] files
Previously, the sampler view code was scattered across several different
files.
Note, the previous REALLOC(), FREE() for st_texture_object::sampler_views
are replaced by realloc(), free() to avoid conflicting macros in Mesa vs.
Gallium.
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Acked-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Brian Paul [Fri, 30 Sep 2016 22:41:46 +0000 (16:41 -0600)]
st/mesa: optimize pipe_sampler_view validation
Before, st_get_texture_sampler_view_from_stobj() did a lot of work to
check if the texture parameters matched the sampler view (format,
swizzle, min/max lod, first/last layer, etc). We did this every time
we validated the texture state.
Now, we use a ctx->Driver.TexParameter() callback and a couple other
checks to proactively release texture views when we know that
view-related parameters have changed. Then, the validation step is
simplified:
- Search the texture's list of sampler views (just match the context).
- If found, we're done.
- Else, create a new sampler view.
There will never be old, out-of-date sampler views attached to texture
objects that we have to test.
Most apps create textures and set the texture parameters once. This
make sampler view validation much cheaper for that case.
Note that the old texture/sampler comparison code has been converted
into a set of assertions to verify that the sampler view is in fact
consistent with the texture parameters. This should help to spot any
potential regressions.
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Brian Paul [Mon, 3 Oct 2016 15:40:56 +0000 (09:40 -0600)]
mesa: call ctx->Driver.TexParameter() in texture_buffer_range()
To inform drivers of texture buffer offset/size changes, as we do for
other texture object parameters.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Brian Paul [Fri, 23 Sep 2016 19:36:22 +0000 (13:36 -0600)]
st/mesa: consolidate view format setup code
Before, we had code to compute the sampler view's format spread across two
different functions: in update_single_texture() and
st_get_texture_sampler_view_from_stobj(). Now it's all in one new function.
Also, use _mesa_texture_base_format() to simplify the code.
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Brian Paul [Fri, 23 Sep 2016 18:24:03 +0000 (12:24 -0600)]
st/mesa: add some const qualifiers in st_atom_texture.c
And minor code reformatting.
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Brian Paul [Fri, 23 Sep 2016 18:18:46 +0000 (12:18 -0600)]
st/mesa: simplify some code in get_texture_format_swizzle()
There's no need to cast to st_texture_image. Just use gl_texture_image.
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Brian Paul [Fri, 23 Sep 2016 18:59:56 +0000 (12:59 -0600)]
mesa: make _mesa_texture_buffer_range() static
Not called from any other file. Also, add a comment.
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Brian Paul [Sat, 24 Sep 2016 13:33:59 +0000 (07:33 -0600)]
mesa: add const qualifier, comment on can_avoid_reallocation()
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Brian Paul [Fri, 23 Sep 2016 18:59:29 +0000 (12:59 -0600)]
mesa: add comment/assertion on get_tex_level_parameter_buffer()
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Jason Ekstrand [Thu, 6 Oct 2016 02:56:54 +0000 (19:56 -0700)]
nir: Remove some no longer needed asserts
Now that the NIR casting functions have type assertions, we have a bunch of
assertions that aren't needed anymore.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Jason Ekstrand [Thu, 6 Oct 2016 02:08:57 +0000 (19:08 -0700)]
nir: Make nir_foo_first/last_cf_node return a block instead
One of NIR's invariants is that control flow lists always start and end
with blocks. There's no good reason why we should return a cf_node from
these functions since we know that it's always a block. Making it a block
lets us remove a bunch of code.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Jason Ekstrand [Thu, 6 Oct 2016 01:09:25 +0000 (18:09 -0700)]
nir: Add asserts to the casting functions
This makes calling nir_foo_as_bar a bit safer because we're no longer 100%
trusting in the caller to ensure that it's safe. The caller still needs to
do the right thing but this ensures that we catch invalid casts with an
assert rather than by reading garbage data. The one downside is that we do
use the casts a bit in nir_validate and it's not a validate_assert.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Steven Toth [Thu, 6 Oct 2016 15:26:51 +0000 (11:26 -0400)]
gallium/hud: Remove superfluous debug
No longer required.
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Emil Velikov [Thu, 6 Oct 2016 14:42:04 +0000 (15:42 +0100)]
amd: add amd_kernel_code_t.h to the sources list
Otherwise it won't be picked in the tarball and the build will fail.
Fixes:
91ec6e56649 ("radeonsi/compute: Use the HSA abi for non-TGSI
compute shaders v3")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Emil Velikov [Thu, 6 Oct 2016 14:21:58 +0000 (15:21 +0100)]
svga: add svga_mksstats.h to the sources list
Otherwise it won't be picked in the tarball and the build will fail.
Fixes:
0035f7f1365 ("svga: add guest statistic gathering interface")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Emil Velikov [Fri, 30 Sep 2016 10:01:28 +0000 (11:01 +0100)]
glx: rename choose_visual(), drop const argument
The function deals with fb (style) configs, thus using "visual"
in the name is misleading. Which in itself had led to the use of
fbconfig_style_tags argument.
Rename the function to reflect what it does and drop the unneeded
argument.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Emil Velikov [Fri, 30 Sep 2016 10:01:27 +0000 (11:01 +0100)]
glx: return GL_FALSE from glx_screen_init where applicable.
Return GL_FALSE if we fail to find any fb/visual configs, otherwise we
end up with all sorts of chaos further down the GLX stack.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Emil Velikov [Fri, 30 Sep 2016 10:01:26 +0000 (11:01 +0100)]
glx: correctly mask the drawableType for GLX_ARB_fbconfig_float
The comment/spec says - only for pbuffer drawables, while the code
clears the window/pixmap bit. Practise what you preach and apply the
trivial tweak. In practise this should not cause functional change.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Chuck Atkins [Tue, 4 Oct 2016 15:05:30 +0000 (11:05 -0400)]
autoconf: Make header install distinct for various APIs (v2)
This fixes a problem where GL headers would only get installed if
glx was enabled. So if osmesa was enabled but not glx, then the
GL headers required by osmesa would be missing from the install.
v2: Dropped unneeded mesa_glinterop.h redundant osmesa.h install
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Chuck Atkins <chuck.atkins@kitware.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Emil Velikov [Thu, 25 Aug 2016 15:59:01 +0000 (16:59 +0100)]
mesa: annotate AttribFuncsARB[] as const
It's read-only data, so annotate it accordingly.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Thu, 25 Aug 2016 15:59:00 +0000 (16:59 +0100)]
mapi/glapi: remove unused _glapi_check_table()
Similar to earlier commit - symbol was never part of the public API so
we're safe to remove it.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Thu, 25 Aug 2016 15:58:59 +0000 (16:58 +0100)]
glapi/hgl: remove the final user of _glapi_check_table()
The symbol is a no-op since, the EXTRA_DEBUG macro is not set in the
build. Unused by !Haiku people/platforms since 2010 (commit
a73c6540d9a7f6e26d8568ba2fc522cb865f0a6c) while the Haiku C++ wrapper
has no obvious users.
Cc: Alexander von Gluck IV <kallisti5@unixzen.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Thu, 25 Aug 2016 15:58:58 +0000 (16:58 +0100)]
mapi/glapi: remove unused _glapi_check_table_not_null
Function was never part of the API/ABI and the final user was removed
with commit
a73c6540d9a7f6e26d8568ba2fc522cb865f0a6c, back in 2010.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Emil Velikov [Mon, 19 Sep 2016 14:35:32 +0000 (15:35 +0100)]
st/xvmc/tests: force enable assertions
Similar to the other 'tests', enable assertions in xvmc_bench.
This silences the GCC warnings about unused-variable(s), makes the
program actually useful, as the XvMC API called. Atm the function
calls are omitted, since they're called within the assert.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Emil Velikov [Mon, 19 Sep 2016 12:14:39 +0000 (13:14 +0100)]
anv: automake: ship intel_icd.json.in in the tarball
Otherwise we'll fail to (re)generate intel_icd.json.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Emil Velikov [Mon, 19 Sep 2016 11:46:37 +0000 (12:46 +0100)]
intel: automake: reference the correct header
The header was renamed with earlier commit, so update the
Makefile.sources respectively.
{vulkan/genX_multisample.h => common/gen_sample_positions.h}
Fixes:
c779ad3e661("intel: Move Vulkan sample positions to common code")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Lionel Landwerlin [Tue, 4 Oct 2016 15:28:43 +0000 (16:28 +0100)]
intel: aubinator: add missing return characters
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Kenneth Graunke [Wed, 5 Oct 2016 18:58:59 +0000 (11:58 -0700)]
nir: Delete open coded type printing.
glsl_print_type() prints arrays of arrays incorrectly. For example,
a type with name float[3][7] would be printed as float[7][3]. (This
is an array of length 3 containing arrays of 7 floats.) cdecl says
that the type name is correct.
glsl_print_type() doesn't really do anything above and beyond printing
type->name, and glsl_print_struct() wasn't used at all. So, drop them.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Philipp Zabel [Wed, 5 Oct 2016 23:48:04 +0000 (01:48 +0200)]
anv: fix GetPhysicalDeviceProperties to return timestampPeriod in ns
According to chapters 16.5. (Timestamp Queries) and 30.2 (Limits) of the
Vulkan Specification 1.0.29, the .limits.timestampPeriod field returned
by vkGetPhysicalDeviceProperties is measured in nanoseconds, not in
seconds.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Timothy Arceri [Wed, 5 Oct 2016 05:46:39 +0000 (16:46 +1100)]
i965: remove remaining tabs in brw_draw.c
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Timothy Arceri [Wed, 5 Oct 2016 05:45:27 +0000 (16:45 +1100)]
i965: get inputs read from nir info
This is a step towards dropping the GLSL IR version of
do_set_program_inouts() in i965 and moving towards native nir support.
This is important because we want to eventually convert to nir and
use its optimisations passes before we can call this GLSL IR pass.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Timothy Arceri [Wed, 5 Oct 2016 05:24:56 +0000 (16:24 +1100)]
i965: get outputs written from nir info
This is a step towards dropping the GLSL IR version of
do_set_program_inouts() in i965 and moving towards native nir support.
This is important because we want to eventually convert to nir and
use its optimisations passes before we can call this GLSL IR pass.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Timothy Arceri [Wed, 5 Oct 2016 04:56:21 +0000 (15:56 +1100)]
i965: get outputs read from nir info
This is a step towards dropping the GLSL IR version of
do_set_program_inouts() in i965 and moving towards native nir support.
This is important because we want to eventually convert to nir and
use its optimisations passes before we can call this GLSL IR pass.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Timothy Arceri [Wed, 5 Oct 2016 04:42:02 +0000 (15:42 +1100)]
i965: remove remaining tabs in brw_wm.c
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Timothy Arceri [Wed, 5 Oct 2016 04:28:50 +0000 (15:28 +1100)]
mesa: remove the UsesDFdy flag
Seems the last user of this was removed in
08bc74e69.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Timothy Arceri [Wed, 5 Oct 2016 04:13:23 +0000 (15:13 +1100)]
i965: get uses discard from nir info
This is a step towards dropping the GLSL IR version of
do_set_program_inouts() in i965 and moving towards native nir support.
This is important because we want to eventually convert to nir and
use its optimisations passes before we can call this GLSL IR pass.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Timothy Arceri [Wed, 5 Oct 2016 03:57:21 +0000 (14:57 +1100)]
i965: get uses texture gather from nir info
This is a step towards dropping the GLSL IR version of
do_set_program_inouts() in i965 and moving towards native nir support.
This is important because we want to eventually convert to nir and
use its optimisations passes before we can call this GLSL IR pass.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Kenneth Graunke [Fri, 9 Sep 2016 06:48:53 +0000 (23:48 -0700)]
i965: Eliminate brw->cs.prog_data pointer.
Just say no to:
- brw->cs.base.prog_data = &brw->cs.prog_data->base.base;
We'll just use the brw_stage_prog_data pointer in brw_stage_state
and downcast it to brw_cs_prog_data as needed.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arcero@collabora.com>
Kenneth Graunke [Fri, 9 Sep 2016 06:48:53 +0000 (23:48 -0700)]
i965: Eliminate brw->wm.prog_data pointer.
Just say no to:
- brw->wm.base.prog_data = &brw->wm.prog_data->base.base;
We'll just use the brw_stage_prog_data pointer in brw_stage_state
and downcast it to brw_wm_prog_data as needed.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arcero@collabora.com>
Kenneth Graunke [Fri, 9 Sep 2016 06:48:53 +0000 (23:48 -0700)]
i965: Eliminate brw->gs.prog_data pointer.
Just say no to:
- brw->gs.base.prog_data = &brw->gs.prog_data->base.base;
We'll just use the brw_stage_prog_data pointer in brw_stage_state
and downcast it to brw_gs_prog_data as needed.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arcero@collabora.com>
Kenneth Graunke [Fri, 9 Sep 2016 06:48:53 +0000 (23:48 -0700)]
i965: Eliminate brw->tes.prog_data pointer.
Just say no to:
- brw->tes.base.prog_data = &brw->tes.prog_data->base.base;
We'll just use the brw_stage_prog_data pointer in brw_stage_state
and downcast it to brw_tes_prog_data as needed.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arcero@collabora.com>
Kenneth Graunke [Fri, 9 Sep 2016 06:48:53 +0000 (23:48 -0700)]
i965: Eliminate brw->tcs.prog_data pointer.
Just say no to:
- brw->tcs.base.prog_data = &brw->tcs.prog_data->base.base;
We'll just use the brw_stage_prog_data pointer in brw_stage_state
and downcast it to brw_tcs_prog_data as needed.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arcero@collabora.com>
Kenneth Graunke [Fri, 9 Sep 2016 06:48:53 +0000 (23:48 -0700)]
i965: Eliminate brw->vs.prog_data pointer.
Just say no to:
- brw->vs.base.prog_data = &brw->vs.prog_data->base.base;
We'll just use the brw_stage_prog_data pointer in brw_stage_state
and downcast it to brw_vs_prog_data as needed.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arcero@collabora.com>
Kenneth Graunke [Fri, 9 Sep 2016 06:48:51 +0000 (23:48 -0700)]
i965: Introduce downcast helpers for prog_data structures.
Similar to brw_context(...), intel_texture_object(...), and so on.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arcero@collabora.com>
Chad Versace [Wed, 28 Sep 2016 06:33:46 +0000 (23:33 -0700)]
i965/sync: Rename awkward variable
What is the difference between a 'driver_fence' and a 'fence'? Do the
characters 'driver_' add anything helpful? Nope. They do, though, add an
extra 7 chars and pull your eyeballs away to ask "huh? what's that?" one
microsecond too many.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Chad Versace [Wed, 28 Sep 2016 06:33:45 +0000 (23:33 -0700)]
i965/sync: Rename intel_syncobj.c -> brw_sync.c
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Chad Versace [Wed, 28 Sep 2016 06:33:45 +0000 (23:33 -0700)]
i965/sync: Replace 'intel' prefix with 'brw'
This is yet another patch for the great renaming begun long ago.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Chad Versace [Wed, 28 Sep 2016 06:33:45 +0000 (23:33 -0700)]
i965/sync: Fix uninitalized usage and leak of mutex
We locked an unitialized mutex in the callstack
glClientWaitSync
intel_gl_client_wait_sync
brw_fence_client_wait_sync
because we forgot to initialize it in intel_gl_fence_sync.
(The EGLSync codepath didn't have this bug. It initialized the mutex in
intel_dri_create_sync).
We also forgot to tear down (mtx_destroy) the mutex when destroying
the sync object.
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Jason Ekstrand [Wed, 5 Oct 2016 19:12:33 +0000 (12:12 -0700)]
nir: Use the correct infos structure for copying atomic sources
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Tested-by: Mark Janes <mark.a.janes@intel.com>
Cc: "12.0" <mesa-dev@lists.freedestkop.org>
Samuel Pitoiset [Sun, 2 Oct 2016 14:59:10 +0000 (16:59 +0200)]
nvc0: dump program binary when chipset has been forced
Currently, program binaries are only dumped at upload time, but
when the chipset has been forced via NV50_PROG_CHIPSET we might
want to show the generated code, especially with shaderdb.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Marek Olšák [Tue, 4 Oct 2016 23:49:30 +0000 (01:49 +0200)]
radeonsi: fix texture border colors for compute shaders
There are VM faults without this.
Cc: 12.0 <mesa-stable@lists.freedesktop.org>
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Tue, 4 Oct 2016 21:29:27 +0000 (23:29 +0200)]
gallium/radeon/winsyses: set reasonable max_alloc_size
which is returned for GL_MAX_TEXTURE_BUFFER_SIZE.
It doesn't have any other use at the moment.
Bigger allocations are not rejected.
This fixes GL45-CTS.texture_buffer.texture_buffer_max_size on Bonaire.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Tue, 4 Oct 2016 20:33:03 +0000 (22:33 +0200)]
radeonsi: fix interpolateAt opcodes for .zw components
Not returning garbage in .zw seems pretty important.
This fixes:
GL45-CTS.shader_multisample_interpolation.render.interpolate_at_*_check.*
Cc: 11.2 12.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Tue, 4 Oct 2016 17:53:53 +0000 (19:53 +0200)]
radeonsi: add assertions to validate interpolation flags
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Tue, 4 Oct 2016 19:08:17 +0000 (21:08 +0200)]
radeonsi: interpolate colors after interpolation weight shuffling
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Thu, 8 Sep 2016 17:12:00 +0000 (19:12 +0200)]
tgsi/scan: don't set interp flags for inputs only used by INTERP (v2)
(v1 pushed, then reverted)
This fixes 9 randomly failing tests on radeonsi:
GL45-CTS.shader_multisample_interpolation.render.interpolate_at_centroid.*
v2: use input_interpolate[input] (correct) instead of
input_interpolate[index] (incorrect)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Marek Olšák [Tue, 4 Oct 2016 22:06:10 +0000 (00:06 +0200)]
ddebug: dump most driver information with GALLIUM_DDEBUG=always
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Karol Herbst [Mon, 3 Oct 2016 16:55:09 +0000 (18:55 +0200)]
nv50/ra: let simplify return an error and handle that
fixes a crash in the case simplify reports an error
Signed-off-by: Karol Herbst <karolherbst@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Nanley Chery [Wed, 5 Oct 2016 16:32:52 +0000 (09:32 -0700)]
intel/blorp: Use documented RECTLIST vertex positions
Use the vertex positions described in the PRMs. This has no effect on
rendering but quiets the simulator warnings seen when the vertices
appear out of order.
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Jason Ekstrand [Sun, 25 Sep 2016 16:41:27 +0000 (09:41 -0700)]
anv/meta: Roll clear_image into CmdClearDepthStencilImage
It is now the only caller so there's no sense in keeping things split out.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Jason Ekstrand [Sun, 25 Sep 2016 15:44:40 +0000 (08:44 -0700)]
anv: Use blorp for VkCmdFillBuffer
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Kyle Brenneman [Mon, 12 Sep 2016 21:51:22 +0000 (17:51 -0400)]
egl: Implement EGL_KHR_debug (v2)
Wire up the debug entrypoints to EGL dispatch, and add the extension
string to the client extension list.
v2:
- Lots of style fixes
- Fix missing EGLAPIENTRYs
- Factor out valid attribute check
- Lock display in eglLabelObjectKHR as needed, and use RETURN_EGL_*
- Move "EGL_KHR_debug" into asciibetical order in client extension
string
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emil Velikov <emil.veliko@collabora.com>
Kyle Brenneman [Mon, 12 Sep 2016 21:50:40 +0000 (17:50 -0400)]
egl: Track EGL_KHR_debug state when going through EGL API calls (v3)
This decorates every EGL entrypoint with _EGL_FUNC_START, which records
the function name and primary dispatch object label in the current
thread state. It also adds debug report functions and calls them when
appropriate.
This would be useful enough for debugging on its own, if the user set a
breakpoint when the report function was called. We will also need this
state tracked in order to expose EGL_KHR_debug.
v2:
- Clear the object label in more cases in _eglSetFuncName
- Pass draw surface (if any) to _EGL_FUNC_START in eglSwapInterval
v3:
- Set dummy thread's CurrentAPI to EGL_OPENGL_ES_API not zero
- Less ?: in _eglSetFuncName
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emil Velikov <emil.veliko@collabora.com>
Lionel Landwerlin [Tue, 4 Oct 2016 15:17:56 +0000 (16:17 +0100)]
intel: aubinator: pack supported generations into an array
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Ben Widawsky [Wed, 5 Oct 2016 03:42:30 +0000 (20:42 -0700)]
i965/l3: Add explicit way size calculation for bxt
There should be no functional change here because Broxton and CHV are
both gt1. Without this code however, it might seem like broxton support
is missing.
While here, put the gt1 check in front to hopefully short-circuit the
condition for the mobile cases.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>