/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
-}
\ No newline at end of file
+}
#define DALI_VULKAN_161117_GPU_MEMORY_MANAGER_H
/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
private:
- class Impl;
+ struct Impl;
std::unique_ptr<Impl> mImpl;
};
#define DALI_GRAPHICS_VULKAN_BUFFER_H
/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
private:
- class Impl;
+ struct Impl;
std::unique_ptr<Buffer::Impl> mImpl;
};
mGraphics.GetDevice().freeCommandBuffers( mOwnerCommandPool.GetPool(), mCommandBuffer );
}
-#pragma GCC diagnostic pop
/** Push wait semaphores */
void PushWaitSemaphores( const std::vector<vk::Semaphore>& semaphores,
for( auto&& imageBarrier : imageBarriers )
{
ImageRef imageResource{};
- if( imageResource = mGraphics.FindImage( imageBarrier.image ) )
+ if( (imageResource = mGraphics.FindImage( imageBarrier.image )) )
{
PushResource( imageResource );
}
#define DALI_GRAPHICS_VULKAN_COMMAND_BUFFER_H
/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
class CommandBuffer : public VkManaged
{
friend class CommandPool;
- friend class CommandBufferPool;
+ friend struct CommandBufferPool;
public:
// Constructor called by the CommandPool only
CommandBuffer( CommandPool& commandPool, uint32_t poolIndex, const vk::CommandBufferAllocateInfo& allocateInfo, vk::CommandBuffer vkCommandBuffer );
- class Impl;
+ struct Impl;
std::unique_ptr<Impl> mImpl;
};
/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
CommandBufferRef NewCommandBuffer( const vk::CommandBufferAllocateInfo& allocateInfo )
{
- vk::CommandBufferAllocateInfo info( allocateInfo );
auto& usedPool = allocateInfo.level == vk::CommandBufferLevel::ePrimary ? *mInternalPoolPrimary.get() : *mInternalPoolSecondary.get();
auto retval = usedPool.AllocateCommandBuffer( false );
return retval;
#define DALI_GRAPHICS_VULKAN_COMMANDPOOL
/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
CommandPool( Graphics& graphics, const vk::CommandPoolCreateInfo& createInfo );
- class Impl;
+ struct Impl;
std::unique_ptr<Impl> mImpl;
};
DescriptorSet( Graphics& graphics, DescriptorPool& pool, vk::DescriptorSet descriptorSet, vk::DescriptorSetAllocateInfo allocateInfo );
- class Impl;
+ struct Impl;
std::unique_ptr<Impl> mImpl;
};
DescriptorPool( Graphics& graphics, const vk::DescriptorPoolCreateInfo& createInfo );
- class Impl;
+ struct Impl;
std::unique_ptr<Impl> mImpl;
};
private:
- class Impl;
+ struct Impl;
std::unique_ptr<Impl> mImpl;
};
// return index for quick lookup
auto index = mTextures.size();
- return *reinterpret_cast<void**>(&index);
+ return reinterpret_cast<void*>(index);
}
// resources
{
Pixel() = default;
- explicit Pixel( uint32_t _color ) : color( _color )
- {
- }
-
explicit Pixel( uint8_t _r, uint8_t _g, uint8_t _b, uint8_t _a )
{
components.r = _r;
components.a = _a;
}
- union
- {
- uint32_t color;
struct
{
uint8_t r, g, b, a;
} components;
- };
/*
uint8_t& r = components.r;
} // namespace Vulkan
} // namespace Graphics
-} // namespace Dali
\ No newline at end of file
+} // namespace Dali
info.setEnabledExtensionCount(U32(extensions.size()))
.setPpEnabledExtensionNames(extensions.data())
.setEnabledLayerCount(U32(validationLayers.size()))
- //.setEnabledLayerCount(0)
+ .setEnabledLayerCount(0)
.setPpEnabledLayerNames(validationLayers.data());
mInstance = VkAssert(vk::createInstance(info, *mAllocator));
void Graphics::GetQueueFamilyProperties()
{
- mQueueFamilyProperties = std::move(mPhysicalDevice.getQueueFamilyProperties());
+ mQueueFamilyProperties = mPhysicalDevice.getQueueFamilyProperties();
}
FBID Graphics::CreateSurface(std::unique_ptr< SurfaceFactory > surfaceFactory)
#define DALI_GRAPHICS_VULKAN_IMAGE
/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
private:
- class Impl;
+ struct Impl;
std::unique_ptr<Impl> mImpl;
};
ImageView( Graphics& graphics, ImageRef image, const VkImageViewCreateInfo& createInfo );
- class Impl;
+ struct Impl;
std::unique_ptr<Impl> mImpl;
};
bool OnDestroy() override;
private:
- class Impl;
+ struct Impl;
std::unique_ptr<Impl> mImpl;
};
/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
cmdbuf->GetWaitSemaphoreStages().end());
}
}
- return std::move(retval);
+ return retval;
}
}
// queue
Queue::Queue(Graphics& graphics, vk::Queue queue, uint32_t queueFamilyIndex, uint32_t queueIndex,
vk::QueueFlags queueFlags)
-: mGraphics(graphics), mQueue(queue), mFlags(queueFlags), mQueueFamilyIndex(queueFamilyIndex), mQueueIndex(queueIndex)
+: /*mGraphics(graphics),*/ mQueue(queue), mFlags(queueFlags) /*, mQueueFamilyIndex(queueFamilyIndex), mQueueIndex(queueIndex) */
{
}
private:
- Graphics& mGraphics;
+ //Graphics& mGraphics;
vk::Queue mQueue;
vk::QueueFlags mFlags;
std::vector< vk::Fence > mFences;
- uint32_t mQueueFamilyIndex;
- uint32_t mQueueIndex;
+ //uint32_t mQueueFamilyIndex;
+ //uint32_t mQueueIndex;
};
} // namespace Vulkan
private:
- class Impl;
+ struct Impl;
std::unique_ptr<Impl> mImpl;
};
#define NotImplemented() \
{\
printf("Function %s isn't implemented!\n", __FUNCTION__);\
-assert( "Function no implemented" );\
+assert( false && "Function no implemented" );\
}
/*
#define DALI_INTERNAL_MATH_H
/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
namespace Dali
{
-class Vector2;
+struct Vector2;
class Matrix;
namespace Internal
#define DALI_INTERNAL_RENDER_TEXTURE_H
/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
void SetId( void* textureId )
{
- mId = *reinterpret_cast<GLuint*>(&textureId);
+ mId = GLuint(size_t(textureId));
}
private: