Implement the extension GL_AMD_gpu_shader_half_float_fetch
- Support new opaque types: f16sampler*, f16image*, f16subpassInput*. - Add new built-in GLSL texture/image functions.
This commit is contained in:
parent
5630d0ec79
commit
1e5d7b0b27
21 changed files with 13116 additions and 3119 deletions
|
|
@ -415,6 +415,36 @@ public:
|
|||
case EsdBuffer:
|
||||
return GL_SAMPLER_BUFFER;
|
||||
}
|
||||
#ifdef AMD_EXTENSIONS
|
||||
case EbtFloat16:
|
||||
switch ((int)sampler.dim) {
|
||||
case Esd1D:
|
||||
switch ((int)sampler.shadow) {
|
||||
case false: return sampler.arrayed ? GL_FLOAT16_SAMPLER_1D_ARRAY_AMD : GL_FLOAT16_SAMPLER_1D_AMD;
|
||||
case true: return sampler.arrayed ? GL_FLOAT16_SAMPLER_1D_ARRAY_SHADOW_AMD : GL_FLOAT16_SAMPLER_1D_SHADOW_AMD;
|
||||
}
|
||||
case Esd2D:
|
||||
switch ((int)sampler.ms) {
|
||||
case false:
|
||||
switch ((int)sampler.shadow) {
|
||||
case false: return sampler.arrayed ? GL_FLOAT16_SAMPLER_2D_ARRAY_AMD : GL_FLOAT16_SAMPLER_2D_AMD;
|
||||
case true: return sampler.arrayed ? GL_FLOAT16_SAMPLER_2D_ARRAY_SHADOW_AMD : GL_FLOAT16_SAMPLER_2D_SHADOW_AMD;
|
||||
}
|
||||
case true: return sampler.arrayed ? GL_FLOAT16_SAMPLER_2D_MULTISAMPLE_ARRAY_AMD : GL_FLOAT16_SAMPLER_2D_MULTISAMPLE_AMD;
|
||||
}
|
||||
case Esd3D:
|
||||
return GL_FLOAT16_SAMPLER_3D_AMD;
|
||||
case EsdCube:
|
||||
switch ((int)sampler.shadow) {
|
||||
case false: return sampler.arrayed ? GL_FLOAT16_SAMPLER_CUBE_MAP_ARRAY_AMD : GL_FLOAT16_SAMPLER_CUBE_AMD;
|
||||
case true: return sampler.arrayed ? GL_FLOAT16_SAMPLER_CUBE_MAP_ARRAY_SHADOW_AMD : GL_FLOAT16_SAMPLER_CUBE_SHADOW_AMD;
|
||||
}
|
||||
case EsdRect:
|
||||
return sampler.shadow ? GL_FLOAT16_SAMPLER_2D_RECT_SHADOW_AMD : GL_FLOAT16_SAMPLER_2D_RECT_AMD;
|
||||
case EsdBuffer:
|
||||
return GL_FLOAT16_SAMPLER_BUFFER_AMD;
|
||||
}
|
||||
#endif
|
||||
case EbtInt:
|
||||
switch ((int)sampler.dim) {
|
||||
case Esd1D:
|
||||
|
|
@ -477,6 +507,26 @@ public:
|
|||
case EsdBuffer:
|
||||
return GL_IMAGE_BUFFER;
|
||||
}
|
||||
#ifdef AMD_EXTENSIONS
|
||||
case EbtFloat16:
|
||||
switch ((int)sampler.dim) {
|
||||
case Esd1D:
|
||||
return sampler.arrayed ? GL_FLOAT16_IMAGE_1D_ARRAY_AMD : GL_FLOAT16_IMAGE_1D_AMD;
|
||||
case Esd2D:
|
||||
switch ((int)sampler.ms) {
|
||||
case false: return sampler.arrayed ? GL_FLOAT16_IMAGE_2D_ARRAY_AMD : GL_FLOAT16_IMAGE_2D_AMD;
|
||||
case true: return sampler.arrayed ? GL_FLOAT16_IMAGE_2D_MULTISAMPLE_ARRAY_AMD : GL_FLOAT16_IMAGE_2D_MULTISAMPLE_AMD;
|
||||
}
|
||||
case Esd3D:
|
||||
return GL_FLOAT16_IMAGE_3D_AMD;
|
||||
case EsdCube:
|
||||
return sampler.arrayed ? GL_FLOAT16_IMAGE_CUBE_MAP_ARRAY_AMD : GL_FLOAT16_IMAGE_CUBE_AMD;
|
||||
case EsdRect:
|
||||
return GL_FLOAT16_IMAGE_2D_RECT_AMD;
|
||||
case EsdBuffer:
|
||||
return GL_FLOAT16_IMAGE_BUFFER_AMD;
|
||||
}
|
||||
#endif
|
||||
case EbtInt:
|
||||
switch ((int)sampler.dim) {
|
||||
case Esd1D:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue