nv_compute_shader_derivatives: Test compiler failures

Reviewed-by: 's avatarIan Romanick <ian.d.romanick@intel.com>
parent 8eabe7fa
// [config]
// expect_result: fail
// glsl_version: 4.50
// require_extensions: GL_NV_compute_shader_derivatives
// [end config]
//
// NV_compute_shader_derivatives says
//
// The layout qualifier "derivative_group_linearNV" specifies that
// derivatives in compute shaders are evaluated over groups of four
// invocations with consecutive gl_LocalInvocationIndex values of the form
// 4x+{0,1,2,3}. It is a compile-time error if this qualifier is used with a
// local group size whose total number of invocations is not a multiple of
// four.
#version 450
#extension GL_NV_compute_shader_derivatives: require
layout(local_size_x = 3, local_size_y = 3) in;
layout(derivative_group_linearNV) in;
void main() {}
// [config]
// expect_result: fail
// glsl_version: 4.50
// require_extensions: GL_NV_compute_shader_derivatives
// [end config]
//
// NV_compute_shader_derivatives says
//
// The layout qualifier "derivative_group_quadsNV" specifies that derivatives
// in compute shaders are evaluated over 2x2 groups of invocations whose
// gl_LocalInvocationID values are of the form (2x+{0,1}, 2y+{0,1}, z). It
// is a compile-time error if this qualifier is used with a local group size
// whose first or second dimension is not a multiple of two.
#version 450
#extension GL_NV_compute_shader_derivatives: require
layout(local_size_x = 3, local_size_y = 2) in;
layout(derivative_group_quadsNV) in;
void main() {}
// [config]
// expect_result: fail
// glsl_version: 4.50
// require_extensions: GL_NV_compute_shader_derivatives
// [end config]
//
// NV_compute_shader_derivatives says
//
// The layout qualifier "derivative_group_quadsNV" specifies that derivatives
// in compute shaders are evaluated over 2x2 groups of invocations whose
// gl_LocalInvocationID values are of the form (2x+{0,1}, 2y+{0,1}, z). It
// is a compile-time error if this qualifier is used with a local group size
// whose first or second dimension is not a multiple of two.
#version 450
#extension GL_NV_compute_shader_derivatives: require
layout(local_size_x = 4, local_size_y = 3) in;
layout(derivative_group_quadsNV) in;
void main() {}
// [config]
// expect_result: fail
// glsl_version: 4.50
// require_extensions: GL_NV_compute_shader_derivatives
// [end config]
//
// NV_compute_shader_derivatives says
//
// The "derivative_group_quadsNV" and "derivative_group_linearNV" qualifiers
// are used to specify how compute shader invocations are grouped for the
// purposes of evaluating derivatives for derivative functions and automatic
// texture level of detail computation. It is a compile-time error if both
// qualifiers are specified. If neither qualifier is specified, derivatives
// evaluated for compute shaders will return zero.
#version 450
#extension GL_NV_compute_shader_derivatives: require
layout(derivative_group_quadsNV) in;
layout(derivative_group_linearNV) in;
void main() {}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment