# OpenGL.GL.NV.gpu_shader5

OpenGL extension NV.gpu_shader5

This module customises the behaviour of the
OpenGL.raw.GL.NV.gpu_shader5 to provide a more
Python-friendly API

Overview (from the spec)

This extension provides a set of new features to the OpenGL Shading
Language and related APIs to support capabilities of new GPUs. Shaders
using the new functionality provided by this extension should enable this
functionality via the construct

#extension GL_NV_gpu_shader5 : require (or enable)

This extension was developed concurrently with the ARB_gpu_shader5
extension, and provides a superset of the features provided there. The
features common to both extensions are documented in the ARB_gpu_shader5
specification; this document describes only the addition language features
not available via ARB_gpu_shader5. A shader that enables this extension
via an #extension directive also implicitly enables the common
capabilities provided by ARB_gpu_shader5.

In addition to the capabilities of ARB_gpu_shader5, this extension
provides a variety of new features for all shader types, including:

- support for a full set of 8-, 16-, 32-, and 64-bit scalar and vector data types, including uniform API, uniform buffer object, and shader input and output support;

- the ability to aggregate samplers into arrays, index these arrays with arbitrary expressions, and not require that non-constant indices be uniform across all shader invocations;

- new built-in functions to pack and unpack 64-bit integer types into a two-component 32-bit integer vector;

- new built-in functions to pack and unpack 32-bit unsigned integer types into a two-component 16-bit floating-point vector;

- new built-in functions to convert double-precision floating-point values to or from their 64-bit integer bit encodings;

- new built-in functions to compute the composite of a set of boolean conditions a group of shader threads;

- vector relational functions supporting comparisons of vectors of 8-, 16-, and 64-bit integer types or 16-bit floating-point types; and

- extending texel offset support to allow loading texel offsets from regular integer operands computed at run-time, except for lookups with gradients (textureGrad*).

This extension also provides additional support for processing patch
primitives (introduced by ARB_tessellation_shader).
ARB_tessellation_shader requires the use of a tessellation evaluation
shader when processing patches, which means that patches will never
survive past the tessellation pipeline stage. This extension lifts that
restriction, and allows patches to proceed further in the pipeline and be
used

- as input to a geometry shader, using a new "patches" layout qualifier;

- as input to transform feedback;

- by fixed-function rasterization stages, in which case the patches are drawn as independent points.

Additionally, it allows geometry shaders to read per-patch attributes
written by a tessellation control shader using input variables declared
with "patch in".

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/NV/gpu_shader5.txt

## Functions

## Constants

GL_FLOAT16_NV (36856)

GL_FLOAT16_VEC2_NV (36857)

GL_FLOAT16_VEC3_NV (36858)

GL_FLOAT16_VEC4_NV (36859)

GL_INT16_NV (36836)

GL_INT16_VEC2_NV (36837)

GL_INT16_VEC3_NV (36838)

GL_INT16_VEC4_NV (36839)

GL_INT64_NV (5134)

GL_INT64_VEC2_NV (36841)

GL_INT64_VEC3_NV (36842)

GL_INT64_VEC4_NV (36843)

GL_INT8_NV (36832)

GL_INT8_VEC2_NV (36833)

GL_INT8_VEC3_NV (36834)

GL_INT8_VEC4_NV (36835)

GL_PATCHES (14)

GL_UNSIGNED_INT16_NV (36848)

GL_UNSIGNED_INT16_VEC2_NV (36849)

GL_UNSIGNED_INT16_VEC3_NV (36850)

GL_UNSIGNED_INT16_VEC4_NV (36851)

GL_UNSIGNED_INT64_NV (5135)

GL_UNSIGNED_INT64_VEC2_NV (36853)

GL_UNSIGNED_INT64_VEC3_NV (36854)

GL_UNSIGNED_INT64_VEC4_NV (36855)

GL_UNSIGNED_INT8_NV (36844)

GL_UNSIGNED_INT8_VEC2_NV (36845)

GL_UNSIGNED_INT8_VEC3_NV (36846)

GL_UNSIGNED_INT8_VEC4_NV (36847)