From ff2d490dc120708a2fcb6eea5880a6b7c6586a4b Mon Sep 17 00:00:00 2001 From: Dietrich Geisler Date: Mon, 17 Aug 2020 12:50:44 -0400 Subject: GPU Foreach Loop (#1498) * GPU Foreach Loop This PR introduces the completed GPU foreach loop and updates the heterogeneous-hello-world example to use it. This PR builds on the previous introduction of the GPU Foreach loop parsing and semantic checking PR (#1482) by introducing IR lowering and emmitting. THe new feature can be used by having a GPU_Foreach loop interacting with a named non-CPP entry point, and using the -heterogeneous flag. * Fix to path Co-authored-by: Tim Foley --- prelude/slang-cpp-prelude.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'prelude') diff --git a/prelude/slang-cpp-prelude.h b/prelude/slang-cpp-prelude.h index 4fcddda7c..b00f34d8f 100644 --- a/prelude/slang-cpp-prelude.h +++ b/prelude/slang-cpp-prelude.h @@ -50,4 +50,20 @@ # define SLANG_UNROLL #endif +struct gfx_Renderer_0; +struct gfx_BufferResource_0; +struct gfx_ShaderProgram_0; +struct gfx_DescriptorSetLayout_0; +struct gfx_PipelineLayout_0; +struct gfx_DescriptorSet_0; +struct gfx_BufferResource_0; +struct gfx_PipelineState_0; +gfx_ShaderProgram_0* loadShaderProgram_0(gfx_Renderer_0* _0, unsigned char _1[], size_t _2); +gfx_DescriptorSetLayout_0* buildDescriptorSetLayout_0(gfx_Renderer_0* _0); +gfx_PipelineLayout_0* buildPipeline_0(gfx_Renderer_0* _0, gfx_DescriptorSetLayout_0* _1); +gfx_DescriptorSet_0* buildDescriptorSet_0(gfx_Renderer_0* _0, gfx_DescriptorSetLayout_0* _1, gfx_BufferResource_0* _2); +gfx_PipelineState_0* buildPipelineState_0(gfx_ShaderProgram_0* _0, gfx_Renderer_0* _1, gfx_PipelineLayout_0* _2); +void dispatchComputation_0(gfx_Renderer_0* _0, gfx_PipelineState_0* _1, gfx_PipelineLayout_0* _2, gfx_DescriptorSet_0* _3, uint32_t _4, uint32_t _5, uint32_t _6); +gfx_BufferResource_0* unconvertBuffer_0(RWStructuredBuffer _0); + #endif \ No newline at end of file -- cgit v1.2.3