[Mesa-dev] [PATCH 13/25] compiler: make uses_sample_qualifier a bitfield and add uses_centroid_qualifier
Timothy Arceri
timothy.arceri at collabora.com
Tue Oct 18 06:12:16 UTC 2016
These need to be bitfields for use with gallium.
---
src/compiler/glsl/glsl_to_nir.cpp | 2 +-
src/compiler/shader_info.h | 12 +++++++++---
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp
index de76651..a2284e2 100644
--- a/src/compiler/glsl/glsl_to_nir.cpp
+++ b/src/compiler/glsl/glsl_to_nir.cpp
@@ -185,7 +185,7 @@ glsl_to_nir(const struct gl_shader_program *shader_prog,
(struct gl_fragment_program *)sh->Program;
shader->info->fs.uses_discard = fp->UsesKill;
- shader->info->fs.uses_sample_qualifier = fp->IsSample != 0;
+ shader->info->fs.uses_sample_qualifier = fp->IsSample;
shader->info->fs.early_fragment_tests = sh->info.EarlyFragmentTests;
shader->info->fs.depth_layout = fp->FragDepthLayout;
break;
diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h
index 66e06ad..dde36f5 100644
--- a/src/compiler/shader_info.h
+++ b/src/compiler/shader_info.h
@@ -95,12 +95,18 @@ typedef struct shader_info {
} gs;
struct {
- bool uses_discard;
+ /**
+ * A bitfield of input locations declared with the "sample" qualifier
+ */
+ uint64_t uses_sample_qualifier;
/**
- * Whether any inputs are declared with the "sample" qualifier.
+ * A bitfield of input locations declared with the "centroid"
+ * qualifier.
*/
- bool uses_sample_qualifier;
+ uint64_t uses_centroid_qualifier;
+
+ bool uses_discard;
/**
* Whether early fragment tests are enabled as defined by
--
2.7.4
More information about the mesa-dev
mailing list