Skip to content

Commit c678433

Browse files
authored
nv2a/vk: Set addressModeW only for 3D textures
1 parent 442ce64 commit c678433

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hw/xbox/nv2a/pgraph/vk/texture.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,8 +1344,8 @@ static void create_texture(PGRAPHState *pg, int texture_idx)
13441344
GET_MASK(address, NV_PGRAPH_TEXADDRESS0_ADDRU)),
13451345
.addressModeV = lookup_texture_address_mode(
13461346
GET_MASK(address, NV_PGRAPH_TEXADDRESS0_ADDRV)),
1347-
.addressModeW = lookup_texture_address_mode(
1348-
GET_MASK(address, NV_PGRAPH_TEXADDRESS0_ADDRP)),
1347+
.addressModeW = (state.dimensionality > 2) ? lookup_texture_address_mode(
1348+
GET_MASK(address, NV_PGRAPH_TEXADDRESS0_ADDRP)) : 0,
13491349
.anisotropyEnable = VK_FALSE,
13501350
// .anisotropyEnable = VK_TRUE,
13511351
// .maxAnisotropy = properties.limits.maxSamplerAnisotropy,

0 commit comments

Comments
 (0)