[Piglit] [PATCH] glsl-es-3.00: Verify various UTF-8 clarifications from Khronos

Dylan Baker baker.dylan.c at gmail.com
Fri Dec 4 17:50:01 PST 2015


On Wed, Dec 02, 2015 at 08:42:37AM -0800, Ian Romanick wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
> 
> Further discussion in Khronos has determined that UTF-8 in unused
> preprocessor defines as well.
> 
> See Khronos internal bug #14939.
> 
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
>  .../glsl-es-3.00/compiler/utf8-unused-define.vert  | 26 +++++++++++++++++++++
>  .../glsl-es-3.00/compiler/utf8-used-define.vert    | 27 ++++++++++++++++++++++
>  2 files changed, 53 insertions(+)
>  create mode 100644 tests/spec/glsl-es-3.00/compiler/utf8-unused-define.vert
>  create mode 100644 tests/spec/glsl-es-3.00/compiler/utf8-used-define.vert
> 
> diff --git a/tests/spec/glsl-es-3.00/compiler/utf8-unused-define.vert b/tests/spec/glsl-es-3.00/compiler/utf8-unused-define.vert
> new file mode 100644
> index 0000000..69cde74
> --- /dev/null
> +++ b/tests/spec/glsl-es-3.00/compiler/utf8-unused-define.vert
> @@ -0,0 +1,26 @@
> +#version 300 es
> +
> +/* [config]
> + * expect_result: pass
> + * glsl_version: 3.00
> + * [end config]
> + *
> + * Page 8 (page 14 of the PDF) of the OpenGL ES Shading Language 3.00 spec
> + * says:
> + *
> + *     "Inside comments, the character set is extended to allow any byte
> + *     values to be used but with the exception that a byte with the value
> + *     zero is always interpreted as the end of the string. The character
> + *     encoding is assumed to be UTF-8 but no checking is performed for
> + *     invalid characters."
> + *
> + * Further discussion in Khronos has determined that UTF-8 in unused
> + * preprocessor defines as well.
> + */
> +
> +#define eat_sushi_using_chopsticks 寿司使用して箸を食べます。
> +
> +void main()
> +{
> +    gl_Position = vec4(0);
> +}
> diff --git a/tests/spec/glsl-es-3.00/compiler/utf8-used-define.vert b/tests/spec/glsl-es-3.00/compiler/utf8-used-define.vert
> new file mode 100644
> index 0000000..7bc04e6
> --- /dev/null
> +++ b/tests/spec/glsl-es-3.00/compiler/utf8-used-define.vert
> @@ -0,0 +1,27 @@
> +#version 300 es
> +
> +/* [config]
> + * expect_result: fail
> + * glsl_version: 3.00
> + * [end config]
> + *
> + * Page 8 (page 14 of the PDF) of the OpenGL ES Shading Language 3.00 spec
> + * says:
> + *
> + *     "Inside comments, the character set is extended to allow any byte
> + *     values to be used but with the exception that a byte with the value
> + *     zero is always interpreted as the end of the string. The character
> + *     encoding is assumed to be UTF-8 but no checking is performed for
> + *     invalid characters."
> + *
> + * Further discussion in Khronos has determined that UTF-8 in unused
> + * preprocessor defines as well.
> + */

My brain isn't parsing this sentence.

Should this read:
Further discussion in Khronos has determined that UTF-8 "is allowed in"
preprocessor defines as well.
? (or something to that effect?)

Or is my brain just struggling hardcore today?

> +
> +#define eat_sushi_using_chopsticks 寿司使用して箸を食べます
> +
> +void main()
> +{
> +    float eat_sushi_using_chopsticks = 0;
> +    gl_Position = vec4(eat_sushi_using_chopsticks);
> +}
> -- 
> 2.5.0
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20151204/58d48099/attachment-0001.sig>


More information about the Piglit mailing list