Jason Ekstrand
d4c249364d
vk/cmd_buffer: Move the re-emission of STATE_BASE_ADDRESS to the flushing code
...
This used to happen magically in cmd_buffer_new_surface_state_bo. However,
according to Ken, STATE_BASE_ADDRESS is very gen-specific so we really
shouldn't have it in the generic data-structure code.
2015-07-27 15:05:06 -07:00
Jason Ekstrand
117d74b4e2
vk/cmd_buffer: Factor the guts of CmdBufferEnd into two helpers
2015-07-27 14:52:16 -07:00
Jason Ekstrand
8fb6405718
vk/cmd_buffer: Factor the guts of (Create|Reset|Destroy)CmdBuffer into helpers
2015-07-27 14:23:56 -07:00
Jason Ekstrand
80ad578c4e
vk/private.h: Re-arrange and better comment anv_cmd_buffer
2015-07-27 12:40:43 -07:00
Jason Ekstrand
50e86b5777
vk: Actually advertise 0.138.1 at runtime
2015-07-23 10:44:27 -07:00
Jason Ekstrand
f884b500d0
vk/vulkan.h: Bump to the version 0.138.1 header
...
This doesn't actually require any implementation changes but it does change
an enum so it is ABI-incompatable with 0.138.0.
2015-07-23 10:38:22 -07:00
Jason Ekstrand
e99773badd
vk: Add two more valgrind checks
2015-07-23 08:57:54 -07:00
Jason Ekstrand
b1fcc30ff0
vk/meta: Destroy shader modules
2015-07-22 17:51:26 -07:00
Jason Ekstrand
3460e6cb2f
vk/device: Finish the scratch block pool on device destruction
2015-07-22 17:51:14 -07:00
Jason Ekstrand
867f6cb90c
vk: Add a FreeDescriptorSets function
2015-07-22 17:33:09 -07:00
Jason Ekstrand
c9dc1f4098
vk/pipeline: Be more sloppy about shader entrypoint names
...
The CTS passes in NULL names right now. It's not too hard to support that
as just "main". With this, and a patch to vulkancts, we now pass all 6
tests.
2015-07-22 15:26:56 -07:00
Chad Versace
2c2233e328
vk: Prefix most filenames with anv
...
Jason started the task by creating anv_cmd_buffer.c and anv_cmd_emit.c.
This patch finishes the task by renaming all other files except
gen*_pack.h and glsl_scraper.py.
2015-07-17 20:25:38 -07:00
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