summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/python
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/python')
-rw-r--r--src/gallium/state_trackers/python/st_sample.c15
-rw-r--r--src/gallium/state_trackers/python/st_softpipe_winsys.c5
-rwxr-xr-xsrc/gallium/state_trackers/python/tests/base.py2
3 files changed, 12 insertions, 10 deletions
diff --git a/src/gallium/state_trackers/python/st_sample.c b/src/gallium/state_trackers/python/st_sample.c
index 97ca2afc54..9637741421 100644
--- a/src/gallium/state_trackers/python/st_sample.c
+++ b/src/gallium/state_trackers/python/st_sample.c
@@ -30,6 +30,7 @@
#include "pipe/p_format.h"
#include "pipe/p_state.h"
#include "pipe/p_inlines.h"
+#include "util/u_format.h"
#include "util/u_tile.h"
#include "util/u_math.h"
#include "util/u_memory.h"
@@ -461,7 +462,7 @@ st_sample_dxt_pixel_block(enum pipe_format format,
for(ch = 0; ch < 4; ++ch)
rgba[y*rgba_stride + x*4 + ch] = (float)(data[i].rgba[y*4*4 + x*4 + ch])/255.0f;
- memcpy(raw, data[i].raw, pf_get_blocksize(format));
+ memcpy(raw, data[i].raw, util_format_get_blocksize(format));
}
@@ -473,7 +474,7 @@ st_sample_generic_pixel_block(enum pipe_format format,
{
unsigned i;
unsigned x, y, ch;
- int blocksize = pf_get_blocksize(format);
+ int blocksize = util_format_get_blocksize(format);
for(i = 0; i < blocksize; ++i)
raw[i] = (uint8_t)st_random();
@@ -548,11 +549,11 @@ st_sample_surface(struct st_surface *surface, float *rgba)
if (raw) {
enum pipe_format format = texture->format;
uint x, y;
- int nblocksx = pf_get_nblocksx(format, width);
- int nblocksy = pf_get_nblocksy(format, height);
- int blockwidth = pf_get_blockwidth(format);
- int blockheight = pf_get_blockheight(format);
- int blocksize = pf_get_blocksize(format);
+ int nblocksx = util_format_get_nblocksx(format, width);
+ int nblocksy = util_format_get_nblocksy(format, height);
+ int blockwidth = util_format_get_blockwidth(format);
+ int blockheight = util_format_get_blockheight(format);
+ int blocksize = util_format_get_blocksize(format);
for (y = 0; y < nblocksy; ++y) {
diff --git a/src/gallium/state_trackers/python/st_softpipe_winsys.c b/src/gallium/state_trackers/python/st_softpipe_winsys.c
index 43c61af1ff..a3294e877a 100644
--- a/src/gallium/state_trackers/python/st_softpipe_winsys.c
+++ b/src/gallium/state_trackers/python/st_softpipe_winsys.c
@@ -40,6 +40,7 @@
#include "pipe/p_format.h"
#include "pipe/p_context.h"
#include "pipe/p_inlines.h"
+#include "util/u_format.h"
#include "util/u_math.h"
#include "util/u_memory.h"
#include "softpipe/sp_winsys.h"
@@ -168,8 +169,8 @@ st_softpipe_surface_buffer_create(struct pipe_winsys *winsys,
const unsigned alignment = 64;
unsigned nblocksy;
- nblocksy = pf_get_nblocksy(format, height);
- *stride = align(pf_get_stride(format, width), alignment);
+ nblocksy = util_format_get_nblocksy(format, height);
+ *stride = align(util_format_get_stride(format, width), alignment);
return winsys->buffer_create(winsys, alignment,
usage,
diff --git a/src/gallium/state_trackers/python/tests/base.py b/src/gallium/state_trackers/python/tests/base.py
index 202ccfc350..b022d073fd 100755
--- a/src/gallium/state_trackers/python/tests/base.py
+++ b/src/gallium/state_trackers/python/tests/base.py
@@ -47,7 +47,7 @@ for name, value in globals().items():
formats[value] = name
def is_depth_stencil_format(format):
- # FIXME: make and use binding to pf_is_depth_stencil
+ # FIXME: make and use binding to util_format_is_depth_or_stencil
return format in (
PIPE_FORMAT_Z32_UNORM,
PIPE_FORMAT_Z24S8_UNORM,