diff options
author | Brian Paul <[email protected]> | 2012-08-24 08:31:37 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-08-24 14:08:57 -0600 |
commit | d47a6ada9ca9670c60fc141fabadf40c63031c08 (patch) | |
tree | f39bc5068fec91606b1e03c7c602a864c1e89762 /src/mesa/main/dd.h | |
parent | ba7218061b6a6c09d5d20f12de6267673276e094 (diff) |
mesa: add texture target field to ChooseTextureFormat() driver hook
This will let us choose the actual hardware format depending on the
type of texture.
v2: fixup radeon, nouveau, intel and swrast drivers too
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/dd.h')
-rw-r--r-- | src/mesa/main/dd.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index 226897b1915..a91e8083f21 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -189,12 +189,15 @@ struct dd_function_table { /*@{*/ /** - * Choose actual hardware texture format given the user-provided source - * image format and type and the desired internal format. In some - * cases, srcFormat and srcType can be GL_NONE. + * Choose actual hardware texture format given the texture target, the + * user-provided source image format and type and the desired internal + * format. In some cases, srcFormat and srcType can be GL_NONE. + * Note: target may be GL_TEXTURE_CUBE_MAP, but never + * GL_TEXTURE_CUBE_MAP_[POSITIVE/NEGATIVE]_[XYZ]. * Called by glTexImage(), etc. */ - gl_format (*ChooseTextureFormat)( struct gl_context *ctx, GLint internalFormat, + gl_format (*ChooseTextureFormat)( struct gl_context *ctx, + GLenum target, GLint internalFormat, GLenum srcFormat, GLenum srcType ); /** |