mesa.git
8 years agovk/image: Add explicit constructors for buffer/image view types
Jason Ekstrand [Fri, 10 Jul 2015 19:25:30 +0000 (12:25 -0700)]
vk/image: Add explicit constructors for buffer/image view types

8 years agonir: Add C++ versions of NIR_(SRC|DEST)_INIT
Jason Ekstrand [Fri, 10 Jul 2015 17:59:09 +0000 (10:59 -0700)]
nir: Add C++ versions of NIR_(SRC|DEST)_INIT

8 years agomesa: Fix generation of git_sha1.h.tmp for gitlinks
Chad Versace [Fri, 10 Jul 2015 01:46:21 +0000 (18:46 -0700)]
mesa: Fix generation of git_sha1.h.tmp for gitlinks

Don't assume that $(top_srcdir)/.git is a directory. It may be a
gitlink file [1] if $(top_srcdir) is a submodule checkout or a linked
worktree [2].

[1] A "gitlink" is a text file that specifies the real location of
    the gitdir.
[2] Linked worktrees are a new feature in Git 2.5.

Cc: "10.6, 10.5" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
(cherry picked from commit 75784243df1f5bb0652fb243b37d69f36d493a86)

8 years agovk/query.c: Use the casting functions
Jason Ekstrand [Fri, 10 Jul 2015 03:32:44 +0000 (20:32 -0700)]
vk/query.c: Use the casting functions

8 years agovk/pipeline.c: Use the casting functions
Jason Ekstrand [Fri, 10 Jul 2015 03:28:08 +0000 (20:28 -0700)]
vk/pipeline.c: Use the casting functions

8 years agovk/formats.c: Use the casting functions
Jason Ekstrand [Fri, 10 Jul 2015 03:24:17 +0000 (20:24 -0700)]
vk/formats.c: Use the casting functions

8 years agovk/image.c: Use the casting functions
Jason Ekstrand [Fri, 10 Jul 2015 03:24:07 +0000 (20:24 -0700)]
vk/image.c: Use the casting functions

8 years agovk/device.c: One more use of a casting function
Jason Ekstrand [Fri, 10 Jul 2015 03:23:46 +0000 (20:23 -0700)]
vk/device.c: One more use of a casting function

8 years agovk/meta.c: Use the casting functions
Jason Ekstrand [Fri, 10 Jul 2015 03:16:13 +0000 (20:16 -0700)]
vk/meta.c: Use the casting functions

8 years agovk: Fix the build
Jason Ekstrand [Fri, 10 Jul 2015 01:59:05 +0000 (18:59 -0700)]
vk: Fix the build

8 years agodevice.c: Use the cast helpers a bunch of places
Jason Ekstrand [Fri, 10 Jul 2015 01:41:27 +0000 (18:41 -0700)]
device.c: Use the cast helpers a bunch of places

8 years agodevice.c: Use the cast helpers
Jason Ekstrand [Fri, 10 Jul 2015 01:41:27 +0000 (18:41 -0700)]
device.c: Use the cast helpers

8 years agovk/private.h: Add a bunch of static inline casting functions
Jason Ekstrand [Fri, 10 Jul 2015 01:35:22 +0000 (18:35 -0700)]
vk/private.h: Add a bunch of static inline casting functions

We will need these as soon as we turn on type saftey.  We might as well
define and start using them now rather than later.

8 years agovk/device.c: Fix whitespace issues
Jason Ekstrand [Fri, 10 Jul 2015 01:20:28 +0000 (18:20 -0700)]
vk/device.c: Fix whitespace issues

8 years agovk/device.c: Use ANV_FROM_HANDLE a bunch of places
Jason Ekstrand [Fri, 10 Jul 2015 01:20:10 +0000 (18:20 -0700)]
vk/device.c: Use ANV_FROM_HANDLE a bunch of places

8 years agovk/vulkan.h: Add the pEnabledFeatures field to DeviceCreateInfo
Jason Ekstrand [Thu, 9 Jul 2015 23:21:31 +0000 (16:21 -0700)]
vk/vulkan.h: Add the pEnabledFeatures field to DeviceCreateInfo

8 years agovk/vulkan.h: Change the MsCreateInfo structure to the 130 version
Jason Ekstrand [Thu, 9 Jul 2015 23:19:52 +0000 (16:19 -0700)]
vk/vulkan.h: Change the MsCreateInfo structure to the 130 version

We do nothing with it at the moment, so this is a no-op.

8 years agovk: Remove the old GetPhysicalDeviceInfo call
Jason Ekstrand [Thu, 9 Jul 2015 23:14:31 +0000 (16:14 -0700)]
vk: Remove the old GetPhysicalDeviceInfo call

8 years agovk: Add the new PhysicalDeviceQueue queries
Jason Ekstrand [Thu, 9 Jul 2015 23:11:24 +0000 (16:11 -0700)]
vk: Add the new PhysicalDeviceQueue queries

8 years agovk: Support GetPhysicalDeviceProperties
Jason Ekstrand [Thu, 9 Jul 2015 22:53:03 +0000 (15:53 -0700)]
vk: Support GetPhysicalDeviceProperties

8 years agovk: Add support for GetPhysicalDeviceLimits
Jason Ekstrand [Thu, 9 Jul 2015 22:38:30 +0000 (15:38 -0700)]
vk: Add support for GetPhysicalDeviceLimits

8 years agovk: Add GetPhysicalDeviceFeatures
Jason Ekstrand [Thu, 9 Jul 2015 20:54:08 +0000 (13:54 -0700)]
vk: Add GetPhysicalDeviceFeatures

8 years agovk/device: Fix vkEnumeratePhysicalDevices()
Chad Versace [Thu, 9 Jul 2015 22:51:06 +0000 (15:51 -0700)]
vk/device: Fix vkEnumeratePhysicalDevices()

The Vulkan spec says that pPhysicalDeviceCount is an out parameter if
pPhysicalDevices is NULL; otherwise it's an inout parameter.

Mesa incorrectly treated it unconditionally as an inout parameter, which
could have lead to reading unitialized data.

8 years agovk/device: Move device enumeration to vkEnumeratePhysicalDevices()
Chad Versace [Thu, 9 Jul 2015 22:38:58 +0000 (15:38 -0700)]
vk/device: Move device enumeration to vkEnumeratePhysicalDevices()

Don't enumerate devices in vkCreateInstance(). That's where global,
device-independent initialization should happen. Move device enumeration
to the more logical location, vkEnumeratePhysicalDevices().

8 years agovk/device: Be consistent about path to DRM device
Chad Versace [Thu, 9 Jul 2015 22:23:25 +0000 (15:23 -0700)]
vk/device: Be consistent about path to DRM device

Function fill_physical_device() has a 'path' parameter, and struct
anv_physical_device has a 'path' member. Sometimes these are used;
sometimes hardcoded "/dev/dri/renderD128" is used instead.

Be consistent. Hardcode "/dev/dri/renderD128" in exactly one location,
during initialization of the physical device.

8 years agovk/compiler: create an empty parameters list
Connor Abbott [Thu, 9 Jul 2015 18:29:23 +0000 (14:29 -0400)]
vk/compiler: create an empty parameters list

Prevents problems when initializing the sanity_param_count.

8 years agonir/spirv: fix wrong writemask for ALU operations
Connor Abbott [Thu, 9 Jul 2015 18:28:39 +0000 (14:28 -0400)]
nir/spirv: fix wrong writemask for ALU operations

8 years agonir/spirv: fix memory context for builtin variable
Connor Abbott [Thu, 9 Jul 2015 02:01:33 +0000 (22:01 -0400)]
nir/spirv: fix memory context for builtin variable

Fixes valgrind errors with func.depthstencil.basic.

8 years agonir/spirv: zero out value array
Connor Abbott [Thu, 9 Jul 2015 01:50:16 +0000 (21:50 -0400)]
nir/spirv: zero out value array

Before values are pushed or annotated with a name, decoration, etc.,
they need to have an invalid type, NULL name, NULL decoration, etc.
ralloc zero's everything by accident, so this wasn't an issue in
practice, but we should be explicitly zero'ing it.

8 years agovk/compiler: create the right kind of program struct
Connor Abbott [Thu, 9 Jul 2015 01:48:57 +0000 (21:48 -0400)]
vk/compiler: create the right kind of program struct

This fixes Valgrind errors and gets all the tests to pass with
--use-spir-v.

8 years agovk/compiler: mark inputs/outputs as read/written
Connor Abbott [Thu, 9 Jul 2015 01:47:43 +0000 (21:47 -0400)]
vk/compiler: mark inputs/outputs as read/written

This doesn't handle inputs and outputs larger than a vec4, but we plan
to add a varyiing splitting/packing pass to handle those anyways.

8 years agovk/vulkan.h: Copy the VkStructureType enum from version 130
Jason Ekstrand [Thu, 9 Jul 2015 00:45:50 +0000 (17:45 -0700)]
vk/vulkan.h: Copy the VkStructureType enum from version 130

We now have the exact same structs which require pType.

8 years agovk: Move to the new pipeline creation API's
Jason Ekstrand [Thu, 9 Jul 2015 00:29:49 +0000 (17:29 -0700)]
vk: Move to the new pipeline creation API's

8 years agovk/0.130: Remove VkImageViewCreateInfo::minLod
Chad Versace [Wed, 8 Jul 2015 21:39:05 +0000 (14:39 -0700)]
vk/0.130: Remove VkImageViewCreateInfo::minLod

It's now set solely through VkSampler.

8 years agovk/vulkan.h: Move renderPassContinue from GraphicsBeginInfo to BeginInfo
Jason Ekstrand [Wed, 8 Jul 2015 21:37:30 +0000 (14:37 -0700)]
vk/vulkan.h: Move renderPassContinue from GraphicsBeginInfo to BeginInfo

8 years agovk/vulkan.h: Update to the new UpdateDescriptorSets api
Jason Ekstrand [Wed, 8 Jul 2015 21:24:56 +0000 (14:24 -0700)]
vk/vulkan.h: Update to the new UpdateDescriptorSets api

8 years agovk: Add a macro for creating anv variables from vulkan handles
Jason Ekstrand [Wed, 8 Jul 2015 21:24:12 +0000 (14:24 -0700)]
vk: Add a macro for creating anv variables from vulkan handles

This is very helpful for doing the mass bunch of casts at the top of a
function.  It will also be invaluable when we get type saftey in the API.

8 years agovk/0.130 Update VkObjectType values
Chad Versace [Wed, 8 Jul 2015 19:53:49 +0000 (12:53 -0700)]
vk/0.130 Update VkObjectType values

Don't import any new enum tokens from the 0.130 header. Just update the
values of existing enums. This reduces the diff by about 16 lines.

8 years agovk/0.130: Remove VkDescriptorUpdateMode
Chad Versace [Wed, 8 Jul 2015 19:51:46 +0000 (12:51 -0700)]
vk/0.130: Remove VkDescriptorUpdateMode

Nowhere used.

8 years agovk/0.130: Remove VK_DEVICE_CREATE_MULTI_DEVICE_IQ_MATCH_BIT
Chad Versace [Wed, 8 Jul 2015 19:49:15 +0000 (12:49 -0700)]
vk/0.130: Remove VK_DEVICE_CREATE_MULTI_DEVICE_IQ_MATCH_BIT

8 years agovk/0.130: Update vkCmdBlitImage signature
Chad Versace [Wed, 8 Jul 2015 19:46:35 +0000 (12:46 -0700)]
vk/0.130: Update vkCmdBlitImage signature

Add VkTexFilter param. Ignored for now.

8 years agovk/vulkan.h: Add packing parameters to BufferImageCopy
Jason Ekstrand [Wed, 8 Jul 2015 18:51:12 +0000 (11:51 -0700)]
vk/vulkan.h: Add packing parameters to BufferImageCopy

8 years agovk/0.130: Remove msaa members of VkDepthStencilViewCreateInfo
Chad Versace [Wed, 8 Jul 2015 18:49:43 +0000 (11:49 -0700)]
vk/0.130: Remove msaa members of VkDepthStencilViewCreateInfo

8 years agovk/vulkan.h: Move over to the new border color enums
Jason Ekstrand [Wed, 8 Jul 2015 18:44:52 +0000 (11:44 -0700)]
vk/vulkan.h: Move over to the new border color enums

8 years agovk/vulkan.h: Move VkFormatProperties
Jason Ekstrand [Wed, 8 Jul 2015 18:16:45 +0000 (11:16 -0700)]
vk/vulkan.h: Move VkFormatProperties

8 years agovk/vulkan.h: Add RenderPassBeginContents
Jason Ekstrand [Wed, 8 Jul 2015 17:57:13 +0000 (10:57 -0700)]
vk/vulkan.h: Add RenderPassBeginContents

8 years agovk/vulkan.h: Add command buffer levels
Jason Ekstrand [Wed, 8 Jul 2015 17:53:32 +0000 (10:53 -0700)]
vk/vulkan.h: Add command buffer levels

8 years agovk/vulkan.h: Import the VkPipeEvent enum from 130
Jason Ekstrand [Wed, 8 Jul 2015 17:49:43 +0000 (10:49 -0700)]
vk/vulkan.h: Import the VkPipeEvent enum from 130

Now, VkPipeEventFlags is back in sync with VkPipeEvent

8 years agovk/vulkan.h: Remove VkFormatInfoType
Jason Ekstrand [Wed, 8 Jul 2015 17:39:31 +0000 (10:39 -0700)]
vk/vulkan.h: Remove VkFormatInfoType

8 years agovk/vulkan.h: Update extension handling to rev 130
Jason Ekstrand [Wed, 8 Jul 2015 17:38:07 +0000 (10:38 -0700)]
vk/vulkan.h: Update extension handling to rev 130

8 years agovk/vulkan.h: Move format quering to the physical device
Jason Ekstrand [Wed, 8 Jul 2015 16:34:47 +0000 (09:34 -0700)]
vk/vulkan.h: Move format quering to the physical device

8 years agovk/vulkan.h: Remove some peer opening structs and STRUCTURE_TYPE enums
Jason Ekstrand [Wed, 8 Jul 2015 16:25:13 +0000 (09:25 -0700)]
vk/vulkan.h: Remove some peer opening structs and STRUCTURE_TYPE enums

8 years agovk: Add a copy of the v90 header.
Jason Ekstrand [Wed, 8 Jul 2015 16:23:29 +0000 (09:23 -0700)]
vk: Add a copy of the v90 header.

8 years agovk/vulkan.h: Remove an unneeded comment
Jason Ekstrand [Wed, 8 Jul 2015 16:18:09 +0000 (09:18 -0700)]
vk/vulkan.h: Remove an unneeded comment

8 years agovk/vulkan.h: Remove the MemoryRange stubs and add sparse stubs
Jason Ekstrand [Wed, 8 Jul 2015 16:16:48 +0000 (09:16 -0700)]
vk/vulkan.h: Remove the MemoryRange stubs and add sparse stubs

8 years agovk/vulkan.h: Switch BindObjectMemory to a device function and remove the index
Jason Ekstrand [Wed, 8 Jul 2015 16:04:16 +0000 (09:04 -0700)]
vk/vulkan.h: Switch BindObjectMemory to a device function and remove the index

8 years agovk/vulkan.h: Switch to the split ProcAddr functions in 130
Jason Ekstrand [Wed, 8 Jul 2015 01:51:53 +0000 (18:51 -0700)]
vk/vulkan.h: Switch to the split ProcAddr functions in 130

8 years agovk/vulkan.h: Switch from GetImageSubresourceInfo to GetImageSubresourceLayout
Jason Ekstrand [Wed, 8 Jul 2015 01:20:18 +0000 (18:20 -0700)]
vk/vulkan.h: Switch from GetImageSubresourceInfo to GetImageSubresourceLayout

8 years agovk/vulkan.h: Switch from GetObjectInfo to GetMemoryRequirements
Jason Ekstrand [Wed, 8 Jul 2015 01:16:42 +0000 (18:16 -0700)]
vk/vulkan.h: Switch from GetObjectInfo to GetMemoryRequirements

8 years agovk: Update memory flushing functions to 130
Jason Ekstrand [Wed, 8 Jul 2015 00:22:29 +0000 (17:22 -0700)]
vk: Update memory flushing functions to 130

This involves updating the prototype for FlushMappedMemory, adding
InvalidateMappedMemoryRanges, and removing PinSystemMemory.

8 years agovk/vulkan.h: Constify the pFences parameter to ResetFences
Jason Ekstrand [Wed, 8 Jul 2015 00:18:00 +0000 (17:18 -0700)]
vk/vulkan.h: Constify the pFences parameter to ResetFences

8 years agovk/vulkan.h: Move the definitions of Create(Framebuffer|RenderPass)
Jason Ekstrand [Wed, 8 Jul 2015 00:13:05 +0000 (17:13 -0700)]
vk/vulkan.h: Move the definitions of Create(Framebuffer|RenderPass)

This better matches the 130 header.

8 years agovk: Implement the GetRenderAreaGranularity function
Jason Ekstrand [Wed, 8 Jul 2015 00:11:35 +0000 (17:11 -0700)]
vk: Implement the GetRenderAreaGranularity function

At the moment, we're just going to scissor clears so a granularity of 1x1
is all we need.

8 years agovk/vulkan.h: Add a PipelineLayout parameter to BindDescriptorSets
Jason Ekstrand [Wed, 8 Jul 2015 00:06:10 +0000 (17:06 -0700)]
vk/vulkan.h: Add a PipelineLayout parameter to BindDescriptorSets

8 years agovk/vulkan.h: Add a compareEnable parameter to SamplerCreateInfo
Jason Ekstrand [Tue, 7 Jul 2015 23:49:01 +0000 (16:49 -0700)]
vk/vulkan.h: Add a compareEnable parameter to SamplerCreateInfo

Our hardware doesn't actually need this, so adding it is a no-op.

8 years agovk/vulkan.h: Remove initialCount from SemaphoreCreateInfo
Jason Ekstrand [Tue, 7 Jul 2015 23:42:42 +0000 (16:42 -0700)]
vk/vulkan.h: Remove initialCount from SemaphoreCreateInfo

8 years agovk/vulkan.h: Update clear color handling to 130
Jason Ekstrand [Tue, 7 Jul 2015 23:37:43 +0000 (16:37 -0700)]
vk/vulkan.h: Update clear color handling to 130

8 years agometa: Use the VkClearColorValue structure for the color attribute
Jason Ekstrand [Tue, 7 Jul 2015 23:27:06 +0000 (16:27 -0700)]
meta: Use the VkClearColorValue structure for the color attribute

8 years agovk/vulkan.h: Remove the pass argument from EndRenderPass
Jason Ekstrand [Tue, 7 Jul 2015 23:22:23 +0000 (16:22 -0700)]
vk/vulkan.h: Remove the pass argument from EndRenderPass

8 years agovk/vulkan.h: Rename VertexInputStateInfo to VertexInputStateCreateInfo
Jason Ekstrand [Tue, 7 Jul 2015 23:15:55 +0000 (16:15 -0700)]
vk/vulkan.h: Rename VertexInputStateInfo to VertexInputStateCreateInfo

8 years agovk/vulkan.h: Remove programPointSize
Jason Ekstrand [Tue, 7 Jul 2015 22:57:03 +0000 (15:57 -0700)]
vk/vulkan.h: Remove programPointSize

Instead, we auto-detect whether or not your shader writes gl_PointSize.  If
it does, we use 1.0, otherwise we take it from the shader.

8 years agovk/0.130: Stub vkCmdClear*Attachment() funcs
Chad Versace [Tue, 7 Jul 2015 22:56:12 +0000 (15:56 -0700)]
vk/0.130: Stub vkCmdClear*Attachment() funcs

vkCmdClearColorAttachment
vkCmdClearDepthStencilAttachment

8 years agovk/0.130: Define enum VkImageAspectFlagBits
Chad Versace [Tue, 7 Jul 2015 22:57:17 +0000 (15:57 -0700)]
vk/0.130: Define enum VkImageAspectFlagBits

8 years agovk/0.130: Define VkRect3D
Chad Versace [Tue, 7 Jul 2015 22:55:53 +0000 (15:55 -0700)]
vk/0.130: Define VkRect3D

8 years agovk/0.130: Update name of vkCmdClearDepthStencilImage()
Chad Versace [Tue, 7 Jul 2015 22:53:35 +0000 (15:53 -0700)]
vk/0.130: Update name of vkCmdClearDepthStencilImage()

8 years agovk/0.130: Stub vkCmdExecuteCommands()
Chad Versace [Tue, 7 Jul 2015 22:51:55 +0000 (15:51 -0700)]
vk/0.130: Stub vkCmdExecuteCommands()

8 years agovk/0.130: Update vkCmdWaitEvents() signature
Chad Versace [Tue, 7 Jul 2015 22:49:57 +0000 (15:49 -0700)]
vk/0.130: Update vkCmdWaitEvents() signature

8 years agovk: Remove unused 'v' param from stub() macro
Chad Versace [Tue, 7 Jul 2015 22:47:24 +0000 (15:47 -0700)]
vk: Remove unused 'v' param from stub() macro

8 years agovk: Stub vkCmdPushConstants() from 0.130 header
Chad Versace [Tue, 7 Jul 2015 22:46:19 +0000 (15:46 -0700)]
vk: Stub vkCmdPushConstants() from 0.130 header

8 years agovk: Update vkCmdPipelineBarrier to 0.130 header
Chad Versace [Tue, 7 Jul 2015 22:42:38 +0000 (15:42 -0700)]
vk: Update vkCmdPipelineBarrier to 0.130 header

8 years agovk: Add func anv_clear_mask()
Chad Versace [Tue, 7 Jul 2015 22:42:04 +0000 (15:42 -0700)]
vk: Add func anv_clear_mask()

A little helper func for inspecting and clearing bitmasks.

8 years agovk/vulkan.h: Remove some unused fields.
Jason Ekstrand [Tue, 7 Jul 2015 21:42:47 +0000 (14:42 -0700)]
vk/vulkan.h: Remove some unused fields.

In particular, the following are removed:

 - disableVertexReuse
 - clipOrigin
 - depthMode
 - pointOrigin
 - provokingVertex

8 years agovk/vulkan.h: Remove the explicit primitive restart index
Jason Ekstrand [Tue, 7 Jul 2015 22:11:56 +0000 (15:11 -0700)]
vk/vulkan.h: Remove the explicit primitive restart index

Unfortunately, this requires some non-trivial changes to the driver.  Now
that the primitive restart index isn't given explicitly by the client, we
always use ~0 for everything like D3D does.  Unfortunately, our hardware is
awesome and a 32-bit version of ~0 doesn't match any 16-bit values.  This
means, we have to set it to either UINT16_MAX or UINT32_MAX depending on
the size of the index type.  Since we get the index type from
CmdBindIndexBuffer and the rest of the VF packet from the pipeline, we need
to lazy-emit the VF packet.

8 years agovk: Delete some comments not present in 0.130 header
Chad Versace [Tue, 7 Jul 2015 22:16:13 +0000 (15:16 -0700)]
vk: Delete some comments not present in 0.130 header

Deleting the comments reduces diff noise.

8 years agovk: Pull in remaining 0.130 handle types
Chad Versace [Tue, 7 Jul 2015 22:13:01 +0000 (15:13 -0700)]
vk: Pull in remaining 0.130 handle types

This pulls in the definition of VkShaderModule and VkPipelineCache,
which nowhere used yet.

8 years agovk: Pull in #defines from 0.130 header
Chad Versace [Tue, 7 Jul 2015 22:10:34 +0000 (15:10 -0700)]
vk: Pull in #defines from 0.130 header

Despite not being used yet, pulling in the macros does diminish the
header diff.

8 years agovk/vulkan.h: Rename (min|max)Depth to (min|max)DepthBounds
Jason Ekstrand [Tue, 7 Jul 2015 19:37:54 +0000 (12:37 -0700)]
vk/vulkan.h: Rename (min|max)Depth to (min|max)DepthBounds

8 years agovk/vulkan.h: Remove client-settable pointSize from DynamicRsState
Jason Ekstrand [Tue, 7 Jul 2015 19:35:32 +0000 (12:35 -0700)]
vk/vulkan.h: Remove client-settable pointSize from DynamicRsState

8 years agovk/vulkan.h: Remove UINT8 index buffers
Jason Ekstrand [Tue, 7 Jul 2015 18:26:26 +0000 (11:26 -0700)]
vk/vulkan.h: Remove UINT8 index buffers

8 years agovk/vulkan.h: Re-order the object declarations
Jason Ekstrand [Tue, 7 Jul 2015 17:37:14 +0000 (10:37 -0700)]
vk/vulkan.h: Re-order the object declarations

8 years agovk: Emit 3DSTATE_SAMPLE_MASK
Kristian Høgsberg Kristensen [Tue, 7 Jul 2015 05:21:51 +0000 (22:21 -0700)]
vk: Emit 3DSTATE_SAMPLE_MASK

This was missing and was causing the driver to not work with
execlists. Presumably we get a different initial hw context with
execlists enabled, that has sample mask 0 initially.

Set this to 0xffff for now.  When we add MS support, we need to take the
value from VkPipelineMsStateCreateInfo::sampleMask.

8 years agovk: Pull in new generated headers
Kristian Høgsberg Kristensen [Mon, 22 Jun 2015 06:47:10 +0000 (23:47 -0700)]
vk: Pull in new generated headers

The new headers use stdbool for enable/disable fields which
implicitly converts expressions like (flags & 8) to 0 or 1.
Also handles MBO (must-be-one) fields by setting them to one,
corrects a bspec typo (_3DPRIM_LISTSTRIP_ADJ -> LINESTRIP) and
makes a few enum values less clashy.

8 years agovk/image: Validate vkCreateImageView more
Chad Versace [Tue, 7 Jul 2015 00:04:13 +0000 (17:04 -0700)]
vk/image: Validate vkCreateImageView more

Exhaustively validate the function input.  If it's not validated and
doesn't have an anv_finishme(), then I overlooked it.

8 years agovk/image: Add more info to VkImageViewType table
Chad Versace [Mon, 6 Jul 2015 23:25:59 +0000 (16:25 -0700)]
vk/image: Add more info to VkImageViewType table

Convert the table from the direct mapping
  VkImageViewType -> SurfaceType

into a mapping to an info struct
  VkImageViewType -> struct anv_image_view_info

8 years agovk: Update VkImageViewType to 0.130.0
Chad Versace [Mon, 6 Jul 2015 22:51:46 +0000 (15:51 -0700)]
vk: Update VkImageViewType to 0.130.0

This splits 1D and 1D_ARRAY, 2D and 2D_ARRAY, CUBE and CUBE_ARRAY.

The new tokens are unused. This is just a header update.

8 years agovk/image: Move validation for vkCreateImageView
Chad Versace [Mon, 6 Jul 2015 23:24:28 +0000 (16:24 -0700)]
vk/image: Move validation for vkCreateImageView

Move the validation from anv_CreateImageView() and anv_image_view_init()
to anv_validate_CreateImageView(). No new validation is added.

8 years agovk/vulkan.h: Rename VkRect to VkRect2D
Jason Ekstrand [Tue, 7 Jul 2015 00:47:18 +0000 (17:47 -0700)]
vk/vulkan.h: Rename VkRect to VkRect2D

8 years agovk/vulkan.h: Rename count to arraySize in VkDescriptorSetLayoutBinding
Jason Ekstrand [Tue, 7 Jul 2015 00:43:58 +0000 (17:43 -0700)]
vk/vulkan.h: Rename count to arraySize in VkDescriptorSetLayoutBinding

8 years agovk/vulkan.h: Remove the Vk(Memory|Semaphor|Image)OpenInfo structs
Jason Ekstrand [Tue, 7 Jul 2015 00:37:11 +0000 (17:37 -0700)]
vk/vulkan.h: Remove the Vk(Memory|Semaphor|Image)OpenInfo structs

We already deleted the functions that need them.  The structs are just
dangling uselessly.

8 years agovk/vulkan.h: Remove VK_MEMORY_PROPERTY_PREFER_HOST_LOCAL_BIT
Jason Ekstrand [Tue, 7 Jul 2015 00:33:43 +0000 (17:33 -0700)]
vk/vulkan.h: Remove VK_MEMORY_PROPERTY_PREFER_HOST_LOCAL_BIT

We weren't doing anything with it, so this is a no-op