[Mesa-dev] [PATCH 02/11] mesa: add ARB_gpu_shader_fp64 extension info
Ian Romanick
idr at freedesktop.org
Fri Aug 22 17:55:26 PDT 2014
On 08/14/2014 03:52 AM, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> This just adds the entries to extensions.c and mtypes.h
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> src/mesa/main/extensions.c | 1 +
> src/mesa/main/mtypes.h | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
> index 4f322d0..1445a9d 100644
> --- a/src/mesa/main/extensions.c
> +++ b/src/mesa/main/extensions.c
> @@ -117,6 +117,7 @@ static const struct extension extension_table[] = {
> { "GL_ARB_framebuffer_sRGB", o(EXT_framebuffer_sRGB), GL, 1998 },
> { "GL_ARB_get_program_binary", o(dummy_true), GL, 2010 },
> { "GL_ARB_gpu_shader5", o(ARB_gpu_shader5), GL, 2010 },
> + { "GL_ARB_gpu_shader_fp64", o(ARB_gpu_shader_fp64), GL, 2010 },
> { "GL_ARB_half_float_pixel", o(dummy_true), GL, 2003 },
> { "GL_ARB_half_float_vertex", o(ARB_half_float_vertex), GL, 2008 },
> { "GL_ARB_instanced_arrays", o(ARB_instanced_arrays), GL, 2008 },
The extension spec says, "OpenGL 3.2 and GLSL 1.50 are required." Many
times these requirements are excessive... and there just because people
didn't want to think about the interactions with older versions. :) In
this case, however, I think it's reasonable. In GLSL 1.50 the rules
about where interpolation qualifiers were specified changed. The last
bit of issue 9 alludes to this.
(9) Are double-precision "varyings" (values passed between shader stages)
supported by this extension? If so, is double-precision interpolation
is supported?
RESOLVED: Double-precision shader inputs and outputs are supported,
except for vertex shader inputs and fragment shader outputs.
Additionally, double-precision vertex shader inputs are provided by the
separate extension EXT_vertex_attrib_64bit. No known extension provides
double-precision fragment outputs, but that doesn't seem important since
OpenGL provides no pixel/texture formats with double-precision
components that could reasonably receive such outputs.
Interpolation not supported in this extension for double-precision
floating-point components. As with integer types in OpenGL 3.0,
double-precision floating-point fragment shader inputs must be qualified
as "flat".
Note that this extension reformulates the spec language requiring "flat"
qualifiers, in addition to adding doubles to the list of "flat" types.
In GLSL 1.30, the spec applies these requirements to vertex shader
outputs but imposes no requirement on fragment inputs. We move this
requirement to fragment inputs, since vertex shader outputs may be
passed to tessellation or geometry shaders without interpolation, and
thus without the need for qualification by "flat".
Because of this, it seems like we should restrict this extension to
core profile. Opinions?
> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
> index 742ce3e..121f2ea 100644
> --- a/src/mesa/main/mtypes.h
> +++ b/src/mesa/main/mtypes.h
> @@ -3572,6 +3572,7 @@ struct gl_extensions
> GLboolean ARB_explicit_uniform_location;
> GLboolean ARB_geometry_shader4;
> GLboolean ARB_gpu_shader5;
> + GLboolean ARB_gpu_shader_fp64;
> GLboolean ARB_half_float_vertex;
> GLboolean ARB_instanced_arrays;
> GLboolean ARB_internalformat_query;
>
More information about the mesa-dev
mailing list