From 5a60535a20393a4215f7a03fe77d927bacb71438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Wed, 31 Aug 2022 11:18:12 +0200 Subject: GPUCapabilities: Add GPU_shader_draw_parameters_support This checks for the availability of `gl_BaseInstanceARB` or equivalent. Disabling for any workaround that disables shader_image_load_store_support as a preventive measure. --- source/blender/gpu/GPU_capabilities.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/gpu/GPU_capabilities.h') diff --git a/source/blender/gpu/GPU_capabilities.h b/source/blender/gpu/GPU_capabilities.h index 7fe467de402..aa01f446b9b 100644 --- a/source/blender/gpu/GPU_capabilities.h +++ b/source/blender/gpu/GPU_capabilities.h @@ -47,6 +47,7 @@ bool GPU_crappy_amd_driver(void); bool GPU_compute_shader_support(void); bool GPU_shader_storage_buffer_objects_support(void); bool GPU_shader_image_load_store_support(void); +bool GPU_shader_draw_parameters_support(void); bool GPU_mem_stats_supported(void); void GPU_mem_stats_get(int *totalmem, int *freemem); -- cgit v1.2.3 From ac07fb38a1b35fa156b2d0901eb35cd65ed73903 Mon Sep 17 00:00:00 2001 From: Jason Fielder Date: Thu, 1 Sep 2022 22:14:18 +0200 Subject: Metal: Minimum per-vertex stride, 3D texture size + Transform feedback GPUCapabilities expansion. - Adding in compatibility paths to support minimum per-vertex strides for vertex formats. OpenGL supports a minimum stride of 1 byte, in Metal, this minimum stride is 4 bytes. Meaing a vertex format must be atleast 4-bytes in size. - Replacing transform feedback compile-time check to conditional look-up, given TF is supported on macOS with Metal. - 3D texture size safety check added as a general capability, rather than being in the gl backend only. Also required for Metal. Authored by Apple: Michael Parkin-White Ref T96261 Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D14510 --- source/blender/gpu/GPU_capabilities.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/gpu/GPU_capabilities.h') diff --git a/source/blender/gpu/GPU_capabilities.h b/source/blender/gpu/GPU_capabilities.h index aa01f446b9b..61c60f336e1 100644 --- a/source/blender/gpu/GPU_capabilities.h +++ b/source/blender/gpu/GPU_capabilities.h @@ -16,6 +16,7 @@ extern "C" { #endif int GPU_max_texture_size(void); +int GPU_max_texture_3d_size(void); int GPU_max_texture_layers(void); int GPU_max_textures(void); int GPU_max_textures_vert(void); @@ -31,6 +32,7 @@ int GPU_max_vertex_attribs(void); int GPU_max_varying_floats(void); int GPU_max_shader_storage_buffer_bindings(void); int GPU_max_compute_shader_storage_blocks(void); +int GPU_max_samplers(void); int GPU_extensions_len(void); const char *GPU_extension_get(int i); @@ -57,6 +59,9 @@ void GPU_mem_stats_get(int *totalmem, int *freemem); */ bool GPU_stereo_quadbuffer_support(void); +int GPU_minimum_per_vertex_stride(void); +bool GPU_transform_feedback_support(void); + #ifdef __cplusplus } #endif -- cgit v1.2.3 From cc8ea6ac67a108fcb96e4a8373ac02faf9ccea3d Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Thu, 1 Sep 2022 22:22:32 +0200 Subject: 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 --- source/blender/gpu/GPU_capabilities.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/gpu/GPU_capabilities.h') diff --git a/source/blender/gpu/GPU_capabilities.h b/source/blender/gpu/GPU_capabilities.h index 61c60f336e1..91cf14dc792 100644 --- a/source/blender/gpu/GPU_capabilities.h +++ b/source/blender/gpu/GPU_capabilities.h @@ -30,6 +30,7 @@ int GPU_max_batch_indices(void); int GPU_max_batch_vertices(void); int GPU_max_vertex_attribs(void); int GPU_max_varying_floats(void); +int GPU_max_samplers(void); int GPU_max_shader_storage_buffer_bindings(void); int GPU_max_compute_shader_storage_blocks(void); int GPU_max_samplers(void); -- cgit v1.2.3 From af4e62a0205e6bd566ab453fa706d2e2de9686e7 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Thu, 1 Sep 2022 16:57:17 -0500 Subject: Cleanup: Remove duplicate declaration in GPU capabilities --- source/blender/gpu/GPU_capabilities.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source/blender/gpu/GPU_capabilities.h') diff --git a/source/blender/gpu/GPU_capabilities.h b/source/blender/gpu/GPU_capabilities.h index 91cf14dc792..61c60f336e1 100644 --- a/source/blender/gpu/GPU_capabilities.h +++ b/source/blender/gpu/GPU_capabilities.h @@ -30,7 +30,6 @@ int GPU_max_batch_indices(void); int GPU_max_batch_vertices(void); int GPU_max_vertex_attribs(void); int GPU_max_varying_floats(void); -int GPU_max_samplers(void); int GPU_max_shader_storage_buffer_bindings(void); int GPU_max_compute_shader_storage_blocks(void); int GPU_max_samplers(void); -- cgit v1.2.3