Commit Graph

81674 Commits

Author SHA1 Message Date
Nicolai Hähnle c23273532e gallium/radeon: use radeon_emit
Mostly generated using a sed-script, with manual fix-up for multi-line
statements.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-05-17 15:28:38 -05:00
Nicolai Hähnle 4ac555e9e5 st/mesa: fix reversed copyimage canonical format
The format_desc swizzle describes where in the array each color channel
comes from - but the existing code was written as if each entry in the
swizzle described the meaning of an array element.

Fixes piglit's arb_copy_image-format-swizzle.

Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-05-17 15:28:38 -05:00
Jordan Justen 6c9f35bb73 Revert "HACK: Don't re-configure L3$ in render stages pre-BDW"
This reverts commit 41af9b2e51.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94468
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-05-17 13:04:03 -07:00
Jordan Justen 8a80af2820 anv: Port L3 cache programming from i965
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
2016-05-17 13:04:03 -07:00
Jordan Justen aa41de080d anv/gen7: Add memory barrier to vkCmdWaitEvents call
We also have this barrier call for gen8 vkCmdWaitEvents.

We don't implement waiting on events for gen7 yet, but this barrier at
least helps to not regress CTS cases when data caching is enabled.
Without this, the tests would intermittently report a failure when the
data cache was enabled.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-05-17 13:04:03 -07:00
Jordan Justen 8ee31828c6 anv: Keep track of whether the data cache should be enabled in L3
If images or shader buffers are used, we will enable the data cache in
the the L3 config.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-05-17 13:04:03 -07:00
Jordan Justen ff41738871 genxml/hsw: Add L3 cache control registers
These were added to the i965 driver in
5912da45a6.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-05-17 13:04:03 -07:00
Jan Vesely 47b390fe45 Treewide: Remove Elements() macro
Signed-off-by: Jan Vesely <jano.vesely@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2016-05-17 15:28:04 -04:00
Jan Vesely 322cd2457c r600g,sb: Don't use standard macro name
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
2016-05-17 15:28:03 -04:00
Jason Ekstrand b6c4d46a58 anv/formats: Add support for VK_FORMAT_B4G4R4A4_UNORM pre-gen8 2016-05-17 12:17:22 -07:00
Jason Ekstrand 45c93384e5 anv: Add a devinfo argument to the get_format functions 2016-05-17 12:17:22 -07:00
Jason Ekstrand 100db3d31c anv/formats: Set the swizzle to RGB1 when using an RGBA format to fake RGB
This way we get correct sampling from RGB formats that are faked as RGBA.
This should also cause it to disable rendering and blending on those
formats.  We should be able to render to them and, on Broadwell and above,
we can blend on them with work-arounds.  However, we'll add support for
that more properly later when it's deemed useful.  For now, disabling
rendering and blending should be safe.
2016-05-17 12:17:22 -07:00
Jason Ekstrand ce375fba41 anv/formats: Refactor anv_get_format
The new code removes the switch statement and instead handles depth/stencil
as up-front special cases.  This allows for potentially more complicated
color format handling in the future.
2016-05-17 12:17:22 -07:00
Jason Ekstrand 34198d798c anv: Use 16 bits for the isl_format in anv_format
This way the entire anv_format structure fits in 32 bits
2016-05-17 12:17:22 -07:00
Jason Ekstrand 7cae59012d anv/formats: Use the isl_channel_select enum for the swizzle 2016-05-17 12:17:22 -07:00
Jason Ekstrand 8ed429a4f0 anv/formats: Add an anv_get_format helper
This commit removes anv_format_for_vk_format and adds an anv_get_format
helper.  The anv_get_format helper returns the anv_format by-value.  Unlike
anv_format_for_vk_format the format returned by anv_get_format is 100%
accurate and includes any tweaks needed for tiled vs. linear.
anv_get_isl_format is now just a wrapper around anv_get_format that picks
off just the isl_format.
2016-05-17 12:17:22 -07:00
Jason Ekstrand 13f5cee663 anv/format: Simplify anv_format
Now that we have VkFormat introspection and we've removed everything that
tried to use anv_format for introspection, we no longer need most of what
was in anv_format.
2016-05-17 12:17:22 -07:00
Jason Ekstrand c1c004e5b2 anv/formats: Delete validate_GetPhysicalDeviceFormatProperties
All it ever did was some extra logging that was useful when initially
bringing up Dota2.  We don't need it anymore.
2016-05-17 12:17:22 -07:00
Jason Ekstrand aad56f3ee7 anv/image: Use aspects for computing full usage 2016-05-17 12:17:22 -07:00
Jason Ekstrand fbc23d93e0 anv: Remove the anv_format member from anv_image 2016-05-17 12:17:22 -07:00
Jason Ekstrand be94a23b44 anv/wsi: Use vk_format_info for asserts rather than anv_format 2016-05-17 12:17:22 -07:00
Jason Ekstrand 63dbb2c60a anv/copy: Use the linear format from the image for the buffer block size
Because the buffer is exposed to the user, the block size is defined to
always exactly be the size of the actual vulkan format.  This is the same
size (it had better be) as the linaer image format.
2016-05-17 12:17:22 -07:00
Jason Ekstrand c87429c5f1 anv/image: Stop using anv_format for image create validation 2016-05-17 12:17:22 -07:00
Jason Ekstrand 990a7420b6 anv/image: Make heavier use of aspects 2016-05-17 12:17:22 -07:00
Jason Ekstrand 369b8bf402 anv/copy: Use the color_surf from the image to get the block size 2016-05-17 12:17:22 -07:00
Jason Ekstrand 9102e88364 anv: Change render_pass_attachment.format to a VkFormat 2016-05-17 12:17:22 -07:00
Jason Ekstrand ffc502ce0c anv: Add helpers to provide simple VkFormat introspection
As much as I hate adding yet more format introspection, there are times
when the VkFormat is sufficient and we don't want to round-trip through
isl_format.  For these times, the new vk_format_info.c/h files provide some
simple driver-agnostic VkFormat introspection.  This intended to be
specific to Vulkan but not to any driver whatsoever.
2016-05-17 12:17:22 -07:00
Jason Ekstrand 97ba402cc3 anv/image: Use get_isl_format when creating buffer views 2016-05-17 12:17:22 -07:00
Jason Ekstrand 234ecf26c6 anv/image: Add an aspects field
This makes several checks easier and allows us to avoid calling
anv_format_for_vk_format in a number of cases.
2016-05-17 12:17:22 -07:00
Jason Ekstrand 1bda8d06e5 anv: Make format_for_descriptor return an isl_format 2016-05-17 12:17:22 -07:00
Jason Ekstrand 263a8cb52d anv/wayland: Don't allow non-renderable formats 2016-05-17 12:17:22 -07:00
Jason Ekstrand eb6baa3174 anv/wsi: Make WSI per-physical-device rather than per-instance
This better maps to the Vulkan object model and also allows WSI to at least
know the hardware generation which is useful for format checks.
2016-05-17 12:17:22 -07:00
Adam Jackson 2ad9d6237a glapi/gen: Copy some GL 1.0 enum details into ARB_viewport_array
Otherwise the instances in the extension XML override the core
definitions, and we stop knowing their sizes in indirect_size_get.c

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-05-17 15:04:56 -04:00
Adam Jackson f4983b194d glapi: Define PURE for Sun Studio as well
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-05-17 15:04:56 -04:00
Adam Jackson f1dd8dd6b6 glapi/glx: Mark byteswap functions as _X_UNUSED (v2)
Squashes the one remaining warning in the xserver build.

v2: Also clean up some non-standard whitespace (Ian Romanick)

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-05-17 15:04:56 -04:00
Adam Jackson ea08a5bcf6 glapi: Harden GLX request size processing (v2)
v2: Use == not is for equality testing (Dylan Baker)

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-05-17 15:04:56 -04:00
Adam Jackson 88cfc9ddaa glapi: Add the safe_{add,mul,pad} functions from xserver
We're about to update the generator scripts to use these, easier not to
vary between client and server.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-05-17 15:04:56 -04:00
Adam Jackson 7bc5c7f586 glapi: Fix whitespace droppings when printing the license header
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-05-17 15:04:56 -04:00
Rob Clark 1e93b0caa1 mesa/st: add support for NIR as possible driver IR
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Acked-by: Eric Anholt <eric@anholt.net>
2016-05-17 14:22:46 -04:00
Rob Clark 2bbb140be3 mesa/st: move things around a bit in st_create_fp_variant()
Prep work for next patch.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-05-17 14:22:46 -04:00
Rob Clark 8f9a46dccb mesa/st: add nir pass for lowering builtin uniforms
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2016-05-17 14:22:46 -04:00
Emil Velikov 52addd90d1 scons: gallium: link against nir as needed
... otherwise we'll produce uncomplete binaries with introduction of NIR
as alternative IR with next commits.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
2016-05-17 14:22:46 -04:00
Jason Ekstrand 265487aedf i965/fs: Add an allow_spilling flag to brw_compile_fs
This allows us to disable spilling for blorp shaders since blorp state
setup doesn't handle spilling.  Without this, blorp fails hard if you run
with INTEL_DEBUG=spill.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Tested-by: Francisco Jerez <currojerez@riseup.net>
2016-05-17 10:20:11 -07:00
Ilia Mirkin dd4b44efc0 nvc0/ir: fix shared atomic lowering to preserve shared memory location
We were always doing atomics on shared memory location 0 instead of the
originally supplied location. Make sure to pass through the original
symbol and any indirection.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable@lists.freedesktop.org # note: expect minor conflict
2016-05-17 11:22:01 -04:00
Rob Clark b65bd3dee5 freedreno/ir3: fix compiler warning
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2016-05-17 10:05:20 -04:00
Rob Clark e8beffb1b3 nir/validate: dump annotated shader with error msgs
Log all the errors, and at the end dump the shader w/ error annotations
to make it easier to see where the problems are.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
2016-05-17 10:05:20 -04:00
Rob Clark 54ecfcc162 nir/validate: assert() -> validate_assert()
Prep work for next patch.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
2016-05-17 10:05:20 -04:00
Rob Clark a0ef26c1c2 nir/print: add support for print annotations
Caller can pass a hashtable mapping NIR object (currently instr or var,
but I guess others could be added as needed) to annotation msg to print
inline with the shader dump.  As the annotation msg is printed, it is
removed from the hashtable to give the caller a way to know about any
unassociated msgs.

This is used in the next patch, for nir_validate to try to associate
error msgs to nir_print dump.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
2016-05-17 10:05:20 -04:00
Alejandro Piñeiro e5e412cd27 i965: Expose OpenGL 4.2 for gen8+
ARB_vertex_attrib_64bit was the only feature missing.

v2: we can expose 4.2 instead of 4.1 (Ian Romanick)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-05-17 09:05:55 +02:00
Alejandro Piñeiro f051eae25a docs: Mark ARB_vertex_attrib_64bit as done for i965/gen8+
v2: label as done for i965/gen8+ instead of i965 (Kenneth Graunke)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-05-17 09:05:55 +02:00