Commit Graph

78322 Commits

Author SHA1 Message Date
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
Jason Ekstrand 0a3324e66c anv: Pull Khronos stuff from the README 2016-02-16 07:43:21 -08:00
Kristian Høgsberg Kristensen a3672a241b anv/genxml: Include MBO bits for gen7 and gen75 2016-02-15 17:57:03 -08:00
Kristian Høgsberg Kristensen c2b2ebf1ed anv: Add missing gen75_cmd_buffer_set_subpass() prototype 2016-02-15 17:40:15 -08:00
Adam Jackson 80ec20351c anv: Bump to 1.0.3
Probably this should be picked up from <vulkan.h> directly, or we should
just assume that any 1.0.x is legal.
2016-02-15 17:38:26 -08:00
Kristian Høgsberg Kristensen b53edea76c anv/gen7: Make disabling the FS work
We disable the fragment shader for depth/stencil-only pipelines. This
commit makes that work for gen7.
2016-02-15 17:32:07 -08:00
Kristian Høgsberg Kristensen 85f67cf16e anv: Deduplicate render pass code
This lets us share the renderpass code and depth/stencil state code
between gen 7 and gen 8.
2016-02-15 17:32:07 -08:00
Kristian Høgsberg Kristensen ac4fd0ed21 anv/gen7: Fix pipeline selection in init_device_state()
We need the 3D pipeline for the initial setup, not GPGPU.
2016-02-15 17:32:07 -08:00
Kristian Høgsberg Kristensen ea694637ac anv/gen7: Set 3DSTATE_SF depth buffer format correctly
We need to pull this from the render pass information at state flush
time.
2016-02-15 17:32:07 -08:00
Kristian Høgsberg Kristensen 18dd59538b anv/gen7: Call flush_pipeline_select_3d() from CmdBeginRenderPass 2016-02-15 17:32:07 -08:00
Kristian Høgsberg Kristensen 832f73f512 anv: Share flush_pipeline_select_3d() between gen7 and gen8 2016-02-15 17:32:07 -08:00
Kristian Høgsberg Kristensen 53eaa0a6b8 anv: Fix warning 3DSTATE_VERTEX_ELEMENTS setup
This is a little more subtle. If elem_count is 0, nothing else happens
in this function, so we return early to avoid warning about
uninitialized 'p'.
2016-02-15 17:32:07 -08:00
Kristian Høgsberg Kristensen 5d72d7b12d anv: Fix misc simple warnings 2016-02-15 17:32:07 -08:00
Jason Ekstrand 08ecd8a8d1 anv/meta_resolve: Set origin_upper_left on gl_FragCoord
It's required by the spec and any shaders that don't set it will be broken.
I'm not really sure how multisampling was even working before...
2016-02-15 12:45:03 -08:00
Jason Ekstrand 88042b9f10 nir: Get rid of the C++ NIR_SRC/DEST_INIT macros
These were originally added to reduce compiler warnings but aren't really
needed.  Getting rid of them reduces the diff between the Vulkan branch and
master, so we might as well.
2016-02-12 21:35:02 -08:00
Kristian Høgsberg Kristensen c136672c59 anv: Disable snooping for allocator pools again
The race we were seeing on cherryview was caused by the multi-submit
problem with fences. We can now turn snooping off again an rely on
clflush and we intended.
2016-02-12 15:11:31 -08:00
Kristian Høgsberg Kristensen b0c30b77d4 anv: Submit fence bo only after all command buffers
We were submitting the fence bo after each command buffer in a multi
command buffer submit, causing us to occasionally complete the fence too
early.
2016-02-12 15:08:09 -08:00