Merge branch 'master' into vk_vfetch

This commit is contained in:
DrChat
2018-02-18 17:02:59 -06:00
37 changed files with 8433 additions and 2053 deletions

View File

@@ -42,7 +42,7 @@ CircularBuffer::CircularBuffer(VulkanDevice* device, VkBufferUsageFlags usage,
VkMemoryRequirements reqs;
vkGetBufferMemoryRequirements(*device_, gpu_buffer_, &reqs);
alignment_ = reqs.alignment;
alignment_ = xe::round_up(alignment, reqs.alignment);
}
CircularBuffer::~CircularBuffer() { Shutdown(); }

View File

@@ -102,6 +102,7 @@ bool VulkanDevice::Initialize(DeviceInfo device_info) {
ENABLE_AND_EXPECT(shaderCullDistance);
ENABLE_AND_EXPECT(shaderStorageImageExtendedFormats);
ENABLE_AND_EXPECT(shaderTessellationAndGeometryPointSize);
ENABLE_AND_EXPECT(samplerAnisotropy);
ENABLE_AND_EXPECT(geometryShader);
ENABLE_AND_EXPECT(depthClamp);
ENABLE_AND_EXPECT(multiViewport);

View File

@@ -26,10 +26,14 @@ namespace ui {
namespace vulkan {
#define VK_SAFE_DESTROY(fn, dev, obj, alloc) \
if (obj) { \
fn(dev, obj, alloc); \
obj = nullptr; \
}
\
do { \
if (obj) { \
fn(dev, obj, alloc); \
obj = nullptr; \
} \
\
} while (0)
class Fence {
public: