Ping? I'm just adding `const` to make it easier to read and understand the code, and allow the compiler to tell us if we make a mistake and start modifying things shouldn't.
On Tuesday, 2018-08-07 12:02:53 +0100, Eric Engestrom wrote: > Signed-off-by: Eric Engestrom <eric.engest...@intel.com> > --- > v2: forgot the hunk that was the point of this :facepalm: > --- > src/mesa/drivers/dri/i965/brw_program_cache.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_program_cache.c > b/src/mesa/drivers/dri/i965/brw_program_cache.c > index 600b0611c8b89095e393..a9a21d911612f9218e2a 100644 > --- a/src/mesa/drivers/dri/i965/brw_program_cache.c > +++ b/src/mesa/drivers/dri/i965/brw_program_cache.c > @@ -142,11 +142,11 @@ brw_cache_item_equals(const struct brw_cache_item *a, > (memcmp(a->key, b->key, a->key_size) == 0); > } > > -static struct brw_cache_item * > -search_cache(struct brw_cache *cache, GLuint hash, > - struct brw_cache_item *lookup) > +static const struct brw_cache_item * > +search_cache(const struct brw_cache *cache, GLuint hash, > + const struct brw_cache_item *lookup) > { > - struct brw_cache_item *c; > + const struct brw_cache_item *c; > > #if 0 > int bucketcount = 0; > @@ -194,11 +194,11 @@ rehash(struct brw_cache *cache) > * Returns the buffer object matching cache_id and key, or NULL. > */ > bool > -brw_search_cache(struct brw_cache *cache, enum brw_cache_id cache_id, > +brw_search_cache(const struct brw_cache *cache, enum brw_cache_id cache_id, > const void *key, GLuint key_size, uint32_t *inout_offset, > void *inout_prog_data, bool flag_state) > { > - struct brw_cache_item *item; > + const struct brw_cache_item *item; > struct brw_cache_item lookup; > GLuint hash; > > -- > Cheers, > Eric > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev