From 305e8106ab81bd1f21dafba5cf0c0eae12e9516d Mon Sep 17 00:00:00 2001 From: Axel Davy Date: Sat, 24 Sep 2016 21:09:08 +0200 Subject: [PATCH] st/nine: Increase MaxVertexBlendMatrixIndex Modern cards do advertise 8. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/adapter9.c | 2 +- src/gallium/state_trackers/nine/nine_ff.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gallium/state_trackers/nine/adapter9.c b/src/gallium/state_trackers/nine/adapter9.c index e967e593938..a58bfc29b0c 100644 --- a/src/gallium/state_trackers/nine/adapter9.c +++ b/src/gallium/state_trackers/nine/adapter9.c @@ -782,7 +782,7 @@ NineAdapter9_GetDeviceCaps( struct NineAdapter9 *This, pCaps->MaxActiveLights = NINE_MAX_LIGHTS_ACTIVE; /* like GL_LIGHTi */ pCaps->MaxUserClipPlanes = PIPE_MAX_CLIP_PLANES; pCaps->MaxVertexBlendMatrices = 4; /* 1 vec4 BLENDWEIGHT/INDICES input */ - pCaps->MaxVertexBlendMatrixIndex = 7; /* D3DTS_WORLDMATRIX(0..7) */ + pCaps->MaxVertexBlendMatrixIndex = 8; /* D3DTS_WORLDMATRIX(0..8) */ pCaps->MaxPointSize = screen->get_paramf(screen, PIPE_CAPF_MAX_POINT_WIDTH); diff --git a/src/gallium/state_trackers/nine/nine_ff.c b/src/gallium/state_trackers/nine/nine_ff.c index be12f2321da..4ede477d4e5 100644 --- a/src/gallium/state_trackers/nine/nine_ff.c +++ b/src/gallium/state_trackers/nine/nine_ff.c @@ -26,7 +26,7 @@ #define DBG_CHANNEL DBG_FF -#define NINE_FF_NUM_VS_CONST 192 +#define NINE_FF_NUM_VS_CONST 196 #define NINE_FF_NUM_PS_CONST 24 struct fvec4 @@ -269,7 +269,7 @@ static void nine_ureg_tgsi_dump(struct ureg_program *ureg, boolean override) * CONST[160] D3DTS_WORLDMATRIX[0] * D3DTS_VIEW * CONST[164] D3DTS_WORLDMATRIX[1] * D3DTS_VIEW * ... - * CONST[188] D3DTS_WORLDMATRIX[7] * D3DTS_VIEW + * CONST[192] D3DTS_WORLDMATRIX[8] * D3DTS_VIEW */ struct vs_build_ctx { @@ -460,7 +460,7 @@ nine_ff_build_vs(struct NineDevice9 *device, struct vs_build_ctx *vs) struct ureg_dst sum_blendweights = ureg_DECL_temporary(ureg); struct ureg_src cWM[4]; - for (i = 160; i <= 191; ++i) + for (i = 160; i <= 195; ++i) ureg_DECL_constant(ureg, i); /* translate world matrix index to constant file index */ @@ -1787,7 +1787,7 @@ nine_ff_load_vs_transforms(struct NineDevice9 *device) if (state->rs[D3DRS_VERTEXBLEND] != D3DVBF_DISABLE) { /* load other world matrices */ - for (i = 1; i <= 7; ++i) { + for (i = 1; i <= 8; ++i) { nine_d3d_matrix_matrix_mul(&M[40 + i], GET_D3DTS(WORLDMATRIX(i)), GET_D3DTS(VIEW)); } } -- 2.30.2