This is the first step of moving the create infos back inside shader sources. All info files are now treated as source files. However, they are not considered in the include tree yet. This will come in another following PR. Each shader source file now generate a `.info` file containing only the create info declarations. This renames all info files so that they do not conflict with their previous versions that were copied (non-generated). Pull Request: https://projects.blender.org/blender/blender/pulls/146676
45 lines
1.2 KiB
C++
45 lines
1.2 KiB
C++
/* SPDX-FileCopyrightText: 2022 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup gpu
|
|
*/
|
|
|
|
#ifdef GPU_SHADER
|
|
# pragma once
|
|
# include "gpu_shader_compat.hh"
|
|
|
|
# include "GPU_shader_shared.hh"
|
|
#endif
|
|
|
|
#include "gpu_interface_infos.hh"
|
|
#include "gpu_shader_create_info.hh"
|
|
|
|
GPU_SHADER_CREATE_INFO(gpu_shader_index_2d_array_points)
|
|
LOCAL_GROUP_SIZE(16, 16, 1)
|
|
PUSH_CONSTANT(int, elements_per_curve)
|
|
PUSH_CONSTANT(int, ncurves)
|
|
STORAGE_BUF(0, write, uint, out_indices[])
|
|
COMPUTE_SOURCE("gpu_shader_index_2d_array_points.glsl")
|
|
DO_STATIC_COMPILATION()
|
|
GPU_SHADER_CREATE_END()
|
|
|
|
GPU_SHADER_CREATE_INFO(gpu_shader_index_2d_array_lines)
|
|
LOCAL_GROUP_SIZE(16, 16, 1)
|
|
PUSH_CONSTANT(int, elements_per_curve)
|
|
PUSH_CONSTANT(int, ncurves)
|
|
STORAGE_BUF(0, write, uint, out_indices[])
|
|
COMPUTE_SOURCE("gpu_shader_index_2d_array_lines.glsl")
|
|
DO_STATIC_COMPILATION()
|
|
GPU_SHADER_CREATE_END()
|
|
|
|
GPU_SHADER_CREATE_INFO(gpu_shader_index_2d_array_tris)
|
|
LOCAL_GROUP_SIZE(16, 16, 1)
|
|
PUSH_CONSTANT(int, elements_per_curve)
|
|
PUSH_CONSTANT(int, ncurves)
|
|
STORAGE_BUF(0, write, uint, out_indices[])
|
|
COMPUTE_SOURCE("gpu_shader_index_2d_array_tris.glsl")
|
|
DO_STATIC_COMPILATION()
|
|
GPU_SHADER_CREATE_END()
|