Cleanup: spelling in comments

This commit is contained in:
2022-01-18 14:27:29 +11:00
parent 20df402adc
commit db496a0b7d
12 changed files with 29 additions and 35 deletions

View File

@@ -20,7 +20,7 @@
/** \file
* \ingroup gpu
*
* Descriptior type used to define shader structure, resources and interfaces.
* Descriptor type used to define shader structure, resources and interfaces.
*/
#include "BLI_map.hh"
@@ -165,7 +165,7 @@ bool gpu_shader_create_info_compile_all()
return true;
}
/* Runtime create infos are not registered in the dictionnary and cannot be searched. */
/* Runtime create infos are not registered in the dictionary and cannot be searched. */
const GPUShaderCreateInfo *gpu_shader_create_info_get(const char *info_name)
{
ShaderCreateInfo *info = g_create_infos->lookup(info_name);

View File

@@ -20,7 +20,7 @@
/** \file
* \ingroup gpu
*
* Descriptior type used to define shader structure, resources and interfaces.
* Descriptor type used to define shader structure, resources and interfaces.
*
* Some rule of thumb:
* - Do not include anything else than this file in each info file.
@@ -214,9 +214,9 @@ struct StageInterfaceInfo {
struct ShaderCreateInfo {
/** Shader name for debugging. */
StringRefNull name_;
/** True if the shader is static and can be precompiled at compile time. */
/** True if the shader is static and can be pre-compiled at compile time. */
bool do_static_compilation_ = false;
/** If true, all additionaly linked create info will be merged into this one. */
/** If true, all additionally linked create info will be merged into this one. */
bool finalized_ = false;
/**
* Maximum length of all the resource names including each null terminator.
@@ -297,7 +297,7 @@ struct ShaderCreateInfo {
};
/**
* Resources are grouped by frequency of change.
* Pass resources are meants to be valid for the whole pass.
* Pass resources are meant to be valid for the whole pass.
* Batch resources can be changed in a more granular manner (per object/material).
* Mis-usage will only produce suboptimal performance.
*/

View File

@@ -20,7 +20,7 @@
/** \file
* \ingroup gpu
*
* Descriptior type used to define shader structure, resources and interfaces.
* Descriptor type used to define shader structure, resources and interfaces.
*
* Some rule of thumb:
* - Do not include anything else than this file in each descriptor file.

View File

@@ -140,7 +140,7 @@ struct GPUSource {
};
}
/* Returns the final string with all inlcudes done. */
/* Returns the final string with all includes done. */
void build(std::string &str, shader::BuiltinBits &out_builtins)
{
for (auto *dep : dependencies) {

View File

@@ -24,16 +24,16 @@
* We use the same vector and matrix types as Blender C++. Some math functions are defined to use
* the float version to match the GLSL syntax.
* This file can be used for C & C++ code and the syntax used should follow the same rules.
* Some preprocessing is done by the GPU backend to make it GLSL compatible.
* Some preprocessing is done by the GPU back-end to make it GLSL compatible.
*
* IMPORTANT:
* - Don't add trailing comma at the end of the enum. Our custom pre-processor will noy trim it
* - Don't add trailing comma at the end of the enum. Our custom pre-processor will now trim it
* for GLSL.
* - Always use `u` suffix for enum values. GLSL do not support implicit cast.
* - Define all values. This is in order to simplify custom pre-processor code.
* - Always use uint32_t as underlying type.
* - Use float suffix by default for float literals to avoid double promotion in C++.
* - Pack one float or int after a vec3/ivec3 to fullfil alligment rules.
* - Pack one float or int after a vec3/ivec3 to fulfill alignment rules.
*
* NOTE: Due to alignment restriction and buggy drivers, do not try to use mat3 inside structs.
* NOTE: (UBO only) Do not use arrays of float. They are padded to arrays of vec4 and are not worth
@@ -81,7 +81,6 @@
# ifdef __cplusplus
# include "BLI_float4x4.hh"
# include "BLI_float4x4.hh"
# else
typedef float float2[2];
typedef float float3[3];