Commit graph

83004 commits

Author SHA1 Message Date
Timothy Arceri
8b80e9c31d i965: add double support packing support to gs inputs
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-07-07 10:26:43 +10:00
Timothy Arceri
20e935e6f6 nir: add glsl_double_type() helper
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-07-07 10:26:43 +10:00
Timothy Arceri
9d9b0b54cd i965: add indirect packing support to gs load inputs
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-07-07 10:26:43 +10:00
Timothy Arceri
2477e6cfad i965: add indirect packing support for tcs and tes
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-07-07 10:26:43 +10:00
Timothy Arceri
2bda4b062f i965: add component packing support for tcs
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-07-07 10:26:43 +10:00
Timothy Arceri
cfff71a47a i965: add component packing support for tes
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-07-07 10:26:43 +10:00
Timothy Arceri
a102ef2d4f i965: add component packing support for gs
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-07-07 10:26:43 +10:00
Timothy Arceri
448adfbc67 nir: use the same driver location for packed varyings
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-07-07 10:26:43 +10:00
Timothy Arceri
0eea6b3297 nir: add new intrinsic field for storing component offset
This offset is used for packing.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-07-07 10:26:43 +10:00
Eric Engestrom
771f6db76f i965/docs: update Intel Linux Graphics URLs
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
2016-07-06 13:18:23 -07:00
Chad Versace
8910de39c7 anv: gitignore anv_timestamp.h 2016-07-06 13:13:18 -07:00
Tom Stellard
513fccdfb6 radeon/llvm: Use alloca instructions for larger arrays
We were storing arrays in vectors, which was leading to some really bad
spill code for large arrays.  allocas instructions are a better fit for
arrays and LLVM optimizations are more geared toward dealing with
allocas instead of vectors.

For arrays that have 16 or less 32-bit elements, we will continue to use
vectors, because this will force LLVM to store them in registers and
use indirect registers, which is usually faster for small arrays.

In the future we should use allocas for all arrays and teach LLVM
how to store allocas in registers.

This fixes the piglit test:

spec/glsl-1.50/execution/geometry/max-input-component

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-07-06 19:47:38 +00:00
Tom Stellard
02873a7b0c radeon/llvm: Add helpers for loading and storing data from arrays.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-07-06 19:47:38 +00:00
Tom Stellard
2dc48984b2 radeon/llvm: Remove uses_temp_indirect_addressing() function
bld->indirect_files is never set, so this function always returns false.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-07-06 19:47:38 +00:00
Emil Velikov
9618e2a24c anv: vulkan: remove the anv_device.$(OBJEXT) rule
Atm the actual rule will expand to foo.o which is used for static
libraries only.

Thus the automake manual recommendation [to use OBJEXT] won't help us,
since since we're working with a shared library.

Thus let's 'demote' the file and add it back to BUILT_SOURCES. This will
manage all the complexity for us, at the (existing expense) of working
only with the all, check and install targets.

The crazy (why the issue was hard to spot):
If the dependencies (.deps/*.Plo) are already created one can alter the
anv_device.$(OBJEXT) line and/or nuke it all together. That won't lead
to any warnings/issues, even though the Makefile is regenerated.

Moral of the story:
Always rm -rf top_builddir or don't resolve the dependencies manually
and use BUILT_SOURCES.

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96825
Fixes: d7a604c3f7a ("anv: use cache uuid based on the build timestamp.")
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Tested-by: Mark Janes <mark.a.janes@intel.com>
2016-07-06 10:19:19 -07:00
Rob Clark
64d35f817a vbo: fix attr reset
In bc4e0c4 (vbo: Use a bitmask to track the active arrays in vbo_exec*.)
we stopped looping over all the attributes and resetting all slots.
Which exposed an issue in vbo_exec_bind_arrays() for handling GENERIC0
vs. POS.

Split out a helper which can reset a particular slot, so that
vbo_exec_bind_arrays() can re-use it to reset POS.

This fixes an issue with 0ad (and possibly others).

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2016-07-06 10:17:30 -04:00
Rob Clark
23dd9eaa94 list: fix list_replace() for empty lists
Before, it would happily copy list_head next/prev (ie. pointer to the
*from* list_head), leaving things in a confused state and causing much
mayhem.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-07-06 10:17:30 -04:00
Rob Clark
09fe35b450 gallium: un-inline pipe_surface_desc
Want to re-use this struct, so un-inline it.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-07-06 10:17:30 -04:00
Rob Clark
def044376a gallium/util: make util_copy_framebuffer_state(src=NULL) work
Be more consistent with the other u_inlines util_copy_xyz_state()
helpers and support NULL src.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-07-06 10:17:30 -04:00
Nicolai Hähnle
660cd3de4a winsys/amdgpu: avoid flushed depth when possible
If a depth/stencil texture has no mipmaps, we can always get a layout that is
compatible with DB and TC.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-07-06 10:43:52 +02:00
Nicolai Hähnle
7000dfd5c3 gallium/radeon: add depth/stencil_adjusted output to surface computation
This fixes a rare bug with stencil texturing -- seen on Polaris and Tonga,
though it's basically a function of the memory configuration so could affect
other parts as well.

Fixes piglit "unaligned-blit * stencil downsample" and various
"fbo-depth-array *stencil*" tests.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-07-06 10:43:52 +02:00
Nicolai Hähnle
68fe270e71 gallium/radeon: allocate only the required plane for flushed depth
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-07-06 10:43:52 +02:00
Nicolai Hähnle
1a0a8efcce radeonsi: decompress to flushed depth texture when required
v2: s/dirty_level_mask/stencil_dirty_level_mask/ in stencil case

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-07-06 10:43:51 +02:00
Nicolai Hähnle
4b7961da77 radeonsi: extract DB->CB copy logic into its own function
Also clean up some of the looping.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-07-06 10:43:51 +02:00
Nicolai Hähnle
18cc825fb9 radeonsi: sample from flushed depth texture when required
Note that this has no effect yet. A case where can_sample_z/s can be false
in radeonsi will be added in a later patch.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-07-06 10:43:51 +02:00
Nicolai Hähnle
f2eb34f82f gallium/radeon: replace is_flushing_texture with db_compatible
This is a left-over of when I considered generalizing the separate stencil
support. I do prefer the new name since it emphasizes what flushing vs.
non-flushing means from a functional point-of-view, namely special handling
of the texture format.

v2: adjust r600_init_color_surface as well

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-07-06 10:43:48 +02:00
Nicolai Hähnle
dd65126153 gallium/radeon: add can_sample_z/s flags for textures
v2: adjust r600_init_color_surface as well

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-07-06 10:43:43 +02:00
Nicolai Hähnle
065eeb79f7 radeonsi: correctly mark levels of 3D textures as fully decompressed
Account for the fact that max_layer is minified for higher levels.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-07-06 10:42:49 +02:00
Nicolai Hähnle
19f8d2a843 gallium/radeon/winsyses: remove unused stencil_offset
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-07-06 10:42:49 +02:00
Nicolai Hähnle
3a1da559c5 gallium/radeon: remove redundant null-pointer check
v2: keep using r600_texture_reference

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-07-06 10:42:48 +02:00
Nicolai Hähnle
5b87eef031 gallium/radeon: print StencilLayout only once
It is the same for all levels.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-07-06 10:42:48 +02:00
Nicolai Hähnle
bae066c3f0 gallium/radeon: flush stdout after printing texture information
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-07-06 10:42:48 +02:00
Ilia Mirkin
a37e46323c glsl: don't try to lower non-gl builtins as if they were gl_FragData
If a shader has an output array, it will get treated as though it were
gl_FragData and rewritten into gl_out_FragData instances. We only want
this to happen on the actual gl_FragData and not everything else.

This is a small part of the problem pointed out by the below bug.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96765
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org>
2016-07-05 21:22:01 -04:00
Ian Romanick
795d8dff89 glsl: Document and enforce restriction on type values
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-07-05 17:55:29 -07:00
Ian Romanick
3119871bd9 glsl: Pack integer and double varyings as flat even if interpolation mode is none
v2: Also update varying_matches::compute_packing_class().  Suggested by
Timothy Arceri.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96358
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Cc: Gregory Hainaut <gregory.hainaut@gmail.com>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
2016-07-05 16:58:27 -07:00
Ian Romanick
73a6a4ce49 mesa: Strip arrayness from interface block names in some IO validation
Outputs from the vertex shader need to be able to match
per-vertex-arrayed inputs of later stages.  Acomplish this by stripping
one level of arrayness from the names and types of outputs going to a
per-vertex-arrayed stage.

v2: Add missing checks for TESS_EVAL->GEOMETRY.  Noticed by Timothy
Arceri.

v3: Use a slightly simpler stage check suggested by Ilia.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96358
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Cc: Gregory Hainaut <gregory.hainaut@gmail.com>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
2016-07-05 16:58:27 -07:00
Charmaine Lee
32651c67d1 svga: avoid emitting redundant DXSetRenderTargets command
Tested with Lightsmark2008, MTT piglit, glretrace, conform.

Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-07-05 16:58:29 -06:00
Leo Liu
aa7d42a5f9 radeon/vce: update encRefPic addr and array mode to tiled
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2016-07-05 09:15:50 -04:00
Leo Liu
e560a11b87 radeon/vce: increase cpb height alignment
Height should be aligned with 2 macroblocks, thus making safer
for tiled mode

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2016-07-05 09:15:47 -04:00
Iago Toral Quiroga
fa0654fc3c i965: Remove trailing whitespace
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-07-05 14:06:37 +02:00
Iago Toral Quiroga
d92ac67126 i965: Make inline function static
Without this the i965 driver fails to load.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-07-05 14:05:58 +02:00
Emil Velikov
cbc37f72e3 anv: install the intel_icd.json to ${datarootdir} by default
As mentioned by the spec (and used by Archlinux and Debian) default to
${datarootdir} as opposed to ${sysconfdir} for the default location.

Cc: Jason Ekstrand <jason@jlekstrand.net>
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-07-05 12:17:34 +01:00
Emil Velikov
744d0d8f3b swr: automake: don't ship LLVM version specific generated sources
Otherwise things will fail to build, if the builder is using another
version of LLVM.

v2: annotate all the dependencies of builder_gen.h
v3: clean the generated files as needed
v4: comment cleanups (Tim)

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Tested-by: Tim Rowley <timothy.o.rowley@intel.com>
Tested-by: Chuck Atkins <chuck.atkins@kitware.com> (v2)
Reported-by: Chuck Atkins <chuck.atkins@kitware.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2016-07-05 12:17:05 +01:00
Emil Velikov
22e9357028 automake: don't mandate git_sha1.h/MESA_GIT_SHA1
It has proven subtle to get it right both from the build side POV (see
commit list below) and builders due to their varying workflows.

Furthermore it does not fully fulfil the reason why it was enforced -
to detect uniqueness between different builds, in order to distinguish
and invalidate Vulkan/GL caches.

With that having a much better solution (previous commit) we can drop
this solution.

This effectively reverts the following commits:
359d9dfec3 ("mesa: automake: add directory prefix for git_sha1.h")
2c424e00c3 ("mesa: automake: ensure that git_sha1.h.tmp has the right
attributes")
b7f7ec7843 ("mesa: automake: distclean git_sha1.h when building OOT")
8229fe68b5 ("automake: get in-tree `make distclean' working again.")

Cc: Timo Aaltonen <tjaalton@debian.org>
Cc: Haixia Shi <hshi@chromium.org>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2016-07-05 12:16:20 +01:00
Emil Velikov
e5c1229a9a anv: automake: indent with tabs and not spaces
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2016-07-05 12:16:06 +01:00
Emil Velikov
addb099ce8 anv: use cache uuid based on the build timestamp.
Do not rely on the git sha1:
 - its current truncated form makes it less unique
 - it does not attribute for local (Vulkand or otherwise) changes

Use a timestamp produced at the time of build. It's perfectly unique,
unless someone explicitly thinkers with their system clock. Even then
chances of producing the exact same one are very small, if not zero.

v2: Remove .tmp rule. Its not needed since we want for the header to be
regenerated on each time we call make (Eric).

v3:
 - Honour SOURCE_DATE_EPOCH, to make the build reproducible (Michel)
 - Replace the generated header with a define, to prevent needless
builds on consecutive `make' and/or `make install' calls. (Dave)

v4:
 - Keep the timestamp generation at make time. (Jason)

v5:
 - Ensure that file is regenerated on incremental builds.

Cc: Michel Dänzer <michel@daenzer.net>
Cc: Dave Airlie <airlied@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-07-05 12:15:23 +01:00
Emil Velikov
f98530b739 clover: conditionally use MESA_GIT_SHA1
Considering how hard/annoying it was for many peoples' workflow to
properly generate the macro, it will be demoted to conditionally
available with follow-up commits.

v2: Kill off gracious blank line (Vedran).

Cc: mesa-stable@lists.freedesktop.org
Cc: Vedran Miletić <vedran@miletic.net>
Cc: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (v1)
Reviewed-by: Vedran Miletić <vedran@miletic.net>
2016-07-05 12:14:34 +01:00
Timothy Arceri
9c9e3e7ee1 mesa: stop copying SamplerUnits twice
The call to _mesa_update_shader_textures_used() already takes
care of copying for us.

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2016-07-05 20:18:05 +10:00
Timothy Arceri
25a32c2cbf mesa: make attribute binding message more useful
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2016-07-05 20:18:05 +10:00
Timothy Arceri
8f1ca0ee3f i965: make more effective use of SamplersUsed
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2016-07-05 20:18:05 +10:00