mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-06 13:15:59 +00:00
Metal: Don't crash on invalid shaders
MetalFunctionData::function was uninitialized when an error happened its destructor would run, calling release on a garbage pointer. Bug: Change-Id: Ib72038da2a07b4e0f27ec929ec08f303c54dcc62 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/17760 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
ffd94da5f1
commit
12944c84c9
@ -36,7 +36,7 @@ namespace dawn_native { namespace metal {
|
|||||||
const ShaderModuleDescriptor* descriptor);
|
const ShaderModuleDescriptor* descriptor);
|
||||||
|
|
||||||
struct MetalFunctionData {
|
struct MetalFunctionData {
|
||||||
id<MTLFunction> function;
|
id<MTLFunction> function = nil;
|
||||||
MTLSize localWorkgroupSize;
|
MTLSize localWorkgroupSize;
|
||||||
bool needsStorageBufferLength;
|
bool needsStorageBufferLength;
|
||||||
~MetalFunctionData() {
|
~MetalFunctionData() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user