mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
asm: Fix x86 assembly for inverse matrix operations
In commit3175b63a0d, Marek stopped allocating the GLmatrix::inv field with malloc, instead embedding it directly in the structure. So, we need to drop a level of indirection here and use (matrix pointer + MATRIX_INV) as the inverse matrix array directly, rather than reading a pointer at that offset and chasing it. Fixes:3175b63a0d("mesa: don't allocate matrices with malloc") Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7889>
This commit is contained in:
parent
94c6511757
commit
70762b826b
1 changed files with 3 additions and 3 deletions
|
|
@ -57,7 +57,7 @@ GLNAME(_mesa_sse_transform_rescale_normals_no_rot):
|
|||
MOV_L ( ARG_DEST, EDI ) /* ptr to dest GLvector3f */
|
||||
|
||||
MOV_L ( ARG_MAT, EDX ) /* ptr to matrix */
|
||||
MOV_L ( REGOFF(MATRIX_INV, EDX), EDX) /* matrix->inv */
|
||||
ADD_L ( CONST(MATRIX_INV), EDX ) /* matrix->inv */
|
||||
|
||||
MOV_L ( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ GLNAME(_mesa_sse_transform_rescale_normals):
|
|||
MOV_L ( ARG_DEST, EDI ) /* ptr to dest GLvector3f */
|
||||
|
||||
MOV_L ( ARG_MAT, EDX ) /* ptr to matrix */
|
||||
MOV_L ( REGOFF(MATRIX_INV, EDX), EDX) /* matrix->inv */
|
||||
ADD_L ( CONST(MATRIX_INV), EDX ) /* matrix->inv */
|
||||
|
||||
MOV_L ( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */
|
||||
|
||||
|
|
@ -212,7 +212,7 @@ GLNAME(_mesa_sse_transform_normals_no_rot):
|
|||
MOV_L ( ARG_DEST, EDI ) /* ptr to dest GLvector3f */
|
||||
|
||||
MOV_L ( ARG_MAT, EDX ) /* ptr to matrix */
|
||||
MOV_L ( REGOFF(MATRIX_INV, EDX), EDX) /* matrix->inv */
|
||||
ADD_L ( CONST(MATRIX_INV), EDX ) /* matrix->inv */
|
||||
|
||||
MOV_L ( REGOFF(V4F_COUNT, ESI), ECX ) /* source count */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue