aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_texture.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-08-02 20:31:07 +0200
committerMarek Olšák <[email protected]>2014-08-11 21:53:57 +0200
commit463b0ea1f6762b7e0536cfadc4e384840af3e8e0 (patch)
tree71c9df47ea6b35947d8f7c995d754fb3bd7d2b18 /src/mesa/state_tracker/st_texture.h
parentddc8003c61480aa5cbab72435243aa6f99677440 (diff)
st/mesa: add support for ETC2 formats
The formats are emulated by translating them into plain uncompressed formats, because I don't know of any hardware which supports them. This is required for GLES 3.0 and ARB_ES3_compatibility (GL 4.3).
Diffstat (limited to 'src/mesa/state_tracker/st_texture.h')
-rw-r--r--src/mesa/state_tracker/st_texture.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_texture.h b/src/mesa/state_tracker/st_texture.h
index affb5681264..04b886ee39f 100644
--- a/src/mesa/state_tracker/st_texture.h
+++ b/src/mesa/state_tracker/st_texture.h
@@ -38,6 +38,16 @@
struct pipe_resource;
+struct st_texture_image_transfer {
+ struct pipe_transfer *transfer;
+
+ /* For ETC fallback. */
+ GLubyte *temp_data; /**< Temporary ETC texture storage. */
+ unsigned temp_stride; /**< Stride of the ETC texture storage. */
+ GLubyte *map; /**< Saved map pointer of the uncompressed transfer. */
+};
+
+
/**
* Subclass of gl_texure_image.
*/
@@ -59,7 +69,7 @@ struct st_texture_image
/* List of transfers, allocated on demand.
* transfer[layer] is a mapping for that layer.
*/
- struct pipe_transfer **transfer;
+ struct st_texture_image_transfer *transfer;
unsigned num_transfers;
};