Commit Graph

445 Commits

Author SHA1 Message Date
Józef Kucia 0859b94833 libs/vkd3d: Implement d3d12_device_CreateConstantBufferView(). 2017-08-04 17:06:33 +02:00
Józef Kucia ef0f90c0c7 libs/vkd3d: Factor out vkd3d_create_buffer_view() function. 2017-08-02 15:30:15 +02:00
Józef Kucia de2024d235 libs/vkd3d: Do not try to create buffer views for block-compressed formats. 2017-08-02 15:30:15 +02:00
Sven Hesse 1decba1a99 libs/vkd3d: Add block size information to the texture format array. 2017-08-02 14:03:39 +02:00
Józef Kucia ab63423c80 libs/vkd3d: Factor out vkd3d_create_texture_view() function. 2017-08-01 16:56:44 +02:00
Henri Verbeet 605a02274e libs/vkd3d: Allocate GPU virtual addresses for resources.
Direct3D 12 resources, buffers in particular, are bound to the pipeline
by their GPU virtual address. In Vulkan, these addresses are not visible
to the application. We previously handled this by returning the VkBuffer
handle as virtual address, but this can't work when the application
binds anything other than the resource's base GPU VA. Instead, we
allocate ranges of GPU address space and associate resources with it.

This uses the (naive) approach of simply allocating subsequent ranges,
and never reclaiming them. Eventually we'll have to revisit that.
2017-07-27 16:28:46 +02:00
Henri Verbeet 1acd3d44b1 Implement d3d12_device_CreateQueryHeap(). 2017-07-27 16:28:29 +02:00
Józef Kucia a2e38b5672 libs/vkd3d: Set VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT only if width and height are equal. 2017-07-26 13:45:25 +02:00
Józef Kucia 5ac8dbfc64 libs/vkd3d: Implement d3d12_device_CreateUnorderedAccessView(). 2017-07-25 12:50:14 +02:00
Józef Kucia 593a13402d libs/vkd3d: Add support for static samplers.
We still do not implement any reasonable mapping between D3D registers
and Vulkan bindings.
2017-07-17 16:25:29 +02:00
Józef Kucia 733775fbad libs/vkd3d: Implement d3d12_descriptor_heap_GetGPUDescriptorHandleForHeapStart(). 2017-07-17 16:25:29 +02:00
Józef Kucia 1c79831873 libs/vkd3d: Implement d3d12_device_CreateShaderResourceView(). 2017-07-14 13:44:35 +02:00
Józef Kucia 8bb54c17f3 libs/vkd3d: Simplify d3d12_resource_destroy(). 2017-07-14 13:44:35 +02:00
Józef Kucia f3d297574a libs/vkd3d: Implement d3d12_device_CreateSampler(). 2017-07-12 13:10:44 +02:00
Józef Kucia 84889646f6 Update license to LGPL v2.1. 2017-06-16 22:11:21 +02:00
Henri Verbeet f252d6cd31 libs/vkd3d: Implement d3d12_device_CreateDepthStencilView(). 2016-11-10 16:42:24 +01:00
Józef Kucia 4aab207b56 libs/vkd3d: Fix initial state transtion for swapchain images. 2016-10-25 13:23:18 +02:00
Józef Kucia b9da47ebe2 libs/vkd3d: Implement naive initial state transition.
This is not a complete solution yet. In order to allow recording
multiple command list and executing them in any order we have to fix up
the current image layout when submitting a command list instead of when
a command list is being recorded.
2016-10-25 13:23:18 +02:00
Józef Kucia b011f0b972 libs/vkd3d: Introduce resource flags. 2016-10-25 13:23:18 +02:00
Józef Kucia eea8617b9b libs/vkd3d: GPU virtual address for texture resources is always 0. 2016-10-24 13:20:09 +02:00
Józef Kucia a5fbcb28f0 libs/vkd3d: Set initial image layout to VK_IMAGE_LAYOUT_UNDEFINED for CPU inaccessible images. 2016-10-24 13:20:09 +02:00
Józef Kucia e19e428ed0 libs/vkd3d: Check if device memory is CPU accessible in d3d12_resource_Map(). 2016-10-24 13:20:09 +02:00
Józef Kucia 3161f346b6 libs/vkd3d: Try to allocate coherent host visible memory for CUSTOM heap. 2016-10-24 13:20:09 +02:00
Józef Kucia 33ef8688ab libs/vkd3d: Initialize "resource->external" before possible call to d3d12_resource_destroy(). 2016-10-20 16:38:04 +02:00
Józef Kucia 384bb26ea5 libs/vkd3d: Naming conventions. 2016-10-20 16:38:04 +02:00
Józef Kucia 69cd100d48 libs/vkd3d: Validate initial resource state. 2016-10-19 13:10:12 +02:00
Józef Kucia f601cbc04a libs/vkd3d: Validate "optimized_clear_value" for buffer resources. 2016-10-19 13:10:12 +02:00
Henri Verbeet 2a49173b60 libs/vkd3d: Export a function to create a d3d12 resource from a Vulkan image. 2016-10-19 09:59:42 +02:00
Józef Kucia 5f187d9e68 libs/vkd3d: Improve diagnostic message for device memory allocation failures. 2016-10-17 14:24:22 +02:00
Józef Kucia 6b681a4037 libs/vkd3d: Return E_INVALIDARG in d3d12_resource_Map() for textures. 2016-10-17 14:24:22 +02:00
Józef Kucia e3fb82d544 libs/vkd3d: Forbid creating textures on UPLOAD/READBACK heaps. 2016-10-17 14:24:22 +02:00
Józef Kucia fc1c9d914d libs/vkd3d: Validate initial resource state for UPLOAD/READBACK heaps. 2016-10-17 14:24:22 +02:00
Józef Kucia a1082ec954 libs/vkd3d: Use "< 0" to test VkResult for errors.
For consistency.
2016-10-11 13:43:04 +02:00
Józef Kucia 59d466af2d libs/vkd3d: Use PRIx64 to print 64-bit integers. 2016-10-10 11:22:50 +02:00
Józef Kucia 99efb9abe3 libs/vkd3d: Get rid of vk_format_from_dxgi_format().
Use vkd3d_get_format() instead.
2016-10-08 14:31:57 +02:00
Henri Verbeet 1b8be72657 libs/vkd3d: Implement d3d12_device_CreateRenderTargetView(). 2016-09-30 13:34:17 +02:00
Henri Verbeet 3cc207c28e libs/vkd3d: Implement d3d12_descriptor_heap_GetCPUDescriptorHandleForHeapStart(). 2016-09-30 13:34:00 +02:00
Henri Verbeet 9262f87249 libs/vkd3d: Allocate CPU memory for descriptors. 2016-09-30 13:33:28 +02:00
Henri Verbeet 5f91e2ded9 libs/vkd3d: Implement d3d12_resource_GetGPUVirtualAddress(). 2016-09-28 15:05:13 +02:00
Józef Kucia 2976d7798d libs/vkd3d: Implement d3d12_resource_Unmap() for committed buffers. 2016-09-28 09:42:49 +02:00
Józef Kucia c078e79235 libs/vkd3d: Implement d3d12_resource_Map() for committed buffers. 2016-09-28 09:42:49 +02:00
Józef Kucia fc1492766e libs/vkd3d: Implement committed buffer resources. 2016-09-27 12:13:37 +02:00
Józef Kucia fec147c2cb libs/vkd3d: Implement committed texture resources. 2016-09-27 12:13:37 +02:00
Józef Kucia 13ccddd6e4 libs/vkd3d: Add ID3D12DescriptorHeap interface stub. 2016-09-26 11:22:33 +02:00
Józef Kucia 4175bec471 libs/vkd3d: Add ID3D12Resource interface stub. 2016-09-26 11:22:33 +02:00