Chad Versace
f70d079854
vk/image: Remove unneeded data from anv_buffer_view
...
This completes the FINISHME to trim unneeded data from anv_buffer_view.
A VkExtent3D doesn't make sense for a VkBufferView.
So remove the member anv_surface_view::extent, and push it up to the two
objects that actually need it, anv_image_view and anv_attachment_view.
2015-07-17 14:48:23 -07:00
Chad Versace
194b77d426
vk: Document members of anv_surface_view
2015-07-17 14:39:05 -07:00
Chad Versace
169251bff0
vk: Remove more raw casts
...
This removes nearly all the remaining raw Anvil<->Vulkan casts from the
C source files. (File compiler.cpp still contains many raw casts, and
I plan on ignoring that).
As far as I can tell, the only remaining raw casts are:
anv_attachment_view -> anv_depth_stencil_view
anv_attachment_view -> anv_color_attachment_view
2015-07-17 14:32:22 -07:00
Chad Versace
fc3838376b
vk/image: Add braces around multi-line ifs
2015-07-17 13:38:09 -07:00
Connor Abbott
b2cfd85060
nir/spirv: don't declare builtin blocks
...
They aren't used, and the backend was barfing on them. Also, remove a
hack in in compiler.cpp now that they're gone.
2015-07-16 11:04:22 -07:00
Connor Abbott
b599735be4
nir/spirv: add support for loading UBO's
...
We directly emit ubo load intrinsics based off of the offset information
handed to us from SPIR-V.
2015-07-16 10:54:09 -07:00
Connor Abbott
513ee7fa48
nir/types: add more nir_type_is_xxx() wrappers
2015-07-15 21:58:32 -07:00
Connor Abbott
9fa0989ff2
nir: move to two-level binding model for UBO's
...
The GLSL layer above is still hacky, so we're really just moving the
hack into GLSL-to-NIR. I'd rather not go all the way and make GLSL
support the Vulkan binding model too, since presumably we'll be
switching to SPIR-V exclusively, and so working on proper GLSL support
will be a waste of time. For now, doing this keeps it working as we add
SPIR-V->NIR support though.
2015-07-15 17:18:48 -07:00
Chad Versace
5520221118
vk: Remove unneeded vulkan-138.h
2015-07-15 17:16:07 -07:00
Chad Versace
73a8f9543a
vk: Bump vulkan.h version to 0.138
2015-07-15 17:16:07 -07:00
Chad Versace
55781f8d02
vk/0.138: Update VkResult values
2015-07-15 17:16:07 -07:00
Chad Versace
756d8064c1
vk/0.132: Do type-safety
2015-07-15 17:16:07 -07:00
Jason Ekstrand
927f54de68
vk/cmd_buffer: Move batch buffer padding to anv_batch_bo_finish()
2015-07-15 17:11:04 -07:00
Jason Ekstrand
9c0db9d349
vk/cmd_buffer: Rename bo_count to exec2_bo_count
2015-07-15 16:56:29 -07:00
Jason Ekstrand
6037b5d610
vk/cmd_buffer: Add a helper for allocating dynamic state
...
This matches what we do for surface state and makes the dynamic state pool
more opaque to things that need to get dynamic state.
2015-07-15 16:56:29 -07:00
Jason Ekstrand
7ccc8dd24a
vk/private.h: Move cmd_buffer functions to near the cmd_buffer struct
2015-07-15 16:56:29 -07:00
Jason Ekstrand
d22d5f25fc
vk: Split command buffer state into its own structure
...
Everything else in anv_cmd_buffer is the actual guts of the datastructure.
2015-07-15 16:56:29 -07:00
Jason Ekstrand
da4d9f6c7c
vk: Move most of the anv_Cmd related stuff to its own file
2015-07-15 16:56:28 -07:00
Jason Ekstrand
d862099198
vk: Pull the guts of anv_cmd_buffer into its own file
2015-07-15 16:56:28 -07:00
Chad Versace
498ae009d3
vk/glsl: Replace raw casts
...
Needed for upcoming type-safety changes.
2015-07-15 15:51:37 -07:00
Chad Versace
6f140e8af1
vk/meta: Remove raw casts
...
Needed for upcoming type-safety changes.
2015-07-15 15:51:37 -07:00
Chad Versace
badbf0c94a
vk/x11: Remove raw casts
...
The raw casts in the WSI functions will break the build when the
type-safety changes arrive.
2015-07-15 15:49:10 -07:00
Chad Versace
61a4bfe253
vk: Delete vkDbgSetObjectTag()
...
Because VkObject is going away.
2015-07-15 15:34:20 -07:00
Jason Ekstrand
e1c78ebe53
vk/device: Remove unneeded checks for NULL
2015-07-15 15:22:32 -07:00
Jason Ekstrand
f4748bff59
vk/device: Provide proper NULL handling in anv_device_free
...
The Vulkan spec does not specify that the free function provided to
CreateInstance must handle NULL properly so we do it in the wrapper. If
this ever changes in the spec, we can delete the extra 2 lines.
2015-07-15 15:22:32 -07:00
Chad Versace
4c8e1e5888
vk: Stop internally calling anv_DestroyObject()
...
Replace each anv_DestroyObject() with anv_DestroyFoo().
Let vkDestroyObject() live for a while longer for Crucible's sake.
2015-07-15 15:11:16 -07:00
Chad Versace
f5ad06eb78
vk: Fix vkDestroyObject dispatch for VkRenderPass
...
It called anv_device_free() instead of anv_DestroyRenderPass().
2015-07-15 15:07:41 -07:00
Chad Versace
188f2328de
vk: Fix vkCreate/DestroyRenderPass
...
While updating vkDestroyObject, I discovered that vkDestroyPass reliably
crashes. That hasn't been an issue yet, though, because it is never
called.
In vkCreateRenderPass:
- Don't allocate empty attachment arrays.
- Ensure that pointers to empty attachment arrays are NULL.
- Store VkRenderPassCreateInfo::subpassCount as
anv_render_pass::subpass_count.
In vkDestroyRenderPass:
- Fix loop bounds: s/attachment_count/subpass_count/
- Don't call anv_device_free on null pointers.
2015-07-15 15:07:41 -07:00
Chad Versace
c6270e8044
vk: Refactor create/destroy code for anv_descriptor_set
...
Define two new functions:
anv_descriptor_set_create
anv_descriptor_set_destroy
2015-07-15 14:31:22 -07:00
Chad Versace
365d80a91e
vk: Replace some raw casts with safe casts
...
That is, replace some instances of
(VkFoo) foo
with
anv_foo_to_handle(foo)
2015-07-15 14:00:21 -07:00
Chad Versace
7529e7ce86
vk: Correct anv_CreateShaderModule's prototype
...
s/VkShader/VkShaderModule/
:sigh: I look forward to type-safety.
2015-07-15 13:59:47 -07:00
Chad Versace
8213be790e
vk: Define struct anv_image_view, anv_buffer_view
...
Follow the pattern of anv_attachment_view. We need these structs to
implement the type-safety that arrived in the 0.132 header.
2015-07-15 12:19:29 -07:00
Chad Versace
43241a24bc
vk/meta: Fix declared type of a shader module
...
s/VkShader/VkShaderModule/
I'm looking forward to a type-safe vulkan.h ;)
2015-07-15 11:49:37 -07:00
Chad Versace
94e473c993
vk: Remove struct anv_object
...
Trivial removal because vkDestroyObject() no longer uses it.
2015-07-15 11:29:43 -07:00
Jason Ekstrand
e375f722a6
vk/device: More documentation on surface state flushing
2015-07-15 11:09:02 -07:00
Connor Abbott
9aabe69028
vk/device: explain why a flush is necessary
...
Jason found this from experimenting, but the docs give a reasonable
explanation of why it's necessary.
2015-07-14 23:03:19 -07:00
Chad Versace
5f46c4608f
vk: Fix indentation of anv_dynamic_cb_state
2015-07-14 18:19:10 -07:00
Chad Versace
0eeba6b80c
vk: Add finishmes for VkDescriptorPool
...
VkDescriptorPool is a stub object. As a consequence, it's impossible to
free descriptor set memory.
2015-07-14 18:19:00 -07:00
Jason Ekstrand
2b5a4dc5f3
vk: Add vulkan-138 and remove vulkan-0.132
...
Now, 138 is the target and not 132. Once object destruction is finished,
we can delete 138 as it will be identical to vulkan.h
2015-07-14 17:54:13 -07:00
Jason Ekstrand
1f658bed70
vk/device: Add stub support for command pools
...
Real support isn't really that far away. We just need a data structure
with a linked list and a few tests.
2015-07-14 17:40:00 -07:00
Jason Ekstrand
ca7243b54e
vk/vulkan.h: Add the stuff for cross-queue resource sharing
...
We only have one queue, so this is currently a no-op on our implementation.
2015-07-14 17:20:50 -07:00
Jason Ekstrand
553b4434ca
vk/vulkan.h: Add a couple of size fields for specialization constants
2015-07-14 17:12:39 -07:00
Jason Ekstrand
e5db209d54
vk/vulkan.h: Move around buffer image granularities
2015-07-14 17:10:37 -07:00
Jason Ekstrand
c7fcfebd5b
vk: Add stubs for all the sparse resource stuff
2015-07-14 17:06:11 -07:00
Jason Ekstrand
2a9136feb4
vk/image: Add a stub for the new ImageFormatProperties function
...
This lets the client query about things like multisample. We don't do
multisample right now, so I'll let Chad deal with that when he gets to it.
2015-07-14 17:05:30 -07:00
Jason Ekstrand
2c4dc92f40
vk/vulkan.h: Rename FormatInfo to FormatProperties
2015-07-14 17:04:46 -07:00
Jason Ekstrand
d7f44852be
vk/vulkan.h: Re-order some #define's
2015-07-14 16:41:39 -07:00
Jason Ekstrand
1fd3bc818a
vk/vulkan.h: Rename a function parameter
2015-07-14 16:39:01 -07:00
Jason Ekstrand
2e2f48f840
vk: Remove abreviations
2015-07-14 16:34:31 -07:00
Jason Ekstrand
02db21ae11
vk: Add the new extension/layer enumeration entrypoints
2015-07-14 16:11:21 -07:00