diff options
author | Marek Olšák <[email protected]> | 2014-08-02 20:31:07 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-08-11 21:53:57 +0200 |
commit | 463b0ea1f6762b7e0536cfadc4e384840af3e8e0 (patch) | |
tree | 71c9df47ea6b35947d8f7c995d754fb3bd7d2b18 /src/mesa/state_tracker/st_texture.c | |
parent | ddc8003c61480aa5cbab72435243aa6f99677440 (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.c')
-rw-r--r-- | src/mesa/state_tracker/st_texture.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c index c1488214220..9f57cfb3d96 100644 --- a/src/mesa/state_tracker/st_texture.c +++ b/src/mesa/state_tracker/st_texture.c @@ -269,14 +269,15 @@ st_texture_image_map(struct st_context *st, struct st_texture_image *stImage, unsigned new_size = z + 1; stImage->transfer = realloc(stImage->transfer, - new_size * sizeof(void*)); + new_size * sizeof(struct st_texture_image_transfer)); memset(&stImage->transfer[stImage->num_transfers], 0, - (new_size - stImage->num_transfers) * sizeof(void*)); + (new_size - stImage->num_transfers) * + sizeof(struct st_texture_image_transfer)); stImage->num_transfers = new_size; } - assert(!stImage->transfer[z]); - stImage->transfer[z] = *transfer; + assert(!stImage->transfer[z].transfer); + stImage->transfer[z].transfer = *transfer; } return map; } @@ -288,7 +289,7 @@ st_texture_image_unmap(struct st_context *st, { struct pipe_context *pipe = st->pipe; struct pipe_transfer **transfer = - &stImage->transfer[slice + stImage->base.Face]; + &stImage->transfer[slice + stImage->base.Face].transfer; DBG("%s\n", __FUNCTION__); |