mesa.git
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

8 years agovk/vulkan.h: Replace DEVICE_COHERENT_BIT with DEVICE_NON_COHERENT_BIT
Jason Ekstrand [Tue, 7 Jul 2015 00:32:28 +0000 (17:32 -0700)]
vk/vulkan.h: Replace DEVICE_COHERENT_BIT with DEVICE_NON_COHERENT_BIT

8 years agovk/vulkan.h: Use the query result bits from revision 130
Jason Ekstrand [Tue, 7 Jul 2015 00:27:11 +0000 (17:27 -0700)]
vk/vulkan.h: Use the query result bits from revision 130

None of the important bits or names actually changed.  It just
added/removed some no-op names.

No functional change.

8 years agovk/vulkan.h: One more quick enum refactor clean-up
Jason Ekstrand [Tue, 7 Jul 2015 00:26:29 +0000 (17:26 -0700)]
vk/vulkan.h: One more quick enum refactor clean-up

8 years agovk/vulkan.h: Get rid of VERTEX_INPUT_STEP_RATE_DRAW
Jason Ekstrand [Tue, 7 Jul 2015 00:23:46 +0000 (17:23 -0700)]
vk/vulkan.h: Get rid of VERTEX_INPUT_STEP_RATE_DRAW

We never supported it, so no functional change.

8 years agovk/vulkan.h: Remove the CLEAR_OPTIMAL image layout
Jason Ekstrand [Tue, 7 Jul 2015 00:21:19 +0000 (17:21 -0700)]
vk/vulkan.h: Remove the CLEAR_OPTIMAL image layout

8 years agovk: Rename CPU_READ/WRITE_BIT to HOST_READ/WRITE_BIT
Jason Ekstrand [Tue, 7 Jul 2015 00:18:25 +0000 (17:18 -0700)]
vk: Rename CPU_READ/WRITE_BIT to HOST_READ/WRITE_BIT

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

8 years agovk: Remove SHAREABLE bits
Jason Ekstrand [Tue, 7 Jul 2015 00:12:47 +0000 (17:12 -0700)]
vk: Remove SHAREABLE bits

They were removed from the Vulkan API and we don't really use them because
there are no multi-GPU i965 systems.

8 years agovk/vulkan.h: Re-order the logic op enums
Jason Ekstrand [Tue, 7 Jul 2015 00:08:11 +0000 (17:08 -0700)]
vk/vulkan.h: Re-order the logic op enums

8 years agovk/vulkan.h: Reformat a bunch of enums to match revision 130
Jason Ekstrand [Tue, 7 Jul 2015 00:06:02 +0000 (17:06 -0700)]
vk/vulkan.h: Reformat a bunch of enums to match revision 130

In theory, no functional change.

8 years agovk: Rename NUM_SHADER_STAGE to SHADER_STAGE_NUM
Jason Ekstrand [Mon, 6 Jul 2015 23:43:28 +0000 (16:43 -0700)]
vk: Rename NUM_SHADER_STAGE to SHADER_STAGE_NUM

This is a refactor of more than just the header but it lets us finish
reformating the shader stage enum.

8 years agovk: Reformat a bunch of enums
Jason Ekstrand [Mon, 6 Jul 2015 23:41:31 +0000 (16:41 -0700)]
vk: Reformat a bunch of enums

This accounts for a number differences between the generated headers and
the hand-written header.  Not all reformatting is done in this commit but
it does make the headers much more diffable.

In theory, no functional change.

8 years agovk: Pull the VkResult enum from revision 130
Jason Ekstrand [Mon, 6 Jul 2015 23:15:12 +0000 (16:15 -0700)]
vk: Pull the VkResult enum from revision 130

8 years agovk: re-arrange enums to match the order in revision 130
Jason Ekstrand [Mon, 6 Jul 2015 23:11:05 +0000 (16:11 -0700)]
vk: re-arrange enums to match the order in revision 130

8 years agovk: Rename a parameter in CmdBindDynamicStateObject
Jason Ekstrand [Mon, 6 Jul 2015 22:37:17 +0000 (15:37 -0700)]
vk: Rename a parameter in CmdBindDynamicStateObject

8 years agovk: Remove multi-device stuff
Jason Ekstrand [Mon, 6 Jul 2015 22:34:55 +0000 (15:34 -0700)]
vk: Remove multi-device stuff

8 years agovk: Remove ClearDescriptorSets
Jason Ekstrand [Mon, 6 Jul 2015 22:32:40 +0000 (15:32 -0700)]
vk: Remove ClearDescriptorSets

8 years agovk: Remove begin/end descriptor pool update
Jason Ekstrand [Mon, 6 Jul 2015 22:32:27 +0000 (15:32 -0700)]
vk: Remove begin/end descriptor pool update

8 years agovk: Remove stub for CloneImageData
Jason Ekstrand [Mon, 6 Jul 2015 22:30:05 +0000 (15:30 -0700)]
vk: Remove stub for CloneImageData

8 years agovk: Remove the stub support for memory priorities
Jason Ekstrand [Mon, 6 Jul 2015 22:28:10 +0000 (15:28 -0700)]
vk: Remove the stub support for memory priorities

8 years agovk: Remove the stub support for explicit memory references
Jason Ekstrand [Mon, 6 Jul 2015 22:27:58 +0000 (15:27 -0700)]
vk: Remove the stub support for explicit memory references

8 years agovk/vulkan.h: Reformat structs to match revision 130
Jason Ekstrand [Mon, 6 Jul 2015 22:19:04 +0000 (15:19 -0700)]
vk/vulkan.h: Reformat structs to match revision 130

Structs in the old version were specified as

typedef struct VkSomeThing_
{
   type                                        field; // comment
} VkSomeThing;

However, in the generated headers, you have

typedef struct {
   type                                        field;
} VkSomeThing;

This commit also removes some unneeded whitespaces.

8 years agovk/vulkah.h: Re-arrange structures to match the order in 130
Jason Ekstrand [Mon, 6 Jul 2015 22:09:21 +0000 (15:09 -0700)]
vk/vulkah.h: Re-arrange structures to match the order in 130

8 years agonir/spirv: fix some bugs
Connor Abbott [Mon, 6 Jul 2015 21:58:55 +0000 (14:58 -0700)]
nir/spirv: fix some bugs

8 years agonir/spirv: add support for builtins inside structures
Connor Abbott [Sat, 4 Jul 2015 22:53:47 +0000 (15:53 -0700)]
nir/spirv: add support for builtins inside structures

We may be able to revert this depending on the outcome of bug 14190, but
for now it gets vertex shaders working with SPIR-V.

8 years agonir/spirv: fix a bug with structure creation
Connor Abbott [Sat, 4 Jul 2015 22:51:24 +0000 (15:51 -0700)]
nir/spirv: fix a bug with structure creation

We were creating 2 extra bogus fields.

8 years agonir/spirv: fix a bad assertion in the decoration handling
Connor Abbott [Sat, 4 Jul 2015 22:46:58 +0000 (15:46 -0700)]
nir/spirv: fix a bad assertion in the decoration handling

We should be asserting that the parent decoration didn't hand us
a member if the child decoration did, but different child decorations
may obviously have different members.

8 years agonir/spirv: pull out logic for getting builtin locations
Connor Abbott [Sat, 4 Jul 2015 17:49:12 +0000 (10:49 -0700)]
nir/spirv: pull out logic for getting builtin locations

Also add support for more builtins.

8 years agonir/spirv: plumb through the type of dereferences
Connor Abbott [Thu, 2 Jul 2015 22:49:08 +0000 (15:49 -0700)]
nir/spirv: plumb through the type of dereferences

We need this to know if a deref is of a builtin.

8 years agonir/spirv: handle structure member builtin decorations
Connor Abbott [Thu, 2 Jul 2015 22:22:27 +0000 (15:22 -0700)]
nir/spirv: handle structure member builtin decorations

8 years agonir/spirv: add a vtn_type struct
Connor Abbott [Thu, 2 Jul 2015 21:24:12 +0000 (14:24 -0700)]
nir/spirv: add a vtn_type struct

This will handle decorations that aren't in the glsl_type.

8 years agonir/spirv: move 'type' into the union
Connor Abbott [Thu, 2 Jul 2015 19:55:25 +0000 (12:55 -0700)]
nir/spirv: move 'type' into the union

Since SSA values now have their own types, it's more convenient to make
'type' only used when we want to look up an actual SPIR-V type, since
we're going to change its type soon to support various decorations that
are handled at the SPIR-V -> NIR level.

8 years agovk: Move CreateFramebuffer and CreateRenderPass higher in the header
Jason Ekstrand [Mon, 6 Jul 2015 21:41:41 +0000 (14:41 -0700)]
vk: Move CreateFramebuffer and CreateRenderPass higher in the header

This matches where they are in the 130 header.

8 years agovk: Remove atomic counters stubs
Jason Ekstrand [Mon, 6 Jul 2015 21:38:45 +0000 (14:38 -0700)]
vk: Remove atomic counters stubs

8 years agovk: Make vulkan.h look more like vulkan-130.h
Jason Ekstrand [Mon, 6 Jul 2015 21:30:31 +0000 (14:30 -0700)]
vk: Make vulkan.h look more like vulkan-130.h

Most of these changes are insubstantial.  The only potentially substantial
cyhange is that we added a few new #defines for API maximums.

8 years agovk: Add a revision 130 header along-side the current header
Jason Ekstrand [Mon, 6 Jul 2015 21:16:51 +0000 (14:16 -0700)]
vk: Add a revision 130 header along-side the current header

8 years agovk/meta: Add an initial implementation of ClearColorImage
Jason Ekstrand [Fri, 3 Jul 2015 01:15:06 +0000 (18:15 -0700)]
vk/meta: Add an initial implementation of ClearColorImage

8 years agovk/meta: Factor the guts out of cmd_buffer_clear
Jason Ekstrand [Fri, 3 Jul 2015 00:10:37 +0000 (17:10 -0700)]
vk/meta: Factor the guts out of cmd_buffer_clear

9 years agovk: Roll back to API v90
Jason Ekstrand [Wed, 1 Jul 2015 23:44:10 +0000 (16:44 -0700)]
vk: Roll back to API v90

This is what version 0.1 of the Vulkan SDK is built against.

9 years agonir/spirv: Add initial structure member decoration support
Jason Ekstrand [Wed, 1 Jul 2015 22:38:26 +0000 (15:38 -0700)]
nir/spirv: Add initial structure member decoration support

9 years agonir/spirv: Make vtn_handle_type match the other handler functions
Jason Ekstrand [Wed, 1 Jul 2015 22:34:08 +0000 (15:34 -0700)]
nir/spirv: Make vtn_handle_type match the other handler functions

Previously, the caller of vtn_handle_type had to handle actually inserting
the type.  However, this didn't really work if the type was decorated in
any way.

9 years agonir/spirv: Add basic support for Op[Group]MemberDecorate
Jason Ekstrand [Wed, 1 Jul 2015 21:17:24 +0000 (14:17 -0700)]
nir/spirv: Add basic support for Op[Group]MemberDecorate

9 years agovk/x11: Allow for the client querying the size of the format properties
Jason Ekstrand [Wed, 1 Jul 2015 21:17:52 +0000 (14:17 -0700)]
vk/x11: Allow for the client querying the size of the format properties

9 years agovk/formats: Fix entry for S8_UINT
Chad Versace [Tue, 30 Jun 2015 16:41:06 +0000 (09:41 -0700)]
vk/formats: Fix entry for S8_UINT

I forgot to update this when fixing the depth formats.

9 years agovk/formats: Document new meaning of anv_format::cpp
Chad Versace [Tue, 30 Jun 2015 16:20:07 +0000 (09:20 -0700)]
vk/formats: Document new meaning of anv_format::cpp

The way the code currently works is that anv_format::cpp is the cpp of
anv_format::surface_format.

Me and Kristian disagree about how the code *should* work. Despite that,
I think it's in our discussion's best interest to document how the code
*currently* works. That should eliminate confusion.

If and when the code begins to work differently, then we'll update the
anv_format comments.

9 years agovk/depth: Add a FIXME
Chad Versace [Sat, 27 Jun 2015 05:15:03 +0000 (22:15 -0700)]
vk/depth: Add a FIXME

3DSTATE_DEPTH_BUFFER.Width,Height are wrong.

9 years agovk/image: Enable 2d single-sample color miptrees
Chad Versace [Sat, 27 Jun 2015 04:27:54 +0000 (21:27 -0700)]
vk/image: Enable 2d single-sample color miptrees

What's been tested, for both image views and color attachment views:

    - VK_FORMAT_R8G8B8A8_UNORM
    - VK_IMAGE_VIEW_TYPE_2D
    - mipLevels: 1, 2
    - baseMipLevel: 0, 1
    - arraySize: 1, 2
    - baseArraySlice: 0, 1

What's known to be broken:

    - Depth and stencil miptrees. To fix this, anv_depth_stencil_view
      needs major rework.
    - VkImageViewType != 2D
    - MSAA

Fixes Crucible tests:

  func.miptree.view-2d.levels02.array01.*
  func.miptree.view-2d.levels01.array02.*
  func.miptree.view-2d.levels02.array02.*

9 years agovk/image: Define anv_surface, refactor anv_image
Chad Versace [Sat, 27 Jun 2015 01:48:34 +0000 (18:48 -0700)]
vk/image: Define anv_surface, refactor anv_image

This prepares for upcoming miptree support.

anv_surface is a proxy for color surfaces, depth surfaces, and stencil
surfaces.  Embed two instances of anv_surface into anv_image: the
primary surface (color or depth), and an optional stencil surface.

9 years agovk/image: Reformat function signatures
Chad Versace [Sat, 27 Jun 2015 03:12:42 +0000 (20:12 -0700)]
vk/image: Reformat function signatures

Reformat them to match Mesa code-style.

9 years agovk/image: Embed VkImageCreateInfo* into anv_image_create_info
Chad Versace [Sat, 27 Jun 2015 03:06:08 +0000 (20:06 -0700)]
vk/image: Embed VkImageCreateInfo* into anv_image_create_info

All function signatures that matched this pattern,
  old: f(const VkImageCreateInfo *, const struct anv_image_create_info *)

were rewritten as
  new: f(const struct anv_image_create_info *)

9 years agovk/image: Drop some tmp vars in anv_image_view_init()
Chad Versace [Sat, 27 Jun 2015 02:50:04 +0000 (19:50 -0700)]
vk/image: Drop some tmp vars in anv_image_view_init()

Variables 'tile_mode' and 'format' are unneeded.

9 years agovk/image: Abort on stencil image views
Chad Versace [Sat, 27 Jun 2015 02:23:21 +0000 (19:23 -0700)]
vk/image: Abort on stencil image views

The code doesn't work. Not even close.

Replace the broken code with a FINISHME and abort.

9 years agovk: Reindent struct anv_image
Chad Versace [Fri, 26 Jun 2015 22:27:20 +0000 (15:27 -0700)]
vk: Reindent struct anv_image