rendervulkan: Add isYcbcr helper for layers
This commit is contained in:
parent
8d03522dcd
commit
e2bc5d4c71
1 changed files with 10 additions and 5 deletions
|
@ -179,6 +179,14 @@ struct FrameInfo_t
|
||||||
bool blackBorder;
|
bool blackBorder;
|
||||||
bool linearFilter;
|
bool linearFilter;
|
||||||
|
|
||||||
|
bool isYcbcr() const
|
||||||
|
{
|
||||||
|
if ( !tex )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return tex->format() == VK_FORMAT_G8_B8R8_2PLANE_420_UNORM;
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t integerWidth() const { return tex->width() / scale.x; }
|
uint32_t integerWidth() const { return tex->width() / scale.x; }
|
||||||
uint32_t integerHeight() const { return tex->height() / scale.y; }
|
uint32_t integerHeight() const { return tex->height() / scale.y; }
|
||||||
vec2_t offsetPixelCenter() const
|
vec2_t offsetPixelCenter() const
|
||||||
|
@ -202,12 +210,9 @@ struct FrameInfo_t
|
||||||
uint32_t result = 0;
|
uint32_t result = 0;
|
||||||
for (int i = 0; i < layerCount; i++)
|
for (int i = 0; i < layerCount; i++)
|
||||||
{
|
{
|
||||||
if ( layers[ i ].tex )
|
if (layers[ i ].isYcbcr())
|
||||||
{
|
|
||||||
if (layers[ i ].tex->format() == VK_FORMAT_G8_B8R8_2PLANE_420_UNORM)
|
|
||||||
result |= 1 << i;
|
result |= 1 << i;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue