projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9dc792b
)
st/nine: Fix D3DFMT_NULL size
author
Axel Davy
<axel.davy@ens.fr>
Sun, 2 Oct 2016 09:58:41 +0000
(11:58 +0200)
committer
Axel Davy
<axel.davy@ens.fr>
Mon, 10 Oct 2016 21:43:51 +0000
(23:43 +0200)
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>
src/gallium/state_trackers/nine/nine_pipe.h
patch
|
blob
|
history
diff --git
a/src/gallium/state_trackers/nine/nine_pipe.h
b/src/gallium/state_trackers/nine/nine_pipe.h
index 1b5a83cf30c33264428eccccb450ecde762be663..bbb148db66cef8360e7fc8b75b9915129236573d 100644
(file)
--- a/
src/gallium/state_trackers/nine/nine_pipe.h
+++ b/
src/gallium/state_trackers/nine/nine_pipe.h
@@
-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);