Skip to content

Commit fc4296c

Browse files
Northfearslouken
authored andcommitted
Use aligned stride in sceGxmColorSurfaceInit
1 parent 7080bc2 commit fc4296c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/render/vitagxm/SDL_render_vita_gxm_tools.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,7 @@ create_gxm_texture(VITA_GXM_RenderData *data, unsigned int w, unsigned int h, Sc
10561056
const uint32_t alignedHeight = ALIGN(h, SCE_GXM_TILE_SIZEY);
10571057
uint32_t sampleCount = alignedWidth*alignedHeight;
10581058
uint32_t depthStrideInSamples = alignedWidth;
1059+
const uint32_t alignedColorSurfaceStride = ALIGN(w, 8);
10591060

10601061
int err = sceGxmColorSurfaceInit(
10611062
&texture->gxm_colorsurface,
@@ -1065,7 +1066,7 @@ create_gxm_texture(VITA_GXM_RenderData *data, unsigned int w, unsigned int h, Sc
10651066
SCE_GXM_OUTPUT_REGISTER_SIZE_32BIT,
10661067
w,
10671068
h,
1068-
w,
1069+
alignedColorSurfaceStride,
10691070
texture_data
10701071
);
10711072

0 commit comments

Comments
 (0)