Commit graph

78338 commits

Author SHA1 Message Date
Jason Ekstrand
442dff8cf4 anv/descriptor_set: Stop marking everything as having dynamic offsets 2016-02-22 17:23:29 -08:00
Kristian Høgsberg Kristensen
2570a58bcd anv: Implement descriptor pools
Descriptor pools are an optimization that lets applications allocate
descriptor sets through an externally synchronized object (that is,
unlocked).  In our case it's also plugging a memory leak, since we
didn't track all allocated sets and failed to free them in
vkResetDescriptorPool() and vkDestroyDescriptorPool().
2016-02-22 17:13:51 -08:00
Kristian Høgsberg Kristensen
353d5bf286 anv/x11: Free swapchain images and memory on destroy 2016-02-22 16:23:47 -08:00
Mark Janes
08b408311c vulkan: fix out-of-tree builds 2016-02-22 11:31:15 -08:00
Kristian Høgsberg Kristensen
f843aabdd4 intel/genxml: Add README
I've had people ask about the design of the pack functions, for example,
why aren't we using bitfields. I wrote up a bit of background on why and
how we ended up with the current design and we might as well keep that
with the code.
2016-02-22 09:14:25 -08:00
Nanley Chery
7b2c63a53c anv/meta_blit: Handle compressed textures in anv_CmdCopyImage
As with anv_CmdCopyBufferToImage, compressed textures require special
handling during copies.

Reviewed-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2016-02-22 09:04:28 -08:00
Jason Ekstrand
f49ba0f7d8 nir/spirv: Add support for multisampled textures 2016-02-21 22:02:38 -08:00
Jason Ekstrand
f1dddeadc2 anv: Fix a typo in apply_dynamic_offsets
shader->num_uniforms is in terms of bytes in i965.
2016-02-20 21:24:31 -08:00
Jason Ekstrand
b5868d2343 anv: Zero out the WSI array when initializing the instance 2016-02-20 19:30:14 -08:00
Jason Ekstrand
bc696f1db6 isl: Stop including mesa/main/imports.h
It pulls in all sorts of stuff we don't want.
2016-02-20 10:35:25 -08:00
Jason Ekstrand
853fc3e431 genxml: Add mote includes in the generated headers 2016-02-20 09:33:20 -08:00
Jason Ekstrand
1f1cf6fcb0 anv: Get rid of GENX_FUNC
It was a bad idea.
2016-02-20 09:12:38 -08:00
Jason Ekstrand
371b4a5b33 anv: Switch over to the macros in genxml 2016-02-20 09:09:28 -08:00
Jason Ekstrand
0d76aa9485 intel/genxml: Add a couple of helper headers 2016-02-20 08:35:36 -08:00
Jason Ekstrand
2b85807458 genxml: Stop using unicode in the pack generator
This causes python problems and problems when people don't have a locale
set properly in their shell.
2016-02-19 08:05:35 -08:00
Dave Airlie
1375cb3c27 anv: fix warning about unused width variable.
We don't use width outside the debug clause here.
2016-02-19 08:01:54 -08:00
Jason Ekstrand
698ea54283 anv/pipeline: Fix a typo in the pipeline layout code 2016-02-18 13:55:57 -08:00
Jason Ekstrand
d5bb23156d anv/allocator: Set is_winsys_bo to false for block pool BOs 2016-02-18 13:55:57 -08:00
Mark Janes
1b37276467 vulkan: fix out-of-tree build
We need to be able to find the generated gen*pack.h headers.

Acked-by: Jason Ekstrand <jason.ekstrand@intel.com>
2016-02-18 12:30:27 -08:00
Jason Ekstrand
e0565f40ea anv/pipeline: Use nir's num_images for allocating image_params 2016-02-18 11:44:26 -08:00
Jason Ekstrand
79c0781f44 nir/gather_info: Count textures and images 2016-02-18 11:42:36 -08:00
Jason Ekstrand
e881c73975 anv/pipeline: Don't leak the binding map 2016-02-18 11:09:30 -08:00
Jason Ekstrand
8c23392c26 anv/formats: Don't use a compound literal to initialize a const array
Doing so makes older versions of GCC rather grumpy.  Newere GCC fixes this,
but using a compound literal isn't really gaining us anything anyway.
2016-02-18 10:44:08 -08:00
Jason Ekstrand
9851c8285f Move the intel vulkan driver to src/intel/vulkan 2016-02-18 10:37:59 -08:00
Jason Ekstrand
47b8b08612 Move isl to src/intel 2016-02-18 10:34:47 -08:00
Jason Ekstrand
f6d9587688 vulkan: Move XML and generator into src/intel/genxml 2016-02-18 10:30:29 -08:00
Kristian Høgsberg Kristensen
542c38df36 anv/meta: Initialize blend state for the right attachment
We were always initializing only RT 0. We need to initialize the RT
we're creating the clear pipeline for.
2016-02-18 10:22:50 -08:00
Kristian Høgsberg Kristensen
05f75a3026 anv/meta: Don't use the blit ds layout in resolve code 2016-02-18 10:22:50 -08:00
Jason Ekstrand
40c76d4efa Delete nir_lower_samplers.cpp
Somehow, in one of the merges with mesa master, the old file must have been
kept when nir_lower_samplers.cpp was moved to nir_lower_samplers.c.
2016-02-17 20:16:11 -08:00
Jason Ekstrand
005b9ac758 anv: Gut anv_pipeline_layout
Almost none of the data in anv_pipeline_layout is used anymore thanks to
doing real layout in the pipeline itself.
2016-02-17 18:04:40 -08:00
Kristian Høgsberg Kristensen
c2581a9375 anv: Build the real pipeline layout in the pipeline
This gives us the chance to pack the binding table down to just what the
shaders actually need.  Some applications use very large descriptor sets
and only ever use a handful of entries.  Compacted binding tables should be
much more efficient in this case.  It comes at the down-side of having to
re-emit binding tables every time we switch pipelines, but that's
considered an acceptable cost.
2016-02-17 18:04:39 -08:00
Jason Ekstrand
581e4468f9 nir/spirv: Add some more capabilities 2016-02-17 18:04:39 -08:00
Jason Ekstrand
fed8b7f817 anv/pipeline: Delete out-of-bounds fragment shader outputs 2016-02-17 18:04:39 -08:00
Jason Ekstrand
979732fafc nir: Add a helper for getting the one function from a shader 2016-02-17 18:04:39 -08:00
Jason Ekstrand
8c05b44bbb nir: Add a nir_foreach_variable_safe helper 2016-02-17 18:04:39 -08:00
Jason Ekstrand
d67d84f5e5 i965/nir: Do lower_io late for fragment shaders 2016-02-17 18:04:39 -08:00
Jason Ekstrand
7c26d8d471 anv/gen7_pipeline: Set WriteDisable = true if we have no color attachments 2016-02-17 18:04:39 -08:00
Jason Ekstrand
9f9cd3de44 anv/gen8_pipeline: Default color attachments to WriteDisable = true 2016-02-17 18:04:39 -08:00
Jason Ekstrand
da9fd74d34 anv: Pull StencilBufferWriteEnable from both sides 2016-02-17 18:04:39 -08:00
Nanley Chery
9963af8bbd anv: Ignore unused dimensions in vkCreateImage's anv_image
We ignore unused dimensions in the isl surface; do the same for the
resulting anv_image.

Reviewed-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2016-02-17 17:32:26 -08:00
Kristian Høgsberg Kristensen
b8da261dc7 spirv: Fix SpvOpFwidth, SpvOpFwidthFine and SpvOpFwidthCoarse
"Result is the same as computing the sum of the absolute values of
    OpDPdx and OpDPdy on P."

We were doing sum of absolute values of OpDPdx of P and OpDPdx of NULL.
2016-02-17 15:28:52 -08:00
Kristian Høgsberg Kristensen
ae3e249d57 anv: Remove hacky PIPE_CONTROL in vkCmdEndRenderPass()
The vkCmdPipelineBarrier() command should work as intended now and we
need to pull the plug on this old hack.
2016-02-17 15:19:07 -08:00
Kristian Høgsberg Kristensen
5e92e91c61 anv: Rework vkCmdPipelineBarrier()
We don't need to look at the stage flags, as we don't really support any
fine-grained, stage-level synchronization. We have to do two
PIPE_CONTROLs in case we're both flushing and
invalidating.

Additionally, if we do end up doing two PIPE_CONTROLs, the first,
flusing one also has to stall and wait for the flushing to finish, so we
don't re-dirty the caches with in-flight rendering after the second
PIPE_CONTROL invalidates.
2016-02-17 15:18:06 -08:00
Kristian Høgsberg Kristensen
3b9b908054 anv: Ignore unused dimensions in vkCreateImage
We would assert on unused dimensions (eg extent.depth for
VK_IMAGE_TYPE_2D) not being 1, but the specification doesn't put any
constraints on those. For example, for VK_IMAGE_TYPE_1D:

   "If imageType is VK_IMAGE_TYPE_1D, the value of extent.width must be
    less than or equal to the value of
    VkPhysicalDeviceLimits::maxImageDimension1D, or the value of
    VkImageFormatProperties::maxExtent.width (as returned by
    vkGetPhysicalDeviceImageFormatProperties with values of format,
    type, tiling, usage and flags equal to those in this structure) -
    whichever is higher"

We'll fix up the arguments to isl to keep isl strict in what it expects.
2016-02-17 12:21:51 -08:00
Kristian Høgsberg Kristensen
b63e28c0e1 anv: Set correct write domain on window system BOs
We need to make sure GEM understands that we're writing to the BO, in
case it needs to synchronize with other rings (blitter use in display
server, for example).
2016-02-17 11:19:56 -08:00
Kristian Høgsberg Kristensen
5caa995c32 Revert "anv: Disable snooping for allocator pools again"
This reverts commit c136672c59.

We still have the intermittent missing flush for VkEvent in certain
vulkancts cases:

  piglit.deqp-vk.api.command_buffers.execute_large_primary
  piglit.deqp-vk.api.command_buffers.submit_count_non_zero,

Let's reenable the snooping until we figure out the root cause.
2016-02-16 23:23:49 -08:00
Kristian Høgsberg Kristensen
ecc67f1aac anv: Make driver and icd file installable
Change the name of the .so to libvulkan_intel.so and add an installable
icd with the installed paths.  Keep the icd file with build-tree paths,
but rename to dev_icd.json to make it clear that it's for development
purposes.
2016-02-16 23:23:17 -08:00
Kristian Høgsberg Kristensen
4a2d17f606 anv: Revise PhysicalDeviceFeatures and remove FINISHME 2016-02-16 15:43:12 -08:00
Philipp Zabel
ecd1d94d1c anv: pCreateInfo->pApplicationInfo parameter to vkCreateInstance may be NULL
Fix a NULL pointer dereference in anv_CreateInstance in case
the pApplicationInfo field of the supplied VkInstanceCreateInfo
structure is NULL [1].

[1] https://www.khronos.org/registry/vulkan/specs/1.0/apispec.html#VkInstanceCreateInfo

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
2016-02-16 14:42:26 -08:00
Jason Ekstrand
48087cfc4e anv/icd.json: Update the ABI version 2016-02-16 08:02:17 -08:00