mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-11 07:00:31 +01:00
clover: Add a pixel_size() method to the image class.
Tested-by: Tom Stellard <thomas.stellard@amd.com>
This commit is contained in:
parent
6230f77232
commit
adefa84d66
2 changed files with 7 additions and 0 deletions
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include "core/memory.hpp"
|
||||
#include "core/resource.hpp"
|
||||
#include "util/u_format.h"
|
||||
|
||||
using namespace clover;
|
||||
|
||||
|
|
@ -165,6 +166,11 @@ image::depth() const {
|
|||
return _depth;
|
||||
}
|
||||
|
||||
size_t
|
||||
image::pixel_size() const {
|
||||
return util_format_get_blocksize(translate_format(_format));
|
||||
}
|
||||
|
||||
size_t
|
||||
image::row_pitch() const {
|
||||
return _row_pitch;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue