From 567f750a34e75abc48f59ac506357b99a4ffd6c3 Mon Sep 17 00:00:00 2001 From: Bob Cao Date: Fri, 30 Dec 2022 19:08:48 -0800 Subject: [PATCH] [amdgpu] Update amdgpu device to new API (#7018) Device API has been updated. --- taichi/rhi/amdgpu/amdgpu_device.h | 36 ++++++------------------------- 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/taichi/rhi/amdgpu/amdgpu_device.h b/taichi/rhi/amdgpu/amdgpu_device.h index 45edd539e87dd..ab567b746d7ed 100644 --- a/taichi/rhi/amdgpu/amdgpu_device.h +++ b/taichi/rhi/amdgpu/amdgpu_device.h @@ -12,42 +12,16 @@ namespace taichi { namespace lang { namespace amdgpu { -class AmdgpuResourceBinder : public ResourceBinder { - public: - ~AmdgpuResourceBinder() override { - } - - void rw_buffer(uint32_t set, - uint32_t binding, - DevicePtr ptr, - size_t size) override{TI_NOT_IMPLEMENTED}; - void rw_buffer(uint32_t set, - uint32_t binding, - DeviceAllocation alloc) override{TI_NOT_IMPLEMENTED}; - - void buffer(uint32_t set, - uint32_t binding, - DevicePtr ptr, - size_t size) override{TI_NOT_IMPLEMENTED}; - void buffer(uint32_t set, uint32_t binding, DeviceAllocation alloc) override{ - TI_NOT_IMPLEMENTED}; -}; - -class AmdgpuPipeline : public Pipeline { - public: - ~AmdgpuPipeline() override { - } - - ResourceBinder *resource_binder() override{TI_NOT_IMPLEMENTED}; -}; - class AmdgpuCommandList : public CommandList { public: ~AmdgpuCommandList() override { } void bind_pipeline(Pipeline *p) override{TI_NOT_IMPLEMENTED}; - void bind_resources(ResourceBinder *binder) override{TI_NOT_IMPLEMENTED}; + RhiResult bind_shader_resources(ShaderResourceSet *res, + int set_index = 0) final{TI_NOT_IMPLEMENTED}; + RhiResult bind_raster_resources(RasterResources *res) final{ + TI_NOT_IMPLEMENTED}; void buffer_barrier(DevicePtr ptr, size_t size) override{TI_NOT_IMPLEMENTED}; void buffer_barrier(DeviceAllocation alloc) override{TI_NOT_IMPLEMENTED}; void memory_barrier() override{TI_NOT_IMPLEMENTED}; @@ -95,6 +69,8 @@ class AmdgpuDevice : public LlvmDevice { const LlvmRuntimeAllocParams ¶ms) override; void dealloc_memory(DeviceAllocation handle) override; + ShaderResourceSet *create_resource_set() final{TI_NOT_IMPLEMENTED}; + std::unique_ptr create_pipeline( const PipelineSourceDesc &src, std::string name = "Pipeline") override{TI_NOT_IMPLEMENTED};