projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gallium/util: add 1d/2d mipmap generation support
[mesa.git]
/
src
/
gallium
/
auxiliary
/
util
/
u_tile.h
diff --git
a/src/gallium/auxiliary/util/u_tile.h
b/src/gallium/auxiliary/util/u_tile.h
index a8ac80530836930b860bb61d0471eb29bac8ee1e..0ba274308fe41ed3dace4e28d08072e0dd2de941 100644
(file)
--- a/
src/gallium/auxiliary/util/u_tile.h
+++ b/
src/gallium/auxiliary/util/u_tile.h
@@
-29,25
+29,30
@@
#define P_TILE_H
#include "pipe/p_compiler.h"
#define P_TILE_H
#include "pipe/p_compiler.h"
+#include "pipe/p_format.h"
+#include "pipe/p_state.h"
-struct pipe_
surface
;
-
+struct pipe_
context
;
+struct pipe_transfer;
/**
/**
- * Clip tile against surface dims.
+ * Clip tile against transfer dims.
+ *
+ * XXX: this only clips width and height!
+ *
* \return TRUE if tile is totally clipped, FALSE otherwise
*/
static INLINE boolean
* \return TRUE if tile is totally clipped, FALSE otherwise
*/
static INLINE boolean
-
pipe_clip_tile(uint x, uint y, uint *w, uint *h, const struct pipe_surface *ps
)
+
u_clip_tile(uint x, uint y, uint *w, uint *h, const struct pipe_box *box
)
{
{
- if (x >=
ps
->width)
+ if (x >=
box
->width)
return TRUE;
return TRUE;
- if (y >=
ps
->height)
+ if (y >=
box
->height)
return TRUE;
return TRUE;
- if (x + *w >
ps
->width)
- *w =
ps
->width - x;
- if (y + *h >
ps
->height)
- *h =
ps
->height - y;
+ if (x + *w >
box
->width)
+ *w =
box
->width - x;
+ if (y + *h >
box
->height)
+ *h =
box
->height - y;
return FALSE;
}
return FALSE;
}
@@
-56,34
+61,54
@@
extern "C" {
#endif
void
#endif
void
-pipe_get_tile_raw(struct pipe_surface *ps,
+pipe_get_tile_raw(struct pipe_context *pipe,
+ struct pipe_transfer *pt,
uint x, uint y, uint w, uint h,
void *p, int dst_stride);
void
uint x, uint y, uint w, uint h,
void *p, int dst_stride);
void
-pipe_put_tile_raw(struct pipe_surface *ps,
+pipe_put_tile_raw(struct pipe_context *pipe,
+ struct pipe_transfer *pt,
uint x, uint y, uint w, uint h,
const void *p, int src_stride);
void
uint x, uint y, uint w, uint h,
const void *p, int src_stride);
void
-pipe_get_tile_rgba(struct pipe_surface *ps,
+pipe_get_tile_rgba(struct pipe_context *pipe,
+ struct pipe_transfer *pt,
uint x, uint y, uint w, uint h,
float *p);
void
uint x, uint y, uint w, uint h,
float *p);
void
-pipe_put_tile_rgba(struct pipe_surface *ps,
+pipe_get_tile_rgba_format(struct pipe_context *pipe,
+ struct pipe_transfer *pt,
+ uint x, uint y, uint w, uint h,
+ enum pipe_format format,
+ float *p);
+
+void
+pipe_put_tile_rgba(struct pipe_context *pipe,
+ struct pipe_transfer *pt,
uint x, uint y, uint w, uint h,
const float *p);
uint x, uint y, uint w, uint h,
const float *p);
+void
+pipe_put_tile_rgba_format(struct pipe_context *pipe,
+ struct pipe_transfer *pt,
+ uint x, uint y, uint w, uint h,
+ enum pipe_format format,
+ const float *p);
+
void
void
-pipe_get_tile_z(struct pipe_surface *ps,
+pipe_get_tile_z(struct pipe_context *pipe,
+ struct pipe_transfer *pt,
uint x, uint y, uint w, uint h,
uint *z);
void
uint x, uint y, uint w, uint h,
uint *z);
void
-pipe_put_tile_z(struct pipe_surface *ps,
+pipe_put_tile_z(struct pipe_context *pipe,
+ struct pipe_transfer *pt,
uint x, uint y, uint w, uint h,
const uint *z);
uint x, uint y, uint w, uint h,
const uint *z);