platform/core/uifw/dali-core.git
5 years agoFixed perspective projection issues. devel/vulkan
Angelos Gkountis [Wed, 13 Jun 2018 15:03:35 +0000 (16:03 +0100)]
Fixed perspective projection issues.

> Changed the projection correction matrix to correctly negate the Z axis to match DALi's coordinate system.
> Changed the front face winding order to match the Z axis inversion.

Change-Id: I8dfe7efa35e96ea9465085429b6b40f34781c259

5 years ago[Vulkan] Removed shaders and shader generation code
David Steele [Wed, 13 Jun 2018 10:46:54 +0000 (11:46 +0100)]
[Vulkan] Removed shaders and shader generation code

(Moved to toolkit)

Change-Id: Ie799064b4742a3fefceddda721fac367f748c130
Signed-off-by: David Steele <david.steele@samsung.com>
5 years ago[Vulkan] Fixed setting mat3 uniforms
adam.b [Fri, 8 Jun 2018 18:03:42 +0000 (19:03 +0100)]
[Vulkan] Fixed setting mat3 uniforms

- Matrix column stride taken in account
- todo: use reflection in order to obtain stride value

Change-Id: I7f35006cb13561d8054a7ae66d0868042be3c959

# Conflicts:
# dali/internal/update/graphics/graphics-algorithms.cpp
# dali/internal/update/rendering/scene-graph-renderer.cpp

5 years ago[Vulkan] Pipelines created in the render algorithms
adam.b [Wed, 6 Jun 2018 16:06:43 +0000 (17:06 +0100)]
[Vulkan] Pipelines created in the render algorithms

- blending modes
- depth modes
- clear color from rendertask/instruction
- render pass changes whenever new render target is bound

Change-Id: I6a97d5db5a408fc5ac343fe8a6637c5308e6ecbe

5 years ago[Vulkan] Added Pipeline object to the API.
adam.b [Tue, 5 Jun 2018 12:06:00 +0000 (13:06 +0100)]
[Vulkan] Added Pipeline object to the API.

- Added Pipeline object to the graphics API
- Decoupling of pipeline state and resources
- Supporting more complex blending
- Depth test support
- Supporting viewport, topology etc.
- Added internal graphics API pipeline cache

Change-Id: I0bee6e3710379f777f75439423476fa72f0709cc
Signed-off-by: David Steele <david.steele@samsung.com>
5 years agoFixed application crashes/stalls during teardown
Angelos Gkountis [Tue, 12 Jun 2018 14:08:45 +0000 (15:08 +0100)]
Fixed application crashes/stalls during teardown

- Fixed the program shutdown crashes by destroying the graphics resources in the correct order.
> Current status: Not all object references are released during shutdown. This leads to many validation errors when destroying the logical device.
> This is caused due to higher level code in DALi still holding references to internal graphics resources.

- Removed an unused CommandPool handle from the Vulkan API controller.

- Added a missing nullptr check to the GC method of the GpuMemoryDefaultAllocator that was leading to crashes due to double frees.

- The OnDestroy method of all Vulkan reference counted objects no longer calls the ResourceCache's Remove* methods if invoked during program teardown.

- Added debug prints for the deleter functions of all Vulkan reference counted objects. Only works in debug builds.

- Fixed a bug where the CommandPool class would destroy the Vulkan handle in its destructor. It now correctly enqueues a deleter function in the discard queue.

- Removed the PIMPL pattern from the DescriptorPool class.

- Removed the PIMPL pattern from the DescriptoSet class.

- Added a boolean flag to the Graphics class that indicates when the program is executing teardown.

- Removed #pragmas from the Pipeline class.

- Implemented a debug method in the ResourceCache class that dumps a report about the objects stored in the cache (object lists, object counts, reference counts).

- The Shader class now correctly enqueues a deleter function to the discard queue when the OnDestroy method is invoked.

Change-Id: Iaba952b3d277f12c000ab8c00efa3b851c6b612c

5 years agoRefactored the Vulkan::CommandPool class
Angelos Gkountis [Fri, 8 Jun 2018 10:35:14 +0000 (11:35 +0100)]
Refactored the Vulkan::CommandPool class

- Removed the PIMPL pattern from the Vulkan::CommandPool class.
- Fences are again a transient resource. The Graphics class will not maintain references to them. The code that requires fences to stay alive should hold references to them.
- The fences are still deallocated by the device at the end of the frame.
- Fixed a bug with enqueueing deleter functions for garbage collection. The deleter functions now capture copies of the Vulkan handles and any other required pointers instead if the "this" pointer which is not valid at the time of garbage collection.

Change-Id: I93b6a97e83632faebf557c8a9c439547f00ef1a8

5 years agoChanged the CommandPool's allocation strategy
Angelos Gkountis [Thu, 7 Jun 2018 13:52:42 +0000 (14:52 +0100)]
Changed the CommandPool's allocation strategy

- The command pool no longer resizes by a fixed amount.
- Instead it just doubles its current capacity when more buffers are needed.
- This significantly reduces the memory footprint especialy for command pools where only a small number of command buffers are actually used.

Change-Id: I5b40dbae20182b884e4e9574d159ea7e30416dbb

5 years agoChanged the command pool management
Angelos Gkountis [Wed, 6 Jun 2018 16:53:56 +0000 (17:53 +0100)]
Changed the command pool management

> The Vulkan::Graphics class manages all command pools.
> Creation of command pools is no longer exposed.
> Command pools are lazily created when command buffer creation is required and are stored in a map using the calling thread's ID as the key.
> All the command pools allocated by the Vulkan::Graphics class are using the eResetCommanBuffer flag to allow for explicit command buffer resetting.

Change-Id: I92a275cf591b3a85c98d596f977b9ec4ef4211c6

5 years agoDali demo now works with the new grapics design
Angelos Gkountis [Wed, 6 Jun 2018 13:10:33 +0000 (14:10 +0100)]
Dali demo now works with the new grapics design

> The Graphics api controller now accumulates all the secondary command buffers created by the SubmitCommands method.
> The accumulated secondary command buffers are only submitted at the end of the frame.
> This is needed because command buffers no longer reference the resources they use.
> Removed the call to QueueWaitIdle at the Present method of the swapchain. This call is not needed because synchronization is handled by a fence.

Change-Id: I010dfc848e009824eccaf9212a58a21c1b642d3d

5 years agoAttempt to make dali-demo work
Angelos Gkountis [Tue, 5 Jun 2018 10:49:57 +0000 (11:49 +0100)]
Attempt to make dali-demo work

Change-Id: I9c03f3f3c55bf20895b4282ce69f0dd76b77d218

5 years agoRefactored the Vulkan::Queue and Vulkan::CommandBuffer classes
Angelos Gkountis [Mon, 4 Jun 2018 10:24:21 +0000 (11:24 +0100)]
Refactored the Vulkan::Queue and Vulkan::CommandBuffer classes

Queue:
> Moved submission, presentation and waiting logic to the Vulkan::Graphics class.
> Created the SubmissionData struct. This struct contains all the information needed for CommandBuffer submission.

CommandBuffer:
> Removed the PIMPL pattern.
> CommandBuffers no longer track resources since the Vulkan::Graphics class handles resource management.

General:
> Updated code that uses Queues and CommandBuffers to the new paradigm.

Change-Id: Idf04a953a434e4081662fa8ed8ab50a695ef5b82

5 years agoVulkan::Fence lifetime changes
Angelos Gkountis [Thu, 31 May 2018 12:54:43 +0000 (13:54 +0100)]
Vulkan::Fence lifetime changes

> Vulkan::Fence lifetimes are now managed by the Vulkan::Graphics class
> Added getter functions to the Vulkan::Sampler class

Change-Id: Id963a72eca2a2eeaceaecaf30655b07e9d6baf16

5 years agoRefactored the Vulkan::Sampler class
Angelos Gkountis [Thu, 31 May 2018 09:56:10 +0000 (10:56 +0100)]
Refactored the Vulkan::Sampler class

> Removed the PIMPL pattern
> Sampler can now only be immutable
> Samplers should be unique and be created at initialization
> Sampler creation logic moved to the Vulkan::Graphics class
> Added the method AddSampler to the Vulkan::Graphics class
> Sampler lifetime is now managed by the Vulkan::Graphics class

Change-Id: Ifa4a9364e3dc2cf483e694648e4b03f35b689398

5 years agoThe ResourceCache now stores ImageViews
Angelos Gkountis [Wed, 30 May 2018 15:18:14 +0000 (16:18 +0100)]
The ResourceCache now stores ImageViews

> ImageView lifetimes are now managed by the Vulkan::Graphics class

Change-Id: Icc7f9e8845d2dd2dd55b3b7209e376acbfaf439d

5 years agoRefactored the Vulkan::Image class
Angelos Gkountis [Wed, 30 May 2018 14:32:52 +0000 (15:32 +0100)]
Refactored the Vulkan::Image class

> Removed the PIMPL pattern.
> Renamed the static method New that created a RefCountedImage from an external Vulkan image handle to NewFromExternal.
> Removed the Vk prefix from certain getter methods in the Vulkan::Image class.
> Moved the image creation login to the Vulkan::Graphics class.
> Moved the image memory binding logic to the Vulkan::Graphics class.
> Renamed the BindMemory method of the Vulkan::Image class to AssingMemory.
> AssignMemory now only assigns the RefCountedGpuMemoryBlock to the image to increase the ref count. To bind memory to an image, users should use the Graphics::BindImageMemory(<image>, <memory>, <offset>) method.
> Altered already existing image creation code to use the new paradigm.

Change-Id: I32bd621dcd59eac7c24a0759798bde15a7870083

5 years agoVulkanImageView moved to separate files
Angelos Gkountis [Tue, 29 May 2018 12:45:29 +0000 (13:45 +0100)]
VulkanImageView moved to separate files

> Now the Graphics class has a single instance of the Resource class
> Cache insertions and removals use mutex locks to synchronize
> Removed not needed #pragmas.
> Applied correct code formatting on vulkan-graphics.cpp

Change-Id: Ib1bcbc3aae7a2099cd4338d2521f9f014f1e3850

5 years agoGraphics refactoring
Angelos Gkountis [Thu, 24 May 2018 16:46:34 +0000 (17:46 +0100)]
Graphics refactoring

> Added a discard queue in the ResourceCache class.

> RefCounted Vulkan objects no longer destroy their Vulkan handles when the reference count reaches 0. Instead, a deleter function is queued in the discard queue of the current thread's ResourceCache.

> Imlemented the CollectGarbage method in the Vulkan::Graphics class. This method executes all the deleter functions queued in the current thread's resource cache.

> The Vulkan::Graphics class now contains an std::unordered_map that stores a ResourceCache per thread id.

> Added Create<vulkan_object_name> methods for Vulkan objects in the Vulkan::Graphics class.

> Added action methods (e.g WaitForFence(...)) in the Graphics class.

> Function implementations in vulkan-graphics.cpp now match the declaration order defined in vulkan-graphics.h.

> Added implicit conversion operators in some Vulkan objects that exposes the pointer to the Vulkan handle.

> Moved the BufferType and Platform enum classes to vulkan-types.h.

Change-Id: I1b4b2bd3d2074c016d1c4fbce3c5ab532b279e64

5 years agoFixed uniform mappings to handle actor properties
David Steele [Fri, 8 Jun 2018 15:05:19 +0000 (16:05 +0100)]
Fixed uniform mappings to handle actor properties

Uniform mappings weren't taking account of actor properties
(Removed in render-renderer.cpp deletion).

Updated scene-graph-renderer to ensure that all uniform maps are
properly collected into a single collectedUniformMap in the right
priority. This only happens when a property is registered on the
associated shader, renderer or node.

Only parses the current buffer of the collected uniform map now,
instead of both buffers.

Change-Id: I744f2c4494eb788b49117186d209e3b440db3fe9
Signed-off-by: David Steele <david.steele@samsung.com>
5 years agoFixing up Vulkan branch after merge to dali_1.3.26
David Steele [Thu, 31 May 2018 15:51:53 +0000 (16:51 +0100)]
Fixing up Vulkan branch after merge to dali_1.3.26

Re-wrote built-in shaders to match latest toolkit visual shaders
(Removed opacity and uAtlasRect uniforms)

Updated graphics-algorithms and scene-graph-renderer to handle new renderer opacity
Wrapped vulkan debug with test for environment variable.

Fix to texture order to ensure samplers are defined in binding order.

Change-Id: Ie75a0d41970ce31355f8038c7d2111decabf8455
Signed-off-by: David Steele <david.steele@samsung.com>
5 years agoMerge branch 'devel/master' into devel/vulkan
David Steele [Thu, 31 May 2018 14:33:22 +0000 (15:33 +0100)]
Merge branch 'devel/master' into devel/vulkan

Change-Id: Ia7e36292a511597c183cb1505143c8ee1e1ec381

5 years agoFixed deprecation keyword to current version
David Steele [Fri, 25 May 2018 17:14:33 +0000 (18:14 +0100)]
Fixed deprecation keyword to current version

Change-Id: Ia3b519835d44db954d6517fea75acf5f4d54d308

5 years ago[Vulkan] Indexed draw and topology support
adam.b [Fri, 25 May 2018 13:06:18 +0000 (14:06 +0100)]
[Vulkan] Indexed draw and topology support

- Added index buffer and index draw support
- Added setting the topology in rendered geometry

Change-Id: I8b660bd154141a5b251d29f5a0cfcc613f229382

5 years ago[Vulkan] Fixes in graphics-algorithms
adam.b [Fri, 25 May 2018 13:05:25 +0000 (14:05 +0100)]
[Vulkan] Fixes in graphics-algorithms

- MVP multiplied by the CLIP_MATRIX
- Iterating through all renderers attached to the node

Change-Id: I95bdbd412b134829995644425ed1b45d0bd42b98

5 years ago[Vulkan] Buffer didn't use "usage" flag
adam.b [Fri, 25 May 2018 13:01:42 +0000 (14:01 +0100)]
[Vulkan] Buffer didn't use "usage" flag

Buffer sets correctly the "usage" flag now ( needed for indexed draw )

Change-Id: Ia2aea8586b437fa958ee96aa40e85c5284ca35f8

5 years ago[Vulkan] Fixed compilation error
adam.b [Fri, 18 May 2018 14:47:04 +0000 (15:47 +0100)]
[Vulkan] Fixed compilation error

Change-Id: Ib9e6ccd677444f5ba25214170fde7d10d6f92fed

5 years agoMoved the type alias of the RefCountedTexture to the vulkan-types header file
Angelos Gkountis [Fri, 18 May 2018 09:29:01 +0000 (10:29 +0100)]
Moved the type alias of the RefCountedTexture to the vulkan-types header file

Change-Id: I50c5686ef56ff42b9bdf7b44ae920aac4d3ddde9

5 years agoAltered the aliases of reference counted Vulkan objects
Angelos Gkountis [Fri, 18 May 2018 09:16:14 +0000 (10:16 +0100)]
Altered the aliases of reference counted Vulkan objects

Changed to better describe their purpose following the Dali::RefCounterVector
paradigm. e.g: ShaderRef -> RefCountedShader

Change-Id: I8996f09b949ec0dc40b4ec214bad64cae95547cb

5 years agoIntegrated the Vulkan::ResourceCache class into the Vulkan::Graphics class
Angelos Gkountis [Thu, 17 May 2018 16:13:13 +0000 (17:13 +0100)]
Integrated the Vulkan::ResourceCache class into the Vulkan::Graphics class

Renamed the GetVk[object_name] functions to the more uniform GetVkHandle name
Fixed wrong equality comparisons in the lambdas of Vulkan::ResourceCache functions

Change-Id: I0a67ae37c3ed069e538340184281b1eb8e0899d4

5 years agoImplemented the ResourceCache class.
Angelos Gkountis [Thu, 17 May 2018 13:11:49 +0000 (14:11 +0100)]
Implemented the ResourceCache class.

Change-Id: I5485a83ef15e9c54050e4964bf5fccd13182decd

5 years ago[Vulkan] Cleanup after removing rendering backend
adam.b [Fri, 25 May 2018 15:34:48 +0000 (16:34 +0100)]
[Vulkan] Cleanup after removing rendering backend

Change-Id: Iec7b0a19a26dc36f9d445ce44a137200460c4f8e

5 years ago[Vulkan] Pipeline safeguards
adam.b [Fri, 25 May 2018 15:48:18 +0000 (16:48 +0100)]
[Vulkan] Pipeline safeguards

Added safeguards checking whether pipeline is compatible
with renderer.

Change-Id: I4654f8148a8381be5d3f41e79332833edc1c775d

5 years ago[Vulkan] L8 texture support
adam.b [Fri, 18 May 2018 12:14:10 +0000 (13:14 +0100)]
[Vulkan] L8 texture support

- Fixes issue of not displaying single color
text visuals.
- Texture format is passed all the way from the
  RenderCommand

Change-Id: I0fb5eefc5e2c59e6f98e814b6de71368daadffcc

5 years ago[Vulkan] Support for clear color in Swapchain
adam.b [Fri, 25 May 2018 13:45:50 +0000 (14:45 +0100)]
[Vulkan] Support for clear color in Swapchain

Change-Id: I69c0f44539183a915b7a6309b5bc5ede3ced69a7

5 years ago[Vulkan] Graphics API cleanup
adam.b [Fri, 18 May 2018 12:07:04 +0000 (13:07 +0100)]
[Vulkan] Graphics API cleanup

- Removed redundant API classes
- Simplified

Change-Id: Ibb5f1ecf4a6f15d7e40fe9a9076cf5e236110bd1

5 years ago[Vulkan] Builtin shaders and shaders offline compilation script
adam.b [Fri, 25 May 2018 13:51:26 +0000 (14:51 +0100)]
[Vulkan] Builtin shaders and shaders offline compilation script

Toolkit shaders are currently embedded into the graphics library
build. The script that compiles them can be found at:

dali-core/dali/graphics/vulkan/scripts/glsl2vk-compile.sh

Added devel-api for Dali::Shader to be able to load the
shader code from the binary source.

Change-Id: Ia9b66ede5f9d2fca108e6ccbfd26fd94ec22428b

5 years ago[Vulkan] Vulkan controller moved to the API
adam.b [Fri, 25 May 2018 13:59:08 +0000 (14:59 +0100)]
[Vulkan] Vulkan controller moved to the API

Class has been refactored to stay consistent with API structure

Change-Id: I14526cd5049ed1be5ac0fc38063076cd9420e29e

5 years agoFixed build break
David Steele [Tue, 8 May 2018 13:26:20 +0000 (14:26 +0100)]
Fixed build break

Change-Id: I1748b443b5c4cda40d4a4fc03686fe2b0f61288b

5 years agoMoved framebuffer messages from UpdateManager to FrameBuffer
David Steele [Thu, 3 May 2018 14:47:32 +0000 (15:47 +0100)]
Moved framebuffer messages from UpdateManager to FrameBuffer

Cleaned up messages and updated renderer to ensure consistency
across all scene graph objects.

UpdateManager now no longer does any graphics related logic - this
is now farmed out to the right objects in scene graph

Change-Id: I00420a4c1868eba0fe8f61c4c55a1e2d50233ddb
Signed-off-by: David Steele <david.steele@samsung.com>
5 years agoMerge changes I6844a8f6,Ib613d6cb,I342ec48f,Ie03bf9e9,I39507902, ... into devel/vulkan
David Steele [Thu, 3 May 2018 13:35:06 +0000 (13:35 +0000)]
Merge changes I6844a8f6,Ib613d6cb,I342ec48f,Ie03bf9e9,I39507902, ... into devel/vulkan

* changes:
  Removing rendering backend
  [Vulkan] graphics controller, multiple pipelines
  [Vulkan] Increased number of swapchain images until vsync problem is solved
  [Vulkan] Factories and general controller cleanup
  [Vulkan] SpirV reflection rewrite and bug fixes
  Fix uninitialized variable

5 years agoRemoving rendering backend
David Steele [Wed, 25 Apr 2018 19:48:09 +0000 (20:48 +0100)]
Removing rendering backend

Removed the rendering backend from dali-core, migrating the data providers,
render-frame-buffer.cpp, render-geometry.cpp, render-property-buffer.cpp,
render-texture.cpp, render-sampler.h, render-instruction-container.cpp,
render-instruction.cpp, render-item.cpp, render-list.h to Update.

Removed gl-abstraction.h, gl-sync-abstraction.h, gl-defines.h

Changed Core integration API to remove references to Context, GlAbstraction,
GlSyncAbstraction.

Removed render-renderer.cpp. Extracted StencilParameters struct to a new header
stencil-parameters.h

Moved performance-monitor.h to internal/common

Removed gl abstraction from test suite (not updating test cases in this patch)

Renamed render-frame-buffer.cpp, render-geometry.cpp, render-property-buffer.cpp,
render-texture.cpp, render-sampler.h to SceneGraph variants, tidied up UpdateManager.
Moved Event->Update messages to these objects from UpdateManager.

Removed shader saving feature from UpdateManager

Change-Id: I6844a8f615f629d093ca3066fcf52ec29a91748b
Signed-off-by: David Steele <david.steele@samsung.com>
5 years ago[Vulkan] graphics controller, multiple pipelines
adam.b [Wed, 25 Apr 2018 17:49:19 +0000 (18:49 +0100)]
[Vulkan] graphics controller, multiple pipelines

- vulkan-graphics-controller cleaned up

- 'Blocks' demo works!

- Passes built-in uniforms to the render command
- Renders, just not exactly what it should ( under investigation )

- Texture binding to descriptor set works
- UBO writing into descriptors work
- Limitation:
  [1] Since DALi doesn't support UBOs, the "push constants"
      are written as UBOs by Graphics Vulkan backend.
  [2] Only one descriptor set allowed ( index = 0 )

- UBOs are being updated with data
- Created descriptor sets and pools per render command

- Added UBO manager and pools

- Graphics controller creates multiple pipelines depends on the state
- Render command has been extended to pass the list of textures
- Removed sampler-id hack from the code and the default shader
- Textures passed via Accessor
- Added buffer factory
- Using SPIRV reflection in order to map vertex input attributes

Limitation:

- Single texture passed per render item

Change-Id: Ib613d6cbc1ec481c2bd1fc7d504c58080c2f8cfa

5 years ago[Vulkan] Increased number of swapchain images until vsync problem is solved
adam.b [Thu, 29 Mar 2018 18:01:56 +0000 (19:01 +0100)]
[Vulkan] Increased number of swapchain images until vsync problem is solved

Change-Id: I342ec48f4c54bd285ab19a977daf649e7a254fb3

5 years ago[Vulkan] Factories and general controller cleanup
adam.b [Wed, 4 Apr 2018 14:25:18 +0000 (15:25 +0100)]
[Vulkan] Factories and general controller cleanup

- Added working texture factory ( some features are still missing )
- Started work on the shaders factory in order to instatiate custom pipeline
- Textures are created with the factory
- Added shader factory
- API::Shader is more like old Program rather than VkShaderModule
- Added support for binary and text shader source
- For now only SPIRV language is supported
- Only vertex and fragment shader stages supported

Known issue:
- Due to not being cached, shaders are being created again when mouse enters the window area

Change-Id: Ie03bf9e9c866f9b3ac3c51c7c1839049357663d9

6 years ago[Vulkan] SpirV reflection rewrite and bug fixes
adam.b [Wed, 25 Apr 2018 18:03:37 +0000 (19:03 +0100)]
[Vulkan] SpirV reflection rewrite and bug fixes

- Fixed memory corruption bug when loading long shader code
- More unified approach in order to obtain relevant data

Change-Id: I39507902ae43f96f02cd3f1d39983f333eec693f

6 years agoFix uninitialized variable
Daekwang Ryu [Thu, 12 Apr 2018 11:00:56 +0000 (20:00 +0900)]
Fix uninitialized variable

6 years agoFix uninitialized variable
Daekwang Ryu [Thu, 12 Apr 2018 11:00:56 +0000 (20:00 +0900)]
Fix uninitialized variable

6 years agoMultiple fixes
Francisco Santos [Wed, 4 Apr 2018 13:28:17 +0000 (14:28 +0100)]
Multiple fixes

Change-Id: Ia0b7dc6906f182ac0730d74c1505d1935c348a4e

6 years ago(dali_env) Updated to allow installation from local vulkan installer file
Adeel Kazmi [Thu, 29 Mar 2018 17:21:12 +0000 (18:21 +0100)]
(dali_env) Updated to allow installation from local vulkan installer file

Change-Id: I92c0a6f68d041965b1f680d5a2e7c712d4128266

6 years agoMerge changes I8a148074,I6532af40,I6cb64283,Id615bd9f into devel/vulkan
Francisco Santos [Thu, 29 Mar 2018 16:37:26 +0000 (12:37 -0400)]
Merge changes I8a148074,I6532af40,I6cb64283,Id615bd9f into devel/vulkan

* changes:
  [Vulkan] Sampler and texture support - something is rendering
  [Vulkan] Managed command buffer pool
  [Vulkan] Image and Swapchain upgrade
  [Vulkan] SPIRV simplified reflection ( work in progress )

6 years ago[Vulkan] Sampler and texture support - something is rendering
adam.b [Wed, 21 Mar 2018 15:59:02 +0000 (15:59 +0000)]
[Vulkan] Sampler and texture support - something is rendering

- Textures are passed from the DALi side ( it's workaround )
- UVs are computed from vertex data so no atlasing ( text affected )
- Seems like there is a problem with RGB data ( working on it )
- The shader supports only one texture ( only first from texture set used )
- Only combined-image-sampler descriptor type supported at the moment
- Alpha transparency doesn't work yet
- Glitches in many textures
- Uploading is immediate and stalls the device, has to be improved
- The communication between core and graphics is a big workaround

Change-Id: I8a14807422681aa0ab8ea4c9dfe9a4437bbfae91

6 years ago[Vulkan] Managed command buffer pool
adam.b [Thu, 22 Mar 2018 17:50:49 +0000 (17:50 +0000)]
[Vulkan] Managed command buffer pool

- fixed leaking command buffers
- command buffers are lazily preallocated on demand
- releasing command buffer doesn't destroy it but returns to the internal pool

Change-Id: I6532af408d6961f5a4be34de19fc50f949386919

6 years ago[Vulkan] Image and Swapchain upgrade
adam.b [Wed, 21 Mar 2018 12:05:56 +0000 (12:05 +0000)]
[Vulkan] Image and Swapchain upgrade

Sync issues seem to be quite severe hence the new Swapchain object
is introduced which will make use of new Image, ImageView and Framebuffer wrappers.

- Swapchain and surface have been decoupled.
- Swapchain can be obtained now from FBID value
- Swapping buffers and presenting is responsibility of swapchain not surface
- Framebuffer object is responsible for storing own compatible render pass
- ImageView can be given external untracked vk::Image as a source
- New synchronisation mechanism in place ( brute force, but more stable )
- Fixed image layout transition

This patch requires SPIR-V parser.

Change-Id: I6cb64283109b648752ff341fe7fe165dc9bad5cb

6 years agoMerge "Change default vulkan SDK to a fixed version" into devel/vulkan
Adeel Kazmi [Thu, 29 Mar 2018 15:19:35 +0000 (11:19 -0400)]
Merge "Change default vulkan SDK to a fixed version" into devel/vulkan

6 years ago[Vulkan] SPIRV simplified reflection ( work in progress )
adam.b [Thu, 8 Mar 2018 16:45:15 +0000 (16:45 +0000)]
[Vulkan] SPIRV simplified reflection ( work in progress )

Reflection plugged under the pipeline.

Implemented:
- Parsing SPIRV code
- Providing VkDescriptorSetLayoutCreateInfo data based on the shader content
- Uniform objects are matched dynamically so no need to hardcode the
  layouts anymore.

Shader modules are not able to created the descriptor set layout on its own. Only when
attached to the pipeline, the DS layouts are created before creating pipeline layout.

Change-Id: Id615bd9fbf937ca2e8f1f6c0ff54d1d36f13fd0a

6 years ago(dali_env) Added dependency to glm
Adeel Kazmi [Thu, 1 Mar 2018 11:47:19 +0000 (11:47 +0000)]
(dali_env) Added dependency to glm

Change-Id: I16b234ee0adbb78ab3d57f9e217e51af02a53d32

6 years agobuild helper
Francisco Santos [Sun, 18 Feb 2018 15:20:30 +0000 (15:20 +0000)]
build helper

Change-Id: I2e901bf7b47fc42b79c5fcb0eeed31ec83835655

6 years agoDon't set GL shaders.
Francisco Santos [Thu, 25 Jan 2018 14:08:51 +0000 (14:08 +0000)]
Don't set GL shaders.

Change-Id: I2d1b04bfc5bc2489c0fac6a04ed9b5ba7a3354df

6 years ago[Vulkan] Working build
adam.b [Fri, 16 Feb 2018 19:17:27 +0000 (19:17 +0000)]
[Vulkan] Working build

- able to render dali-demo and few other examples
- memory is constantly being allocated ( no proper management )
- validation layers turned off! ( better framerate, but less debug info )

Change-Id: Ib1f5265f03f9297f60795df2501324c51c21d237

6 years agoSubmit render calls from update to graphics
adam.b [Wed, 31 Jan 2018 16:37:25 +0000 (16:37 +0000)]
Submit render calls from update to graphics

Change-Id: I78631d0e481e8543578336c73dd873b9ca71b49f

6 years ago[Vulkan] New Image and ImageView for Swapchain
adam.b [Wed, 31 Jan 2018 16:37:25 +0000 (16:37 +0000)]
[Vulkan] New Image and ImageView for Swapchain

- Minor refactoring ( using Ref rather than Handle )
- Rewritten Image and ImageView
- Added Framebuffer (incomplete yet)
- Swapchain uses new Image/ImageView API

Change-Id: I81a9bd221b370ec2b505111201a98472ab1d10ba

6 years agoFormat for clang-format-7
Francisco Santos [Tue, 23 Jan 2018 12:05:33 +0000 (12:05 +0000)]
Format for clang-format-7

Change-Id: Iafd45809b97a5ac446ab722c02bd20b2751a04be

6 years ago[Vulkan] Basic Vulkan backend
adam.b [Wed, 31 Jan 2018 16:37:25 +0000 (16:37 +0000)]
[Vulkan] Basic Vulkan backend

Supported:
- Pipeline ( limited )
- Shaders ( ShaderModule ) ( very limited )
- Buffers ( vertex and uniform buffers ) ( limited )
- Descriptors ( sets, layouts. descriptors, pools ) ( limited, no samplers )
- CommandBuffers ( limited set of commands )
- Simple synchronisation ( vsync and swapchain )
- Indexed draw

Change-Id: Iafd2f6bb675ebb0994a8ed1c913128cef1fda0b0

6 years agoChange default vulkan SDK to a fixed version
Francisco Santos [Mon, 20 Nov 2017 10:49:26 +0000 (10:49 +0000)]
Change default vulkan SDK to a fixed version

Change-Id: I0832049c362a29231a1cc5c7722368f724dd77cf

6 years agoGraphics integration API deployment and fixing missing symbols
adam.b [Fri, 17 Nov 2017 16:00:50 +0000 (16:00 +0000)]
Graphics integration API deployment and fixing missing symbols

Recreating properly whole directory structure
when deploying graphics integration api.

Test application fixed to import Graphics object

Change-Id: I03fa16bbdf77f96f7b43cb90ef462658a1ff6b3a

6 years agoCreate wrapper for vulkan.hpp
Francisco Santos [Fri, 17 Nov 2017 11:31:16 +0000 (11:31 +0000)]
Create wrapper for vulkan.hpp

Change-Id: I5a7a94fd6836b32273ed0384e38770902588f6b8

6 years agoBuild fixes
jsr184 [Thu, 16 Nov 2017 17:14:11 +0000 (17:14 +0000)]
Build fixes

- graphics SUBDIR moved to the top-level Makefile.am due to not being called
- linker-test brought back ( it should be compiling )
- small fixes in the vulkan backend due to version differences

6 years agoAdd operator address overload to Synchronized::Handle
Francisco Santos [Mon, 5 Jun 2017 14:59:49 +0000 (15:59 +0100)]
Add operator address overload to Synchronized::Handle

Change-Id: Id21cb89f713c5936a4a8c2d29b22a99171868616

6 years agoSimplified Vulkan backend [WIP]
adam.b [Thu, 15 Jun 2017 17:01:17 +0000 (18:01 +0100)]
Simplified Vulkan backend [WIP]

Designed for better integration with Dali adaptor.

- Image, Buffer and DeviceMemory brought back.
- Added ImageView
- Added Resource user counting

Change-Id: I7d35e8584f50d844ba76c25f37004daf0ef91304

6 years agoMerge branch 'devel/master' into devel/vulkan
Francisco Santos [Mon, 13 Nov 2017 16:46:42 +0000 (16:46 +0000)]
Merge branch 'devel/master' into devel/vulkan

Change-Id: I3938e02d547f9dcc5011b0ca2025824cbbb1550b

6 years agoDALi Version 1.2.65 19/159619/1 dali_1.2.65
Victor Cebollada [Fri, 10 Nov 2017 07:20:06 +0000 (07:20 +0000)]
DALi Version 1.2.65

Change-Id: Ifc2577f900cd7446c1b8754e74ad73002655aa5e

6 years agoCaches stencil glStencilFunc() and glStencilOp() calls. 81/159381/2
Victor Cebollada [Wed, 8 Nov 2017 11:01:41 +0000 (11:01 +0000)]
Caches stencil glStencilFunc() and glStencilOp() calls.

Change-Id: I970ec25b1a6ab39c284c561bf96c81a1515b9434
Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
6 years agoAvoid calling glActiveTexture() unnecessarily. 60/159360/1
Victor Cebollada [Tue, 7 Nov 2017 15:36:19 +0000 (15:36 +0000)]
Avoid calling glActiveTexture() unnecessarily.

* glActiveTexture() is called before glBindTexture(). The context
  caches both calls but the Render::Texture was not using it.

Change-Id: Idd6880f3c27ab180dbcb2bce8f219966039cc41d
Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
6 years agoBug fix at DevelAnimation::ProgressReashedSignal 71/158971/1
Eunki Hong [Mon, 6 Nov 2017 07:10:35 +0000 (16:10 +0900)]
Bug fix at DevelAnimation::ProgressReashedSignal

Fix one bug in this patch

Progress reach signal required value were initialized when loop is done.
But if mLoopCount == 0 (unlimited looping) then signal required value is not initialized.

See UtcDaliAnimationProgressCallbackWithLoopingP() and UtcDaliAnimaionProgressCallbackWithLoopingP2().
P() use SetLoopCount and P2() use SetLooping(true).
Previous version only pass P() and fail P2().
now both P() and P2() will pass

Change-Id: Ie60ea087a00afb8a919cb935b083f207a1e34557
Signed-off-by: Eunki Hong <eunkiki.hong@samsung.com>
6 years agoMerge "Bug fix at PlayAfter" into devel/master
David Steele [Fri, 3 Nov 2017 16:26:43 +0000 (16:26 +0000)]
Merge "Bug fix at PlayAfter" into devel/master

6 years agoDALi Version 1.2.64 61/158861/1 dali_1.2.64
György Straub [Fri, 3 Nov 2017 12:27:01 +0000 (12:27 +0000)]
DALi Version 1.2.64

Change-Id: Ife7f393136c3d1a0086139e2877e3f17ab4ecc91

6 years agoBug fix at PlayAfter 86/157886/11
Eunki Hong [Thu, 26 Oct 2017 17:20:02 +0000 (02:20 +0900)]
Bug fix at PlayAfter

Fix two major bugs

1) when elapsed time is bigger then remain delaytime.

 For example, when elapsed time is 0.016s and delaytime is 0.001s.
 Previous version just delete 0.001s, and do nothing
  --> Information of 0.015 seconds is missed

2) when speedfactor is negative.

 Previous version do something like, remain_delay -= elapstime * speedfactor;
 In this case, if speed factor is negative, remain_delay time will increase
 so unlimited loop was occured in this case

Change-Id: Ib59a276a14a513fd34b458156cb29a0250c8cc70
Signed-off-by: Eunki Hong <eunkiki.hong@samsung.com>
6 years agoRender to Frame Buffer Object. 76/155576/11
Victor Cebollada [Thu, 12 Oct 2017 15:32:21 +0000 (16:32 +0100)]
Render to Frame Buffer Object.

* A new feature has been added to dali-core/dali-adaptor to
  measure the performance above 60 fps avoiding the vsync.

  It renders the frames into a Frame Buffer Object. However,
  is possible to render into the default Frame Buffer every
  certain number of frames.

* Usage: $ DALI_FPS_TRACKING=1 DALI_RENDER_TO_FBO=30 path_to_DALi_app

  Will render into the Frame Buffer Object 29 frames of 30, the 30th
  will be rendered into the Frame Buffer. Will show as well the FPS.

Change-Id: I37b3ae6efaf9e618f9cf34583c75db4187327044
Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
6 years agoRenderTaskProcessor code cleaning. 74/157674/4
Victor Cebollada [Wed, 25 Oct 2017 15:03:40 +0000 (16:03 +0100)]
RenderTaskProcessor code cleaning.

* Removes a cut & pasted code.

Change-Id: I927fe965209ee3209604385094e0ed6c8e9d8657
Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
6 years agoDALi Version 1.2.63 46/158046/1 dali_1.2.63
Umar [Fri, 27 Oct 2017 11:10:49 +0000 (12:10 +0100)]
DALi Version 1.2.63

Change-Id: Ia3df398437884f4d4ad426b8d4ec99abf03bffed

6 years agoRevert "Mark uniform map as not having changed when it's ready" 88/157888/1
Adeel Kazmi [Thu, 26 Oct 2017 18:36:21 +0000 (18:36 +0000)]
Revert "Mark uniform map as not having changed when it's ready"

This reverts commit bc9ed8c7486e0ba70037da450899473264e4e0ce.

Change-Id: If190c15e92048e848455e6ff0eae0320eeaed129

6 years agoMark uniform map as not having changed when it's ready 80/157680/1
Francisco Santos [Wed, 25 Oct 2017 17:28:45 +0000 (18:28 +0100)]
Mark uniform map as not having changed when it's ready

Change-Id: I6a3e893dbfd3d487dc96d961669fcff9cd68eb03

6 years agoMerge "Change to process events when the application is paused" into devel/master
Heeyong Song [Wed, 25 Oct 2017 04:23:13 +0000 (04:23 +0000)]
Merge "Change to process events when the application is paused" into devel/master

6 years agoMerge "Ensured Random::Range does not overflow" into devel/master
Adeel Kazmi [Tue, 24 Oct 2017 14:17:13 +0000 (14:17 +0000)]
Merge "Ensured Random::Range does not overflow" into devel/master

6 years agoFix SCREEN_POSITION error 41/157241/1
Heeyong Song [Tue, 24 Oct 2017 02:35:17 +0000 (11:35 +0900)]
Fix SCREEN_POSITION error

Change-Id: I07e7104e14b30c330c7266b44a6a20b28accff23

6 years agoChange to process events when the application is paused 45/152145/7
Heeyong Song [Mon, 25 Sep 2017 06:59:13 +0000 (15:59 +0900)]
Change to process events when the application is paused

Change-Id: I1a798c461962ce34eed99d97971a85012e1e08b4

6 years agoEnsured Random::Range does not overflow 10/157210/1
David Steele [Mon, 23 Oct 2017 18:08:00 +0000 (19:08 +0100)]
Ensured Random::Range does not overflow

If rand() & 0xfff is equal to 0xfff, then the range computation would
overflow past max value due to float inaccuracy.

Changed the order of terms to prevent overflow (whilst retaining
compile time division).

Change-Id: I286e0b5c31438f32f59e53dc7a8745745369d16e
Signed-off-by: David Steele <david.steele@samsung.com>
6 years agoBounding box clipping fix 47/157147/2
adam.b [Mon, 23 Oct 2017 09:48:15 +0000 (10:48 +0100)]
Bounding box clipping fix

Fixes issue occurring when two or more clipping areas are direct siblings and previous sibling becomes automatically a parent.

Change-Id: I0d0fd3718c41a7737cda0152d2b25682bff9ab79

6 years agoDo nothing if the same size is set to the stage. 69/157069/3
Victor Cebollada [Mon, 23 Oct 2017 08:14:35 +0000 (09:14 +0100)]
Do nothing if the same size is set to the stage.

* Every time the surface is resized the camera,
  the root layer the system overlay and the default
  render task are updated.

Change-Id: I9aebc544796ded5059661e885085d8ee50d11146
Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
6 years agoDALi Version 1.2.62 01/156901/1 dali_1.2.62
Richard Huang [Fri, 20 Oct 2017 11:42:49 +0000 (12:42 +0100)]
DALi Version 1.2.62

Change-Id: I4eb87af310e36a5ad2ab37eff0e4406f722a2a3e

6 years agoAdd Property::EXTENTS type 50/154650/15
Seoyeon Kim [Wed, 11 Oct 2017 02:53:06 +0000 (11:53 +0900)]
Add Property::EXTENTS type

- Extents is a collection of 4 uint16_t.

Change-Id: Ia39db06622d22775cc8a81e61d991508b0f760d3
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
6 years agoMerge "Initialize mTextureSet in RenderItem" into devel/master
HyunJu Shin [Mon, 16 Oct 2017 00:51:54 +0000 (00:51 +0000)]
Merge "Initialize mTextureSet in RenderItem" into devel/master

6 years agoDALi Version 1.2.61 63/155563/1 dali_1.2.61
greynaga [Fri, 13 Oct 2017 13:59:17 +0000 (14:59 +0100)]
DALi Version 1.2.61

Change-Id: I9772d281aed8df17af6a1e28990c1e1d3c49d1b1

6 years agoInitialize mTextureSet in RenderItem 33/155533/1
Seoyeon Kim [Fri, 13 Oct 2017 11:10:09 +0000 (20:10 +0900)]
Initialize mTextureSet in RenderItem

Change-Id: Id0353acea6bb7efc4dfbdf914f5d8bfea99f0607
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
6 years agoFix LoopingMode::AUTO_REVERSE behavior when LoopCount is 1 68/154268/5
Eunki Hong [Tue, 10 Oct 2017 02:41:13 +0000 (11:41 +0900)]
Fix LoopingMode::AUTO_REVERSE behavior when LoopCount is 1

Let's think some animation s.t. start = 0, target = 2, duration = 2.
if LoopingMode is RESTART, animation will works like

RESTART       +---------------------------------> t
LoopCount = 0 | 0 - 1 - 2`- 1 - 2`- 1 - 2`- 1 - ...
LoopCount = 3 | 0 - 1 - 2`- 1 - 2`- 1 - 2 - 2 - ...
LoopCount = 2 | 0 - 1 - 2`- 1 - 2 - 2 - 2 - 2 - ...
LoopCount = 1 | 0 - 1 - 2 - 2 - 2 - 2 - 2 - 2 - ...
(2` mean value become 0 after value become 2)

But if Looping Mode is AUTO_REVERSE, animation will works like

AUTO_REVERSE  +---------------------------------> t
LoopCount = 0 | 0 - 2 - 0 - 2 - 0 - 2 - 0 - 2 - ...
LoopCount = 3 | 0 - 2 - 0 - 2 - 0 - 2 - 0 - 0 - ...
LoopCount = 2 | 0 - 2 - 0 - 2 - 0 - 0 - 0 - 0 - ...
LoopCount = 1 | 0 - 1 - 2 - 2 - 2 - 2 - 2 - 2 - ...

Previous code think that LoopCount == 1 is not looping mode.
But "ONLY IF LoopCount == 1, We don't auto reversing your animation" is non-sense

This patch change animation works like

AUTO_REVERSE  +---------------------------------> t
LoopCount = 1 | 0 - 2 - 0 - 0 - 0 - 0 - 0 - 0 - ...

Note : Patch set 4 is previous code. so, Fail at UtcDaliAnimationSetLoopingModeP3

Change-Id: Ie938864ba17c1b923021f87c29859f98f7241a43
Signed-off-by: Eunki Hong <eunkiki.hong@samsung.com>
6 years agoMerge "Add types to Device::SubClass" into devel/master
Adeel Kazmi [Tue, 10 Oct 2017 15:16:37 +0000 (15:16 +0000)]
Merge "Add types to Device::SubClass" into devel/master

6 years agoInitialize Random::Range() 41/154441/1
Seoyeon Kim [Tue, 10 Oct 2017 08:04:01 +0000 (17:04 +0900)]
Initialize Random::Range()

- For security, the random number generator would be initialized
to use rand().

Change-Id: I6930001c41001ec217bf706d84dc15b71a17d1fe
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
6 years agoAdd types to Device::SubClass 32/152832/2
Heeyong Song [Wed, 27 Sep 2017 07:43:22 +0000 (16:43 +0900)]
Add types to Device::SubClass

Change-Id: I15d51283f0e7c9e7281ce36f5cad07f94a471e78

6 years agoMerge "Fast bounding-box clipping feature" into devel/master
Adeel Kazmi [Fri, 6 Oct 2017 16:42:16 +0000 (16:42 +0000)]
Merge "Fast bounding-box clipping feature" into devel/master

6 years agoDALi Version 1.2.60 32/154132/1 dali_1.2.60
Adeel Kazmi [Fri, 6 Oct 2017 15:54:18 +0000 (16:54 +0100)]
DALi Version 1.2.60

Change-Id: Ib1abc4944e268ed54fa7cf2d48cf3756bd213e73