summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/clover/core/memory.cpp6
-rw-r--r--src/gallium/state_trackers/clover/core/memory.hpp1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/clover/core/memory.cpp b/src/gallium/state_trackers/clover/core/memory.cpp
index 1c38597215f..87a9f7a5488 100644
--- a/src/gallium/state_trackers/clover/core/memory.cpp
+++ b/src/gallium/state_trackers/clover/core/memory.cpp
@@ -22,6 +22,7 @@
#include "core/memory.hpp"
#include "core/resource.hpp"
+#include "util/u_format.h"
using namespace clover;
@@ -166,6 +167,11 @@ image::depth() const {
}
size_t
+image::pixel_size() const {
+ return util_format_get_blocksize(translate_format(_format));
+}
+
+size_t
image::row_pitch() const {
return _row_pitch;
}
diff --git a/src/gallium/state_trackers/clover/core/memory.hpp b/src/gallium/state_trackers/clover/core/memory.hpp
index 5b179ac8413..6ccf3da58b5 100644
--- a/src/gallium/state_trackers/clover/core/memory.hpp
+++ b/src/gallium/state_trackers/clover/core/memory.hpp
@@ -120,6 +120,7 @@ namespace clover {
size_t width() const;
size_t height() const;
size_t depth() const;
+ size_t pixel_size() const;
size_t row_pitch() const;
size_t slice_pitch() const;