aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_format.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_format.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_format.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_format.c b/mesalib/src/mesa/state_tracker/st_format.c
index 32b44b806..8568c68e1 100644
--- a/mesalib/src/mesa/state_tracker/st_format.c
+++ b/mesalib/src/mesa/state_tracker/st_format.c
@@ -325,6 +325,11 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
case MESA_FORMAT_SIGNED_I16:
return PIPE_FORMAT_I16_SNORM;
+ case MESA_FORMAT_RGB9_E5_FLOAT:
+ return PIPE_FORMAT_R9G9B9E5_FLOAT;
+ case MESA_FORMAT_R11_G11_B10_FLOAT:
+ return PIPE_FORMAT_R11G11B10_FLOAT;
+
default:
assert(0);
return PIPE_FORMAT_NONE;
@@ -545,6 +550,11 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
case PIPE_FORMAT_I16_SNORM:
return MESA_FORMAT_SIGNED_I16;
+ case PIPE_FORMAT_R9G9B9E5_FLOAT:
+ return MESA_FORMAT_RGB9_E5_FLOAT;
+ case PIPE_FORMAT_R11G11B10_FLOAT:
+ return MESA_FORMAT_R11_G11_B10_FLOAT;
+
default:
assert(0);
return MESA_FORMAT_NONE;
@@ -1483,6 +1493,20 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
target, sample_count, bindings);
}
+ case GL_RGB9_E5:
+ if (screen->is_format_supported(screen, PIPE_FORMAT_R9G9B9E5_FLOAT, target,
+ sample_count, bindings)) {
+ return PIPE_FORMAT_R9G9B9E5_FLOAT;
+ }
+ return PIPE_FORMAT_NONE;
+
+ case GL_R11F_G11F_B10F:
+ if (screen->is_format_supported(screen, PIPE_FORMAT_R11G11B10_FLOAT, target,
+ sample_count, bindings)) {
+ return PIPE_FORMAT_R11G11B10_FLOAT;
+ }
+ return PIPE_FORMAT_NONE;
+
default:
return PIPE_FORMAT_NONE;
}