Metal: MTLShader and MTLShaderGenerator implementation.
Full support for translation and compilation of shaders in Metal, using GPUShaderCreateInfo. Includes render pipeline state creation and management, enabling all standard GPU viewport rendering features in Metal. Authored by Apple: Michael Parkin-White, Marco Giordano Ref T96261 Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D15563
This commit is contained in:
@@ -673,6 +673,9 @@ static int constant_type_size(Type type)
|
||||
case Type::FLOAT:
|
||||
case Type::INT:
|
||||
case Type::UINT:
|
||||
case Type::UCHAR4:
|
||||
case Type::CHAR4:
|
||||
case blender::gpu::shader::Type::VEC3_101010I2:
|
||||
return 4;
|
||||
break;
|
||||
case Type::VEC2:
|
||||
@@ -695,6 +698,18 @@ static int constant_type_size(Type type)
|
||||
case Type::MAT4:
|
||||
return 64;
|
||||
break;
|
||||
case blender::gpu::shader::Type::UCHAR:
|
||||
case blender::gpu::shader::Type::CHAR:
|
||||
return 1;
|
||||
break;
|
||||
case blender::gpu::shader::Type::UCHAR2:
|
||||
case blender::gpu::shader::Type::CHAR2:
|
||||
return 2;
|
||||
break;
|
||||
case blender::gpu::shader::Type::UCHAR3:
|
||||
case blender::gpu::shader::Type::CHAR3:
|
||||
return 3;
|
||||
break;
|
||||
}
|
||||
BLI_assert(false);
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user