diff options
author | Brian Paul <[email protected]> | 2008-06-12 16:54:44 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-06-12 16:58:04 -0600 |
commit | 5b51cc020efc5519bc7cc34f6fcb4138eab76e0a (patch) | |
tree | 2c7ecd0e7cc3e6e3eb1612a9572395ef4567825c /src/mesa/state_tracker | |
parent | 6363960db55769db73021081b60f1028723d9f58 (diff) |
gallium: add some #if FEATURE_x tests
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_cb_blit.c | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_texture.c | 4 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_format.c | 4 |
3 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_blit.c b/src/mesa/state_tracker/st_cb_blit.c index 0533d9460fe..799ef3f3be8 100644 --- a/src/mesa/state_tracker/st_cb_blit.c +++ b/src/mesa/state_tracker/st_cb_blit.c @@ -106,5 +106,7 @@ st_BlitFramebuffer(GLcontext *ctx, void st_init_blit_functions(struct dd_function_table *functions) { +#if FEATURE_EXT_framebuffer_blit functions->BlitFramebuffer = st_BlitFramebuffer; +#endif } diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index b2f49102256..ed65f3b0aad 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -97,14 +97,18 @@ static int compressed_num_bytes(GLuint mesaFormat) { switch(mesaFormat) { +#if FEATURE_texture_fxt1 case MESA_FORMAT_RGB_FXT1: case MESA_FORMAT_RGBA_FXT1: +#endif +#if FEATURE_texture_s3tc case MESA_FORMAT_RGB_DXT1: case MESA_FORMAT_RGBA_DXT1: return 2; case MESA_FORMAT_RGBA_DXT3: case MESA_FORMAT_RGBA_DXT5: return 4; +#endif default: return 0; } diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index 1b9325c159d..5759f393af0 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -278,6 +278,7 @@ st_mesa_format_to_pipe_format(GLuint mesaFormat) return PIPE_FORMAT_S8Z24_UNORM; case MESA_FORMAT_YCBCR: return PIPE_FORMAT_YCBCR; +#if FEATURE_texture_s3tc case MESA_FORMAT_RGB_DXT1: return PIPE_FORMAT_DXT1_RGB; case MESA_FORMAT_RGBA_DXT1: @@ -286,6 +287,7 @@ st_mesa_format_to_pipe_format(GLuint mesaFormat) return PIPE_FORMAT_DXT3_RGBA; case MESA_FORMAT_RGBA_DXT5: return PIPE_FORMAT_DXT5_RGBA; +#endif default: assert(0); return 0; @@ -569,6 +571,7 @@ translate_gallium_format_to_mesa_format(enum pipe_format format) return &_mesa_texformat_ycbcr; case PIPE_FORMAT_YCBCR_REV: return &_mesa_texformat_ycbcr_rev; +#if FEATURE_texture_s3tc case PIPE_FORMAT_DXT1_RGB: return &_mesa_texformat_rgb_dxt1; case PIPE_FORMAT_DXT1_RGBA: @@ -577,6 +580,7 @@ translate_gallium_format_to_mesa_format(enum pipe_format format) return &_mesa_texformat_rgba_dxt3; case PIPE_FORMAT_DXT5_RGBA: return &_mesa_texformat_rgba_dxt5; +#endif /* XXX add additional cases */ default: assert(0); |