summaryrefslogtreecommitdiffstats
path: root/src/video_core/color.h
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2015-03-09 03:31:15 +0100
committerSubv <subv2112@gmail.com>2015-03-10 02:13:21 +0100
commit1248e291f0c9a29734b0f5175df8fa675cce930c (patch)
tree18218cbe496e5a2f42022a5e6741fa0665218874 /src/video_core/color.h
parentFrontend/Qt: Allow the framebuffer widget to inspect the depth buffer (diff)
downloadyuzu-1248e291f0c9a29734b0f5175df8fa675cce930c.tar
yuzu-1248e291f0c9a29734b0f5175df8fa675cce930c.tar.gz
yuzu-1248e291f0c9a29734b0f5175df8fa675cce930c.tar.bz2
yuzu-1248e291f0c9a29734b0f5175df8fa675cce930c.tar.lz
yuzu-1248e291f0c9a29734b0f5175df8fa675cce930c.tar.xz
yuzu-1248e291f0c9a29734b0f5175df8fa675cce930c.tar.zst
yuzu-1248e291f0c9a29734b0f5175df8fa675cce930c.zip
Diffstat (limited to 'src/video_core/color.h')
-rw-r--r--src/video_core/color.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/video_core/color.h b/src/video_core/color.h
index 35b56efc0..14ade74f2 100644
--- a/src/video_core/color.h
+++ b/src/video_core/color.h
@@ -105,7 +105,7 @@ inline const Math::Vec4<u8> DecodeRGBA4(const u8* bytes) {
* @param bytes Pointer to encoded source value
* @return Depth value as an u32
*/
-inline const u32 DecodeD16(const u8* bytes) {
+inline u32 DecodeD16(const u8* bytes) {
return *reinterpret_cast<const u16_le*>(bytes);
}
@@ -114,7 +114,7 @@ inline const u32 DecodeD16(const u8* bytes) {
* @param bytes Pointer to encoded source value
* @return Depth value as an u32
*/
-inline const u32 DecodeD24(const u8* bytes) {
+inline u32 DecodeD24(const u8* bytes) {
return (bytes[2] << 16) | (bytes[1] << 8) | bytes[0];
}
@@ -181,8 +181,8 @@ inline void EncodeRGBA4(const Math::Vec4<u8>& color, u8* bytes) {
}
/**
- * Encode a depth value as D16 format
- * @param value Source depth value to encode
+ * Encode a 16 bit depth value as D16 format
+ * @param value 16 bit source depth value to encode
* @param bytes Pointer where to store the encoded value
*/
inline void EncodeD16(u32 value, u8* bytes) {
@@ -190,8 +190,8 @@ inline void EncodeD16(u32 value, u8* bytes) {
}
/**
- * Encode a depth value as D24 format
- * @param value Source depth value to encode
+ * Encode a 24 bit depth value as D24 format
+ * @param value 24 bit source depth value to encode
* @param bytes Pointer where to store the encoded value
*/
inline void EncodeD24(u32 value, u8* bytes) {
@@ -201,9 +201,9 @@ inline void EncodeD24(u32 value, u8* bytes) {
}
/**
- * Encode depth and stencil values as D24S8 format
- * @param depth Source depth values to encode
- * @param stencil Source stencil value to encode
+ * Encode a 24 bit depth and 8 bit stencil values as D24S8 format
+ * @param depth 24 bit source depth value to encode
+ * @param stencil 8 bit source stencil value to encode
* @param bytes Pointer where to store the encoded value
*/
inline void EncodeD24S8(u32 depth, u8 stencil, u8* bytes) {