Commit graph

77772 commits

Author SHA1 Message Date
Chad Versace
42b9320fbf anv/image: Rename nonrt_surface_state
Let's call it what it is, not what it is not. Rename it to
'sampler_surface_state'.
2016-02-04 12:20:51 -08:00
Jason Ekstrand
1f5d56304f anv/descriptor_set: Fix descriptor copies
We weren't pulling the actual binding location information out of the set
layout.  The new code mirrors the descriptor write code.
2016-02-03 22:44:33 -08:00
Mark Janes
6a7e2904e0 nir/spirv: fix build_mat4_det stack smasher
When generating a sub-determinate matrix, a 3-element swizzle array was
indexed with clever inline boolean logic.  Unfortunately, when i and j
are both 3, the index overruns the array, smashing the next variable on
the stack.

For 64 bit builds, the alignment of the 3-element unsigned array leaves
32 bits of spacing before the next local variable, hiding this bug.  On
i386, a subcolumn pointer was smashed then dereferenced.
2016-02-02 15:30:54 -08:00
Mark Janes
ea8c2d118a anv: Fix anv_descriptor_set reference error on deletion
anv_descriptor_set_destroy uses the descriptor sets's set_layout member
to iterate the set's buffer views.  However, the set_layout reference
may have previously been freed.

On 64 bit builds, this bug generated valgrind errors but did not affect
CTS test results.  On 32 bit builds, it reliably produces assertions and
memory corruption.
2016-02-02 15:28:01 -08:00
Kristian Høgsberg Kristensen
5a06bac4a0 anv: Use @LIB_DIR@ in anv_icd.json
Otherwise we may get a lib vs lib64 mismatch.
2016-02-02 14:36:22 -08:00
Jason Ekstrand
fd99f3d658 anv/device: Improve version error reporting 2016-02-02 13:16:13 -08:00
Jason Ekstrand
c7f26bbed9 vulkan: Bump the header to 1.0.3 2016-02-02 13:08:47 -08:00
Jason Ekstrand
0d2145b50f anv/fence: Default to not ready
This is kind-of silly.  We *really* need to do a better job of making sure
all objects have all their default values set.  We probably also want to,
eventually, put everything into the BO (to save memory) and, more
specifically, make the GPU write the "ready" flag.  That way GetFenceStatus
won't ever have to call into the kernel.
2016-02-02 12:22:03 -08:00
Mark Janes
ac0589b213 i965: fix unsigned long overflows for i386
bit-shifts on 32 bit unsigned longs overflow in several places.  The
intention was for 64 bit integers to be used.
2016-02-01 14:52:22 -08:00
Jason Ekstrand
8776d3cb8e nir/spirv: Fix UBO loads of a single element of a row-major matrix 2016-02-01 14:03:05 -08:00
Jason Ekstrand
499f7c2f0b nir/spirv: Handle the LOD parameter of OpImageQuerySizeLod 2016-02-01 14:03:05 -08:00
Jason Ekstrand
b1a1623293 nir/spirv: Add support for SpvOpImage 2016-02-01 14:03:05 -08:00
Jason Ekstrand
593f88c0db nir/spirv: Fix the UBO loading case of a single row-major matric column 2016-02-01 14:03:05 -08:00
Jason Ekstrand
abc0e5c1b8 nir/spirv: Fix the UBO loading case of a single row-major matric column 2016-02-01 13:26:59 -08:00
Jason Ekstrand
2d2c6fc6bb anv/wsi/wayland: Advertise sRGB 2016-02-01 13:06:35 -08:00
Jason Ekstrand
443c578bca anv/wsi/x11: Expose SRGB all the time
After a long discussion with Eric Anholt and Owen Taylor, I learned that
X11 is basically always sRGB as that's what the scanout hardware does and X
doesn't modify anything.  Therefore, we should just always expose sRGB
formats.
2016-02-01 13:06:35 -08:00
Chad Versace
afb327a985 anv: Structify a one-member union
anv_descriptor contained a union with one member.
2016-02-01 12:18:10 -08:00
Kristian Høgsberg Kristensen
dc5fdcd6b7 anv: Advertise robustBufferAccess
The GPU does most of this for us as long as we set up tight bounds for
the buffers, which we do. Additionally, we range check dynamically
buffers in the shader. With that it's safe to turn on robustBufferAccess.
2016-02-01 12:00:05 -08:00
Chad Versace
ffbc32f8d9 anv/meta: Strip trailing whitespace 2016-02-01 10:51:01 -08:00
Chad Versace
aa5e257860 anv: Update MSAA status in README 2016-02-01 10:46:24 -08:00
Jason Ekstrand
a88b1eeb13 Update the README 2016-02-01 06:10:51 -08:00
Jason Ekstrand
ea63663a72 wsi/x11: Remove B8G8R8_UNORM
We don't actually support that format yet because ISL doesn't have an enum
for it.  We need to beef up the formats table to allow for tiled-only
formats.
2016-02-01 06:00:50 -08:00
Jordan Justen
f96a6c65a3 anv/gen7: Rename gen7_batch_lr* to emit_lr*
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2016-01-30 15:06:03 -08:00
Jordan Justen
b207a6b5aa anv/gen7: Set BypassGatewayControl in MEDIA_VFE_STATE
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2016-01-30 15:06:03 -08:00
Jordan Justen
2d8726a4b7 anv/genX_pipeline: Remove unnecessary #include files
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2016-01-30 09:30:54 -08:00
Jordan Justen
8e48ff3ad6 anv/gen7: Set SLM size in interface descriptor
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2016-01-30 09:10:54 -08:00
Jordan Justen
ab0d8608d2 anv: Support MEDIA_VFE_STATE for gen7
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2016-01-30 09:08:34 -08:00
Jordan Justen
dd2effb0e7 anv/gen7: Subtract 1 from num_elements when setting up buffer surface state
e8f51fe4 for gen7

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2016-01-30 09:00:00 -08:00
Jordan Justen
4bb1e7937a anv/gen7: Disable fs dispatch for depth/stencil only pipelines
292031a for gen7

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2016-01-30 09:00:00 -08:00
Jordan Justen
f5b3a2fe32 anv/gen7: Add support for gl_NumWorkGroups
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2016-01-30 09:00:00 -08:00
Jordan Justen
7e46cc8603 anv/gen7/compute: Setup push constants and local ids
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2016-01-30 09:00:00 -08:00
Jordan Justen
b1158ced45 anv/genX: Add genX_pipeline.c for compute_pipeline_create
Adds initial compute_pipeline_create implementation for gen7.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2016-01-30 08:58:11 -08:00
Jason Ekstrand
1a442a7923 Merge branch 'vulkan' into 'vulkan'
Vulkan WSI Wayland fixes

Two small fixes to make mailbox mode actually work again.

See merge request !4
2016-01-30 10:28:12 -05:00
Jason Ekstrand
c668dc9f75 anv/pass: Initialize has_resolve 2016-01-30 07:16:33 -08:00
Jason Ekstrand
ad813b072a anv/wsi: Set the platform field of VkIcdSurfaceBase 2016-01-30 07:05:53 -08:00
Jason Ekstrand
5acc4e2ebf anv/wsi/x11: Actually pull information from the window's visual 2016-01-30 03:51:47 -08:00
Jason Ekstrand
66e8b5cf2b anv/wsi/x11: Actually check for DRI3 2016-01-30 03:50:31 -08:00
Jason Ekstrand
44ec860cd6 anv/WSI: Support more usage bits
They're just images and we have no intention of stompping alpha channels
(at least not yet), so there's no reason why you can't sample.
2016-01-29 20:52:44 -08:00
Jason Ekstrand
337c1e0871 anv/formats: Add more compressed formats
This adds support for the DX compression formats.  Given that ETC and EAC
are working fine, these should be ok too.
2016-01-29 20:46:31 -08:00
Jason Ekstrand
c688e4db11 anv/wsi: Rework to be compatable with the loader 2016-01-29 20:39:21 -08:00
Jason Ekstrand
d4953fb340 vulkan: Import vk_icd.h 2016-01-29 20:37:45 -08:00
Jason Ekstrand
a19ceee46c anv/device: Fix version check
The bottom-end check was wrong so it was only working on <= 1.0.0.  Oops.
2016-01-29 20:36:58 -08:00
Kristian Høgsberg Kristensen
f28645f71c anv: Don't disable snooping for mempools
There's an intermittent flushing problem with VkEvent that we need to
root cause. For now, using the snooping feature keeps the memory pools
up to date with GPU writes and fixes the problem.
2016-01-29 17:19:51 -08:00
Kristian Høgsberg Kristensen
0c4ef36360 anv: clflush is only orderered against mfence
We can't use the more fine-grained load and store fence commands (lfence
and mfence), since clflush is only guaranteed to be ordered with respect
to mfence.
2016-01-29 14:56:41 -08:00
Kristian Høgsberg Kristensen
31d3486bd2 anv: Limit flushing to the range of mapped memory 2016-01-29 14:56:41 -08:00
Ben Widawsky
89ec36f221 anv/cmd_buffer: Emit gen9 style SF state for CHV
The state for line width changes on Cherryview to use the GEN9 bits (for extra
precision).
2016-01-29 14:12:32 -08:00
Ben Widawsky
31508bd0ce anv/gen8: Extract SF state
For upcoming patch to address difference in Cherryview.
2016-01-29 14:11:53 -08:00
Chad Versace
f8a4abcd15 anv: Do resolves at end of subpass 2016-01-28 10:49:50 -08:00
Chad Versace
bef8456ede anv/meta: Remove unneeded resolve pipeline
Vulkan does not allow resolving a single-sample image. So remove that
pipeline from anv_meta_state::resolve::pipelines.
2016-01-28 10:45:11 -08:00
Chad Versace
ac5594fa71 anv/meta_resolve: Remove redundant initialization params 2016-01-28 10:14:39 -08:00