Cleanup: format

This commit is contained in:
Campbell Barton 2023-01-09 18:56:54 +11:00
parent 59ce3b8f6b
commit 63c985e0f7
2 changed files with 19 additions and 5 deletions

View File

@ -377,7 +377,8 @@ bool MetalDevice::load_kernels(const uint _kernel_features)
/* Only request generic kernels if they aren't cached in memory. */
if (make_source_and_check_if_compile_needed(PSO_GENERIC)) {
/* If needed, load them asynchronously in order to responsively message progress to the user. */
/* If needed, load them asynchronously in order to responsively message progress to the user.
*/
int this_device_id = this->device_id;
auto compile_kernels_fn = ^() {
compile_and_load(this_device_id, PSO_GENERIC);

View File

@ -251,12 +251,25 @@ GPUTexture *IMB_touch_gpu_texture(const char *name,
GPUTexture *tex;
if (layers > 0) {
tex = GPU_texture_create_2d_array_ex(
name, w, h, layers, 9999, tex_format, GPU_TEXTURE_USAGE_SHADER_READ | GPU_TEXTURE_USAGE_MIP_SWIZZLE_VIEW, NULL);
tex = GPU_texture_create_2d_array_ex(name,
w,
h,
layers,
9999,
tex_format,
GPU_TEXTURE_USAGE_SHADER_READ |
GPU_TEXTURE_USAGE_MIP_SWIZZLE_VIEW,
NULL);
}
else {
tex = GPU_texture_create_2d_ex(
name, w, h, 9999, tex_format, GPU_TEXTURE_USAGE_SHADER_READ | GPU_TEXTURE_USAGE_MIP_SWIZZLE_VIEW, NULL);
tex = GPU_texture_create_2d_ex(name,
w,
h,
9999,
tex_format,
GPU_TEXTURE_USAGE_SHADER_READ |
GPU_TEXTURE_USAGE_MIP_SWIZZLE_VIEW,
NULL);
}
GPU_texture_swizzle_set(tex, imb_gpu_get_swizzle(ibuf));