|
|
@ -13,8 +13,8 @@
|
|
|
|
namespace VideoCommon {
|
|
|
|
namespace VideoCommon {
|
|
|
|
|
|
|
|
|
|
|
|
struct ViewParams {
|
|
|
|
struct ViewParams {
|
|
|
|
ViewParams(VideoCore::Surface::SurfaceTarget target, u32 base_layer, u32 num_layers,
|
|
|
|
constexpr explicit ViewParams(VideoCore::Surface::SurfaceTarget target, u32 base_layer,
|
|
|
|
u32 base_level, u32 num_levels)
|
|
|
|
u32 num_layers, u32 base_level, u32 num_levels)
|
|
|
|
: target{target}, base_layer{base_layer}, num_layers{num_layers}, base_level{base_level},
|
|
|
|
: target{target}, base_layer{base_layer}, num_layers{num_layers}, base_level{base_level},
|
|
|
|
num_levels{num_levels} {}
|
|
|
|
num_levels{num_levels} {}
|
|
|
|
|
|
|
|
|
|
|
@ -22,12 +22,6 @@ struct ViewParams {
|
|
|
|
|
|
|
|
|
|
|
|
bool operator==(const ViewParams& rhs) const;
|
|
|
|
bool operator==(const ViewParams& rhs) const;
|
|
|
|
|
|
|
|
|
|
|
|
VideoCore::Surface::SurfaceTarget target{};
|
|
|
|
|
|
|
|
u32 base_layer{};
|
|
|
|
|
|
|
|
u32 num_layers{};
|
|
|
|
|
|
|
|
u32 base_level{};
|
|
|
|
|
|
|
|
u32 num_levels{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool IsLayered() const {
|
|
|
|
bool IsLayered() const {
|
|
|
|
switch (target) {
|
|
|
|
switch (target) {
|
|
|
|
case VideoCore::Surface::SurfaceTarget::Texture1DArray:
|
|
|
|
case VideoCore::Surface::SurfaceTarget::Texture1DArray:
|
|
|
@ -39,13 +33,19 @@ struct ViewParams {
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
VideoCore::Surface::SurfaceTarget target{};
|
|
|
|
|
|
|
|
u32 base_layer{};
|
|
|
|
|
|
|
|
u32 num_layers{};
|
|
|
|
|
|
|
|
u32 base_level{};
|
|
|
|
|
|
|
|
u32 num_levels{};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class ViewBase {
|
|
|
|
class ViewBase {
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
ViewBase(const ViewParams& params) : params{params} {}
|
|
|
|
constexpr explicit ViewBase(const ViewParams& params) : params{params} {}
|
|
|
|
|
|
|
|
|
|
|
|
const ViewParams& GetViewParams() const {
|
|
|
|
constexpr const ViewParams& GetViewParams() const {
|
|
|
|
return params;
|
|
|
|
return params;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|