nv2a: Include attribute data address in LRU key

This commit is contained in:
Matt Borgerson 2021-03-11 04:49:52 -07:00 committed by mborgerson
parent fcb3246d4f
commit 2dbf966a50
2 changed files with 2 additions and 0 deletions

View File

@ -192,6 +192,7 @@ typedef struct VertexKey {
GLuint gl_type;
GLboolean gl_normalize;
size_t stride;
hwaddr addr;
} VertexKey;
typedef struct VertexLruNode {

View File

@ -5709,6 +5709,7 @@ static void pgraph_bind_vertex_attributes(NV2AState *d,
k.gl_type = attribute->gl_type;
k.gl_normalize = attribute->gl_normalize;
k.stride = out_stride;
k.addr = vert_data - d->vram_ptr;
uint64_t h = fast_hash(vert_data, num_elements * in_stride);
LruNode *node = lru_lookup(&pg->vertex_cache, h, &k);