Nabla icon indicating copy to clipboard operation
Nabla copied to clipboard

Hashing of assets

Open Hazardu opened this issue 2 years ago • 7 comments

##Description Adds new methods to IAsset interface as a prerequisite for asset converter v2

IAssets derived classes

A list of classes that need their implementation of hash, compare, canBeRestoredFrom written/changed

  • [x] ICPUBufferView
  • [x] ICPUAccelerationStructure
  • [x] ICPUAnimationLibrary
  • [x] ICPUBuffer
  • [x] ICPUCommandBuffer
  • [x] ICPUComputePipeline
  • [x] ICPUDescriptorSet
  • [x] ICPUDescriptorSetLayout
  • [x] ICPUEvent
  • [x] ICPURenderpass
  • [x] ICPUFramebuffer
  • [x] ICPUGraphicsPipeline
  • [x] ICPUFramebuffer
  • [x] ICPUImage
  • [x] ICPUImageView
  • [ ] ICPUMesh
  • [ ] ICPUMeshBuffer
  • [ ] ICPUPipelineCache
  • [ ] ICPUPipelineLayout
  • [ ] ICPUSpecializedShader
  • [ ] ICPURenderpass
  • [ ] ICPURenderpassIndependentPipeline
  • [ ] ICPUSampler
  • [ ] ICPUShader
  • [ ] ICPUSkeleton ?

Hazardu avatar Mar 01 '23 19:03 Hazardu

@devshgraphicsprogramming Could you take a look at the implementation of the new methods in ICPUBufferView before I make analogous methods in the other IAsset derived classes?

Hazardu avatar Mar 01 '23 19:03 Hazardu

Also i have not seen any mention of ICPUSkeleton in #376 Is this something obsolete?

Hazardu avatar Mar 01 '23 19:03 Hazardu

Also i have not seen any mention of ICPUSkeleton in #376 Is this something obsolete?

not fully developed yet

btw can you make IAsset() constructor protected?

Edit: Superceded by https://discord.com/channels/593902898015109131/1078226704092381194/1083069244650045600

We can also probably nuke

		//! Checks if the object is either not dummy or dummy but in some cache for a purpose
		inline bool isInValidState() { return !isDummyObjectForCacheAliasing /* || !isCached TODO*/; }

from IAsset

P.S. and a bunch of other things, basically anything not used after implementing https://discord.com/channels/593902898015109131/1078226704092381194/1083069244650045600

~~Also restoreFromDummy_impl_call needs to be templated on class AssetT cause otherwise its not doing anything useful for us.~~

~~Btw it should be the responsibility of the convertToDummy and restore _impl functions to manipulate isDummyObjectForCacheAliasing cause for some objects it makes no sense to change it at all.~~

~~So no convertToDummy_impl or common~~

superceded by https://discord.com/channels/593902898015109131/1078226704092381194/1083069244650045600