diff options
Diffstat (limited to 'source/blender/gpu/metal')
-rw-r--r-- | source/blender/gpu/metal/mtl_backend.hh | 2 | ||||
-rw-r--r-- | source/blender/gpu/metal/mtl_backend.mm | 2 | ||||
-rw-r--r-- | source/blender/gpu/metal/mtl_query.mm | 6 |
3 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/gpu/metal/mtl_backend.hh b/source/blender/gpu/metal/mtl_backend.hh index 3e09408e43e..fe49a0fce60 100644 --- a/source/blender/gpu/metal/mtl_backend.hh +++ b/source/blender/gpu/metal/mtl_backend.hh @@ -40,7 +40,7 @@ class MTLBackend : public GPUBackend { MTLBackend::platform_exit(); } - void delete_resources() + void delete_resources() override { /* Delete any resources with context active. */ } diff --git a/source/blender/gpu/metal/mtl_backend.mm b/source/blender/gpu/metal/mtl_backend.mm index 83cf3af0804..a15da4df083 100644 --- a/source/blender/gpu/metal/mtl_backend.mm +++ b/source/blender/gpu/metal/mtl_backend.mm @@ -381,6 +381,8 @@ void MTLBackend::capabilities_init(MTLContext *ctx) GCaps.shader_image_load_store_support = ([device supportsFamily:MTLGPUFamilyApple3] || MTLBackend::capabilities.supports_family_mac1 || MTLBackend::capabilities.supports_family_mac2); + /* TODO(Metal): Add support? */ + GCaps.shader_draw_parameters_support = false; GCaps.compute_shader_support = false; /* TODO(Metal): Add compute support. */ GCaps.shader_storage_buffer_objects_support = false; /* TODO(Metal): implement Storage Buffer support. */ diff --git a/source/blender/gpu/metal/mtl_query.mm b/source/blender/gpu/metal/mtl_query.mm index dfda0a8de7f..8983ea7ec44 100644 --- a/source/blender/gpu/metal/mtl_query.mm +++ b/source/blender/gpu/metal/mtl_query.mm @@ -9,7 +9,7 @@ namespace blender::gpu { static const size_t VISIBILITY_COUNT_PER_BUFFER = 512; -/* defined in the documentation but not queryable programmatically: +/* Defined in the documentation but can't be queried programmatically: * https://developer.apple.com/documentation/metal/mtlvisibilityresultmode/mtlvisibilityresultmodeboolean?language=objc */ static const size_t VISIBILITY_RESULT_SIZE_IN_BYTES = 8; @@ -30,8 +30,8 @@ void MTLQueryPool::allocate_buffer() { /* Allocate Metal buffer for visibility results. */ size_t buffer_size_in_bytes = VISIBILITY_COUNT_PER_BUFFER * VISIBILITY_RESULT_SIZE_IN_BYTES; - gpu::MTLBuffer *buffer = MTLContext::get_global_memory_manager().allocate_buffer( - buffer_size_in_bytes, true); + gpu::MTLBuffer *buffer = MTLContext::get_global_memory_manager().allocate(buffer_size_in_bytes, + true); BLI_assert(buffer); buffer_.append(buffer); } |