public static H1GpuTexture2D Create(Vector4 clearValue, H1Texture2D.Description desc, H1SubresourceData initialData)
        {
            H1GpuTexture2D newTex2D = new H1GpuTexture2D();

            CreatePlatformDependent(clearValue, desc, initialData, ref newTex2D);

            if (newTex2D.Resource == null)
            {
                newTex2D.Destroy();
                return(null);
            }

            return(newTex2D);
        }
        static void CreatePlatformDependent(Vector4 clearValue, H1Texture2D.Description desc, H1SubresourceData initialData, ref H1GpuTexture2D result)
        {
            // get device for directX 12
            Device deviceDX12 = H1Global <H1ManagedRenderer> .Instance.Device;

            H1GpuResourceDesc desc12         = H1RHIDefinitionHelper.Texture2DDescToGpuResourceDesc(desc);
            H1HeapType        heapType       = H1RHIDefinitionHelper.GetHeapTypeFromTexture2DDesc(desc);
            H1ResourceStates  resourceStates = H1RHIDefinitionHelper.GetResourceStatesFromTexture2DDesc(desc);

            // generate resource
            //if (result != null)
            //    result.Resource.CreateResource(heapType, desc12, resourceStates);

            // generate RHI resource description (need resource description for generating UAV or SRV or etc.)
            result.CreateResourceDescription(desc12);
        }