diff options
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nouveau_util.h')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_util.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_util.h b/src/mesa/drivers/dri/nouveau/nouveau_util.h index d4cc5c4fb9c..17d6965ee2c 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_util.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_util.h | |||
@@ -207,4 +207,24 @@ get_texgen_coeff(struct gl_texgen *c) | |||
207 | return NULL; | 207 | return NULL; |
208 | } | 208 | } |
209 | 209 | ||
210 | static inline unsigned | ||
211 | get_format_blocksx(gl_format format, | ||
212 | unsigned x) | ||
213 | { | ||
214 | GLuint blockwidth; | ||
215 | GLuint blockheight; | ||
216 | _mesa_get_format_block_size(format, &blockwidth, &blockheight); | ||
217 | return (x + blockwidth - 1) / blockwidth; | ||
218 | } | ||
219 | |||
220 | static inline unsigned | ||
221 | get_format_blocksy(gl_format format, | ||
222 | unsigned y) | ||
223 | { | ||
224 | GLuint blockwidth; | ||
225 | GLuint blockheight; | ||
226 | _mesa_get_format_block_size(format, &blockwidth, &blockheight); | ||
227 | return (y + blockheight - 1) / blockheight; | ||
228 | } | ||
229 | |||
210 | #endif | 230 | #endif |