mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-14 11:22:51 +00:00
texture_cache: correct texture buffer on surface params
This commit is contained in:
parent
b01f9c8a70
commit
a56f687793
|
@ -74,10 +74,17 @@ SurfaceParams SurfaceParams::CreateForTexture(Core::System& system,
|
||||||
params.component_type = ComponentTypeFromTexture(config.tic.r_type.Value());
|
params.component_type = ComponentTypeFromTexture(config.tic.r_type.Value());
|
||||||
params.type = GetFormatType(params.pixel_format);
|
params.type = GetFormatType(params.pixel_format);
|
||||||
// TODO: on 1DBuffer we should use the tic info.
|
// TODO: on 1DBuffer we should use the tic info.
|
||||||
params.target = TextureType2SurfaceTarget(entry.GetType(), entry.IsArray());
|
if (!config.tic.IsBuffer()) {
|
||||||
params.width = config.tic.Width();
|
params.target = TextureType2SurfaceTarget(entry.GetType(), entry.IsArray());
|
||||||
params.height = config.tic.Height();
|
params.width = config.tic.Width();
|
||||||
params.depth = config.tic.Depth();
|
params.height = config.tic.Height();
|
||||||
|
params.depth = config.tic.Depth();
|
||||||
|
} else {
|
||||||
|
params.target = SurfaceTarget::TextureBuffer;
|
||||||
|
params.width = config.tic.Width();
|
||||||
|
params.height = 0;
|
||||||
|
params.depth = 0;
|
||||||
|
}
|
||||||
if (params.target == SurfaceTarget::TextureCubemap ||
|
if (params.target == SurfaceTarget::TextureCubemap ||
|
||||||
params.target == SurfaceTarget::TextureCubeArray) {
|
params.target == SurfaceTarget::TextureCubeArray) {
|
||||||
params.depth *= 6;
|
params.depth *= 6;
|
||||||
|
|
Loading…
Reference in a new issue