mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
st/nine: Fix D3DFMT_NULL size
D3DFMT_NULL is mapped to PIPE_FORMAT_NONE. Instead of relying on PIPE_FORMAT_NONE to return a size, pick one. The one picked is the same than Wine. Signed-off-by: Axel Davy <axel.davy@ens.fr>
This commit is contained in:
parent
9dc792b95b
commit
1f65f67b21
1 changed files with 2 additions and 0 deletions
|
|
@ -733,6 +733,8 @@ static inline unsigned nine_format_get_level_alloc_size(enum pipe_format format,
|
|||
if (is_ATI1_ATI2(format)) {
|
||||
/* For "unknown" formats like ATIx use width * height bytes */
|
||||
size = w * h;
|
||||
} else if (format == PIPE_FORMAT_NONE) { /* D3DFMT_NULL */
|
||||
size = w * h * 4;
|
||||
} else {
|
||||
size = nine_format_get_stride(format, w) *
|
||||
util_format_get_nblocksy(format, h);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue