Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/computeshaders #250

Merged
merged 4 commits into from
Feb 24, 2025
Merged

Feature/computeshaders #250

merged 4 commits into from
Feb 24, 2025

Conversation

martinfalk
Copy link
Contributor

Example processor for determining min/max values of a volume using compute shaders.

@martinfalk martinfalk self-assigned this Feb 11, 2025
Copy link

github-actions bot commented Feb 11, 2025

Cpp-Linter Report ✔️

No problems need attention.

Have any feedback or feature suggestions? Share it here.

github-actions[bot]

This comment was marked as outdated.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-tidy v17.0.6

Only 7 out of 8 clang-tidy concerns fit within this pull request's diff.

Click here for the full clang-tidy patch
diff --git a/misc/computeshaderexamples/src/processors/computeshaderimageexample.cpp b/misc/computeshaderexamples/src/processors/computeshaderimageexample.cpp
index 7a08a21..c535af8 100644
--- a/misc/computeshaderexamples/src/processors/computeshaderimageexample.cpp
+++ b/misc/computeshaderexamples/src/processors/computeshaderimageexample.cpp
@@ -78 +78 @@ void ComputeShaderImageExample::process() {
-    TextureUnit unit;
+    const TextureUnit unit;
diff --git a/misc/computeshaderexamples/src/processors/computeshaderminmax.cpp b/misc/computeshaderexamples/src/processors/computeshaderminmax.cpp
index 1ab2e6c..b0966a2 100644
--- a/misc/computeshaderexamples/src/processors/computeshaderminmax.cpp
+++ b/misc/computeshaderexamples/src/processors/computeshaderminmax.cpp
@@ -178,2 +178,2 @@ void ComputeShaderMinMax::process() {
-    BufferObject buf(bufSize * sizeof(ivec4), GLFormats::get(DataFormatId::Vec4Float32),
-                     GL_DYNAMIC_READ, GL_SHADER_STORAGE_BUFFER);
+    const BufferObject buf(bufSize * sizeof(ivec4), GLFormats::get(DataFormatId::Vec4Float32),
+                           GL_DYNAMIC_READ, GL_SHADER_STORAGE_BUFFER);
@@ -183 +183 @@ void ComputeShaderMinMax::process() {
-        utilgl::Activate activateShader(&shaderSampleVolume_);
+        const utilgl::Activate activateShader(&shaderSampleVolume_);
@@ -186 +186 @@ void ComputeShaderMinMax::process() {
-            TextureUnit texUnit;
+            const TextureUnit texUnit;
@@ -198 +198 @@ void ComputeShaderMinMax::process() {
-        utilgl::Activate activateShader(&shaderLinear_);
+        const utilgl::Activate activateShader(&shaderLinear_);
@@ -219 +219 @@ void ComputeShaderMinMax::process() {
-        DataMapper dataMapper{DataFormatBase::get(GLFormats::get(glFormat))};
+        const DataMapper dataMapper{DataFormatBase::get(GLFormats::get(glFormat))};
@@ -225 +225 @@ void ComputeShaderMinMax::process() {
-        DataMapper dataMapper{
+        const DataMapper dataMapper{

Have any feedback or feature suggestions? Share it here.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-tidy v17.0.6

No concerns from clang-tidy.

Great job! 🎉

Have any feedback or feature suggestions? Share it here.

@petersteneteg petersteneteg merged commit 268b810 into master Feb 24, 2025
14 checks passed
@petersteneteg petersteneteg deleted the feature/computeshaders branch February 24, 2025 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants