lp_jit: use pipe max for the lp_jit texture levels.

Align this with draw, so we the structs can be shared.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18265>
This commit is contained in:
Dave Airlie 2022-08-26 16:31:43 +10:00 committed by Marge Bot
parent af214c233b
commit 5f22f35590
2 changed files with 4 additions and 4 deletions

View file

@ -61,7 +61,7 @@ create_jit_texture_type(struct gallivm_state *gallivm)
elem_types[LP_JIT_TEXTURE_ROW_STRIDE] =
elem_types[LP_JIT_TEXTURE_IMG_STRIDE] =
elem_types[LP_JIT_TEXTURE_MIP_OFFSETS] =
LLVMArrayType(LLVMInt32TypeInContext(lc), LP_MAX_TEXTURE_LEVELS);
LLVMArrayType(LLVMInt32TypeInContext(lc), PIPE_MAX_TEXTURE_LEVELS);
texture_type = LLVMStructTypeInContext(lc, elem_types,
ARRAY_SIZE(elem_types), 0);

View file

@ -57,11 +57,11 @@ struct lp_jit_texture
uint32_t height;
uint32_t depth; /* doubles as array size */
const void *base;
uint32_t row_stride[LP_MAX_TEXTURE_LEVELS];
uint32_t img_stride[LP_MAX_TEXTURE_LEVELS];
uint32_t row_stride[PIPE_MAX_TEXTURE_LEVELS];
uint32_t img_stride[PIPE_MAX_TEXTURE_LEVELS];
uint32_t first_level;
uint32_t last_level;
uint32_t mip_offsets[LP_MAX_TEXTURE_LEVELS];
uint32_t mip_offsets[PIPE_MAX_TEXTURE_LEVELS];
uint32_t num_samples;
uint32_t sample_stride;
};