A lot of files were missing copyright field in the header and
the Blender Foundation contributed to them in a sense of bug
fixing and general maintenance.
This change makes it explicit that those files are at least
partially copyrighted by the Blender Foundation.
Note that this does not make it so the Blender Foundation is
the only holder of the copyright in those files, and developers
who do not have a signed contract with the foundation still
hold the copyright as well.
Another aspect of this change is using SPDX format for the
header. We already used it for the license specification,
and now we state it for the copyright as well, following the
FAQ:
https://reuse.software/faq/
57 lines
1.4 KiB
C
57 lines
1.4 KiB
C
/* SPDX-FileCopyrightText: 2023 Blender Foundation
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup gpu
|
|
*
|
|
* GPU Compute Pipeline
|
|
*
|
|
* Allows to dispatch compute shader tasks on the GPU.
|
|
* Every dispatch is sent to the active `GPUContext`.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "BLI_sys_types.h"
|
|
|
|
#include "GPU_shader.h"
|
|
#include "GPU_storage_buffer.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* Dispatch a compute shader task.
|
|
* The number of work groups (aka thread groups) is bounded by `GPU_max_work_group_count()` which
|
|
* might be different in each of the 3 dimensions.
|
|
*/
|
|
void GPU_compute_dispatch(GPUShader *shader,
|
|
uint groups_x_len,
|
|
uint groups_y_len,
|
|
uint groups_z_len);
|
|
|
|
/**
|
|
* Dispatch a compute shader task. The size of the dispatch is sourced from a \a indirect_buf
|
|
* which must follow this layout:
|
|
* \code{.c}
|
|
* typedef struct {
|
|
* uint groups_x_len;
|
|
* uint groups_y_len;
|
|
* uint groups_z_len;
|
|
* } DispatchIndirectCommand;
|
|
* \encode
|
|
*
|
|
* \note The writes to the \a indirect_buf do not need to be synchronized as a memory barrier is
|
|
* emitted internally.
|
|
*
|
|
* The number of work groups (aka thread groups) is bounded by `GPU_max_work_group_count()` which
|
|
* might be different in each of the 3 dimensions.
|
|
*/
|
|
void GPU_compute_dispatch_indirect(GPUShader *shader, GPUStorageBuf *indirect_buf);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|