if (!screen->debug.no_cache_index_buffers) {
/* Check if we already have a translated index buffer */
if (src_sbuf->translated_indices.buffer &&
- src_sbuf->translated_indices.orig_prim == PIPE_PRIM_QUADS &&
+ src_sbuf->translated_indices.orig_prim == orig_prim &&
src_sbuf->translated_indices.new_prim == gen_prim &&
src_sbuf->translated_indices.offset == offset &&
src_sbuf->translated_indices.count == orig_nr &&
* again in the future.
*/
pipe_resource_reference(&src_sbuf->translated_indices.buffer, dst);
- src_sbuf->translated_indices.orig_prim = PIPE_PRIM_QUADS;
+ src_sbuf->translated_indices.orig_prim = orig_prim;
src_sbuf->translated_indices.new_prim = gen_prim;
src_sbuf->translated_indices.offset = offset;
src_sbuf->translated_indices.count = orig_nr;