[Piglit] [PATCH] arb_sample_shading: document automatic per-sample FS execution

Anuj Phogat anuj.phogat at gmail.com
Thu Aug 10 18:15:07 UTC 2017


On Fri, Aug 4, 2017 at 6:21 AM, Brian Paul <brianp at vmware.com> wrote:
>
> Explain why these tests don't need to enable GL_SAMPLE_SHADING_ARB.
> ---
>  .../arb_sample_shading/execution/builtin-gl-sample-id.cpp     | 11 +++++++++++
>  .../execution/builtin-gl-sample-position.cpp                  | 11 +++++++++++
>  2 files changed, 22 insertions(+)
>
> diff --git a/tests/spec/arb_sample_shading/execution/builtin-gl-sample-id.cpp b/tests/spec/arb_sample_shading/execution/builtin-gl-sample-id.cpp
> index c318b14..5ccef90 100644
> --- a/tests/spec/arb_sample_shading/execution/builtin-gl-sample-id.cpp
> +++ b/tests/spec/arb_sample_shading/execution/builtin-gl-sample-id.cpp
> @@ -25,6 +25,17 @@
>   *  This test verifies that using gl_SampleID in fragment shader program
>   *  works as per ARB_sample_shading specification.
>   *
> + *  Note that we do not have to enable GL_SAMPLE_SHADING_ARB.
> + *  The GL_ARB_sample_shading spec (and the GLSL 4.0 spec) say:
> + *
> + *      9) Is per-sample shading ever triggered by properties of the fragment
> + *      shader?
> + *
> + *      RESOLVED:  Yes.  The variables "gl_SampleID" and "gl_SamplePosition"
> + *      can be used to read properties of the current sample, which wouldn't
> + *      make much sense if the fragment shader were run at a lower frequency
> + *      than per-sample.
> + *
>   **/
>
>  #include "piglit-fbo.h"
> diff --git a/tests/spec/arb_sample_shading/execution/builtin-gl-sample-position.cpp b/tests/spec/arb_sample_shading/execution/builtin-gl-sample-position.cpp
> index ede6514..88a6c5f 100644
> --- a/tests/spec/arb_sample_shading/execution/builtin-gl-sample-position.cpp
> +++ b/tests/spec/arb_sample_shading/execution/builtin-gl-sample-position.cpp
> @@ -25,6 +25,17 @@
>   *  This test verifies that using gl_SamplePosition in fragment shader
>   *  program works as per ARB_sample_shading specification.
>   *
> + *  Note that we do not have to enable GL_SAMPLE_SHADING_ARB.
> + *  The GL_ARB_sample_shading spec (and the GLSL 4.0 spec) say:
> + *
> + *      9) Is per-sample shading ever triggered by properties of the fragment
> + *      shader?
> + *
> + *      RESOLVED:  Yes.  The variables "gl_SampleID" and "gl_SamplePosition"
> + *      can be used to read properties of the current sample, which wouldn't
> + *      make much sense if the fragment shader were run at a lower frequency
> + *      than per-sample.
> + *
>   **/
>
>  #include "piglit-fbo.h"
> --
> 1.9.1
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit

Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>


More information about the Piglit mailing list