Chad Versace
f43a304dc6
vk/0.130: Update vkAllocMemory to use VkMemoryType
2015-07-10 17:35:52 -07:00
Chad Versace
df2a013881
vk/0.130: Implement vkGetPhysicalDeviceMemoryProperties()
2015-07-10 17:35:52 -07:00
Chad Versace
c7f512721c
vk/gem: Change signature of anv_gem_get_aperture()
...
Replace the anv_device parameter with anv_physical_device, because this needs
querying before vkCreateDevice.
2015-07-10 17:35:52 -07:00
Chad Versace
8cda3e9b1b
vk/device: Add member anv_physical_device::fd
...
During anv_physical_device_init(), we opend the DRM device to do some
queries, then promptly closed it. Now we keep it open for the lifetime
of the anv_physical_device so that we can query it some more during
vkGetPhysicalDevice*Properties() [which will happen in follow-up
commits].
2015-07-10 17:35:52 -07:00
Chad Versace
4422bd4cf6
vk/device: Add func anv_physical_device_finish()
...
Because in a follow-up patch I need to do some non-trival teardown on
anv_physical_device. Currently, however, anv_physical_device_finish() is
currently a no-op that's just called in the right place.
Also, rename function fill_physical_device -> anv_physical_device_init
for symmetry.
2015-07-10 17:35:52 -07:00
Jason Ekstrand
7552e026da
vk/device: Add an explicit destructor for RenderPass
2015-07-10 12:33:04 -07:00
Jason Ekstrand
8b342b39a3
vk/image: Add an explicit DestroyImage function
2015-07-10 12:30:58 -07:00
Jason Ekstrand
b94b8dfad5
vk/image: Add explicit constructors for buffer/image view types
2015-07-10 12:26:31 -07:00
Jason Ekstrand
18340883e3
nir: Add C++ versions of NIR_(SRC|DEST)_INIT
2015-07-10 11:57:33 -07:00
Chad Versace
9e64a2a8e4
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 75784243df )
2015-07-10 11:24:25 -07:00
Jason Ekstrand
19f0a9b582
vk/query.c: Use the casting functions
2015-07-09 20:32:44 -07:00
Jason Ekstrand
6eb221c884
vk/pipeline.c: Use the casting functions
2015-07-09 20:28:08 -07:00
Jason Ekstrand
fb4e2195ec
vk/formats.c: Use the casting functions
2015-07-09 20:24:17 -07:00
Jason Ekstrand
a52e208203
vk/image.c: Use the casting functions
2015-07-09 20:24:07 -07:00
Jason Ekstrand
b1de1d4f6e
vk/device.c: One more use of a casting function
2015-07-09 20:23:46 -07:00
Jason Ekstrand
8739e8fbe2
vk/meta.c: Use the casting functions
2015-07-09 20:16:13 -07:00
Jason Ekstrand
92556c77f4
vk: Fix the build
2015-07-09 18:59:08 -07:00
Jason Ekstrand
098209eedf
device.c: Use the cast helpers a bunch of places
2015-07-09 18:49:43 -07:00
Jason Ekstrand
73f9187e33
device.c: Use the cast helpers
2015-07-09 18:41:27 -07:00
Jason Ekstrand
7d24fab4ef
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.
2015-07-09 18:40:54 -07:00
Jason Ekstrand
5c49730164
vk/device.c: Fix whitespace issues
2015-07-09 18:20:28 -07:00
Jason Ekstrand
c95f9b61f2
vk/device.c: Use ANV_FROM_HANDLE a bunch of places
2015-07-09 18:20:10 -07:00
Jason Ekstrand
335e88c8ee
vk/vulkan.h: Add the pEnabledFeatures field to DeviceCreateInfo
2015-07-09 16:21:31 -07:00
Jason Ekstrand
34871cf7f3
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.
2015-07-09 16:19:54 -07:00
Jason Ekstrand
8c2c37fae7
vk: Remove the old GetPhysicalDeviceInfo call
2015-07-09 16:14:37 -07:00
Jason Ekstrand
1f907011a3
vk: Add the new PhysicalDeviceQueue queries
2015-07-09 16:14:37 -07:00
Jason Ekstrand
977a469bce
vk: Support GetPhysicalDeviceProperties
2015-07-09 16:14:37 -07:00
Jason Ekstrand
65e0b304b6
vk: Add support for GetPhysicalDeviceLimits
2015-07-09 16:14:37 -07:00
Jason Ekstrand
f6d51f3fd3
vk: Add GetPhysicalDeviceFeatures
2015-07-09 16:14:37 -07:00
Chad Versace
5b75dffd04
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.
2015-07-09 15:53:21 -07:00
Chad Versace
fa915b661d
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().
2015-07-09 15:41:17 -07:00
Chad Versace
c34d314db3
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.
2015-07-09 15:27:26 -07:00
Connor Abbott
cff06bbe7d
vk/compiler: create an empty parameters list
...
Prevents problems when initializing the sanity_param_count.
2015-07-09 14:29:23 -04:00
Connor Abbott
3318a86d12
nir/spirv: fix wrong writemask for ALU operations
2015-07-09 14:28:39 -04:00
Connor Abbott
b8fedc19f5
nir/spirv: fix memory context for builtin variable
...
Fixes valgrind errors with func.depthstencil.basic.
2015-07-08 22:03:30 -04:00
Connor Abbott
e4292ac039
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.
2015-07-08 22:03:30 -04:00
Connor Abbott
997831868f
vk/compiler: create the right kind of program struct
...
This fixes Valgrind errors and gets all the tests to pass with
--use-spir-v.
2015-07-08 22:03:30 -04:00
Connor Abbott
a841e2c747
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.
2015-07-08 22:03:30 -04:00
Jason Ekstrand
8640dc12dc
vk/vulkan.h: Copy the VkStructureType enum from version 130
...
We now have the exact same structs which require pType.
2015-07-08 17:45:52 -07:00
Jason Ekstrand
5a4ebf6bc1
vk: Move to the new pipeline creation API's
2015-07-08 17:30:18 -07:00
Chad Versace
4fcb32a17d
vk/0.130: Remove VkImageViewCreateInfo::minLod
...
It's now set solely through VkSampler.
2015-07-08 14:48:22 -07:00
Jason Ekstrand
367b9ba78f
vk/vulkan.h: Move renderPassContinue from GraphicsBeginInfo to BeginInfo
2015-07-08 14:37:30 -07:00
Jason Ekstrand
d29ec8fa36
vk/vulkan.h: Update to the new UpdateDescriptorSets api
2015-07-08 14:24:56 -07:00
Jason Ekstrand
c8577b5f52
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.
2015-07-08 14:24:14 -07:00
Chad Versace
ccb27a002c
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.
2015-07-08 12:53:49 -07:00
Chad Versace
8985dd15a1
vk/0.130: Remove VkDescriptorUpdateMode
...
Nowhere used.
2015-07-08 12:51:46 -07:00
Chad Versace
e02dfa309a
vk/0.130: Remove VK_DEVICE_CREATE_MULTI_DEVICE_IQ_MATCH_BIT
2015-07-08 12:49:48 -07:00
Chad Versace
e9034ed875
vk/0.130: Update vkCmdBlitImage signature
...
Add VkTexFilter param. Ignored for now.
2015-07-08 12:47:48 -07:00
Jason Ekstrand
aae45ab583
vk/vulkan.h: Add packing parameters to BufferImageCopy
2015-07-08 11:51:34 -07:00
Chad Versace
b4ef7f354b
vk/0.130: Remove msaa members of VkDepthStencilViewCreateInfo
2015-07-08 11:50:51 -07:00