projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
swrast: simplify assertion to silence warning
[mesa.git]
/
src
/
gallium
/
state_trackers
/
python
/
p_device.i
diff --git
a/src/gallium/state_trackers/python/p_device.i
b/src/gallium/state_trackers/python/p_device.i
index 0eba488a078e606d8e2a34b47918ce95bee99fef..61f6b3bb739f8496676fd9725958cb0dcae7599c 100644
(file)
--- a/
src/gallium/state_trackers/python/p_device.i
+++ b/
src/gallium/state_trackers/python/p_device.i
@@
-81,21
+81,21
@@
struct st_device {
/**
* Check if the given pipe_format is supported as a texture or
* drawing surface.
/**
* Check if the given pipe_format is supported as a texture or
* drawing surface.
- * \param
type one of PIPE_TEXTURE, PIPE_SURFACE
+ * \param
bind bitmask of PIPE_BIND flags
*/
int is_format_supported( enum pipe_format format,
enum pipe_texture_target target,
*/
int is_format_supported( enum pipe_format format,
enum pipe_texture_target target,
- unsigned
tex_usage,
- unsigned
geom_flags
) {
+ unsigned
sample_count,
+ unsigned
bind
) {
/* We can't really display surfaces with the python statetracker so mask
* out that usage */
/* We can't really display surfaces with the python statetracker so mask
* out that usage */
-
tex_usage &= ~PIPE_TEXTURE_USAGE
_DISPLAY_TARGET;
+
bind &= ~PIPE_BIND
_DISPLAY_TARGET;
- return $self->screen->is_format_supported( $self->screen,
- format,
- target,
- tex_usage,
-
geom_flags
);
+ return $self->screen->is_format_supported( $self->screen,
+ format,
+ target,
+ sample_count,
+
bind
);
}
struct st_context *
}
struct st_context *
@@
-103,21
+103,21
@@
struct st_device {
return st_context_create($self);
}
return st_context_create($self);
}
- struct pipe_
textur
e *
-
textur
e_create(
+ struct pipe_
resourc
e *
+
resourc
e_create(
enum pipe_format format,
unsigned width,
unsigned height,
unsigned depth = 1,
unsigned last_level = 0,
enum pipe_texture_target target = PIPE_TEXTURE_2D,
enum pipe_format format,
unsigned width,
unsigned height,
unsigned depth = 1,
unsigned last_level = 0,
enum pipe_texture_target target = PIPE_TEXTURE_2D,
- unsigned
tex_usage
= 0
+ unsigned
bind
= 0
) {
) {
- struct pipe_
textur
e templat;
+ struct pipe_
resourc
e templat;
/* We can't really display surfaces with the python statetracker so mask
* out that usage */
/* We can't really display surfaces with the python statetracker so mask
* out that usage */
-
tex_usage &= ~PIPE_TEXTURE_USAGE
_DISPLAY_TARGET;
+
bind &= ~PIPE_BIND
_DISPLAY_TARGET;
memset(&templat, 0, sizeof(templat));
templat.format = format;
memset(&templat, 0, sizeof(templat));
templat.format = format;
@@
-126,14
+126,13
@@
struct st_device {
templat.depth0 = depth;
templat.last_level = last_level;
templat.target = target;
templat.depth0 = depth;
templat.last_level = last_level;
templat.target = target;
- templat.
tex_usage = tex_usage
;
+ templat.
bind = bind
;
- return $self->screen->texture_create($self->screen, &templat);
- }
-
- struct pipe_buffer *
- buffer_create(unsigned size, unsigned alignment = 0, unsigned usage = 0) {
- return pipe_buffer_create($self->screen, alignment, usage, size);
+ return $self->screen->resource_create($self->screen, &templat);
}
}
+ struct pipe_resource *
+ buffer_create(unsigned size, unsigned usage, unsigned bind = 0) {
+ return pipe_buffer_create($self->screen, bind, usage, size);
+ }
};
};