fir-0.1.0.0: test/Tests/Definitions/UniformRuntimeArray.hs
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RebindableSyntax #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeOperators #-}
module Tests.Definitions.UniformRuntimeArray where
-- fir
import FIR
------------------------------------------------
-- uniform buffers can't contain runtime arrays
type Defs =
'[ "ubo" ':-> Uniform '[ DescriptorSet 0, Binding 0 ]
( Struct '[ "x" ':-> Float, "rt" ':-> RuntimeArray Float ] )
, "out" ':-> StorageBuffer '[ DescriptorSet 0, Binding 1 ] ( Struct '[ "f" ':-> Float ] )
, "main" ':-> EntryPoint '[ LocalSize 1 1 1 ] Compute
]
program :: Module Defs
program = Module do
entryPoint @"main" @Compute do
assign @( Name "out" :.: Name "f" ) =<< use @( Name "ubo" :.: Name "x" )