Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <jbakker>2022-01-25 16:46:25 +0300
committerJeroen Bakker <jeroen@blender.org>2022-01-25 16:46:45 +0300
commit3f42417cd4c8c01142937ba03c8fa6ef6e895494 (patch)
tree1a3190641fbba649efe651b3a6c7ffdbee501ebc /source/blender/gpu/intern/gpu_shader_create_info.hh
parent196da819ba4cf553c76468a091966f33081efb08 (diff)
Draw: Migrate hair refine compute shader to use create info.
This patch migrates the draw manager hair refine compute shader to use GPUShaderCreateInfo. Reviewed By: fclem Differential Revision: https://developer.blender.org/D13915
Diffstat (limited to 'source/blender/gpu/intern/gpu_shader_create_info.hh')
-rw-r--r--source/blender/gpu/intern/gpu_shader_create_info.hh32
1 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/gpu/intern/gpu_shader_create_info.hh b/source/blender/gpu/intern/gpu_shader_create_info.hh
index c7b3ac5ca37..02c303fb8fa 100644
--- a/source/blender/gpu/intern/gpu_shader_create_info.hh
+++ b/source/blender/gpu/intern/gpu_shader_create_info.hh
@@ -223,8 +223,6 @@ struct ShaderCreateInfo {
* Only for names used by gpu::ShaderInterface.
*/
size_t interface_names_size_ = 0;
- /** Only for compute shaders. */
- int local_group_size_[3] = {0, 0, 0};
struct VertIn {
int index;
@@ -242,6 +240,14 @@ struct ShaderCreateInfo {
};
GeometryStageLayout geometry_layout_;
+ struct ComputeStageLayout {
+ int local_size_x = -1;
+ int local_size_y = -1;
+ int local_size_z = -1;
+ };
+
+ ComputeStageLayout compute_layout_;
+
struct FragOut {
int index;
Type type;
@@ -366,6 +372,14 @@ struct ShaderCreateInfo {
return *(Self *)this;
}
+ Self &local_group_size(int local_size_x = -1, int local_size_y = -1, int local_size_z = -1)
+ {
+ compute_layout_.local_size_x = local_size_x;
+ compute_layout_.local_size_y = local_size_y;
+ compute_layout_.local_size_z = local_size_z;
+ return *(Self *)this;
+ }
+
/* Only needed if geometry shader is enabled. */
Self &geometry_out(StageInterfaceInfo &interface)
{
@@ -504,20 +518,6 @@ struct ShaderCreateInfo {
/** \} */
/* -------------------------------------------------------------------- */
- /** \name Compute shaders Local Group Size
- * \{ */
-
- Self &local_group_size(int x, int y = 1, int z = 1)
- {
- local_group_size_[0] = x;
- local_group_size_[1] = y;
- local_group_size_[2] = z;
- return *(Self *)this;
- }
-
- /** \} */
-
- /* -------------------------------------------------------------------- */
/** \name Defines
* \{ */