Jason Ekstrand
4f5bbf804b
anv/pipeline_cache: Allow for an zero-sized cache
...
This gets ANV_ENABLE_PIPELINE_CACHE=false working again.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net >
Cc: "12.0" <mesa-stable@lists.freedesktop.org >
2016-06-10 09:43:10 -07:00
Jason Ekstrand
ffcef720b7
anv/pipeline: Add support for caching the push constant map
...
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net >
2016-06-06 00:44:32 -07:00
Kristian Høgsberg Kristensen
34326f46df
anv: Turn pipeline cache on by default
...
Move the environment variable check to cache creation time so we block
both lookups and uploads if it's turned off.
2016-03-05 13:54:24 -08:00
Kristian Høgsberg Kristensen
f2b37132cb
anv: Check if shader if present before uploading to cache
...
Between the initial check the returns NO_KERNEL and compiling the
shader, other threads may have added the shader to the cache. Before
uploading the kernel, check again (under the mutex) that the compiled
shader still isn't present.
2016-03-05 13:54:24 -08:00
Kristian Høgsberg Kristensen
6139fe9a77
anv: Also cache the struct anv_pipeline_binding maps
...
This is state the we generate when compiling the shaders and we need it
for mapping resources from descriptor sets to binding table indices.
2016-03-05 13:50:07 -08:00
Kristian Høgsberg Kristensen
584f39c65e
anv: Don't re-upload shaders when merging
...
Using anv_pipeline_cache_upload_kernel() will re-upload the kernel and
prog_data when we merge caches. Since the kernel and prog_data is
already in the program_stream, use anv_pipeline_cache_add_entry()
instead to only add the entry to the hash table.
2016-03-05 13:50:07 -08:00
Kristian Høgsberg Kristensen
626559ed37
anv: Add anv_pipeline_cache_add_entry()
...
This function will grow the cache to make room and then add the entry.
2016-03-05 13:50:07 -08:00
Kristian Høgsberg Kristensen
07441c344c
anv: Rename anv_pipeline_cache_add_entry() to 'set'
...
This function is a helper that unconditionally sets a hash table entry
and expects the cache to have enough room. Calling it 'add_entry'
suggests it will grow the cache as needed.
2016-03-05 13:50:07 -08:00
Kristian Høgsberg Kristensen
2b29342fae
anv: Store prog data in pipeline cache stream
...
We have to keep it there for the cache to work, so let's not have an
extra copy in struct anv_pipeline too.
2016-03-05 13:50:07 -08:00
Kristian Høgsberg Kristensen
37c5e70253
anv: Rename 'table' to 'hash_table' in anv_pipeline_cache
...
A little less ambiguous.
2016-03-05 13:50:07 -08:00
Kristian Høgsberg Kristensen
c028ffea70
anv: Serialize as much pipeline cache as we can
...
We can serialize as much as the application asks for and just stop once
we run out of memory. This lets applications use a fixed amount of
space for caching and still get some benefit.
2016-03-05 13:50:07 -08:00
Kristian Høgsberg Kristensen
cd812f086e
anv: Use 1.0 pipeline cache header
...
The final version of the pipeline cache header adds a few more fields.
2016-03-05 13:50:07 -08:00
Kristian Høgsberg Kristensen
26ed943eb9
anv: Fix shader key hashing
...
This was copied from inline code to a helper and wasn't updated to hash
a pointer instead.
2016-03-05 13:50:07 -08:00
Kristian Høgsberg Kristensen
3baf8af947
anv: Remove excess whitespace
2016-03-05 13:50:07 -08:00
Jason Ekstrand
9851c8285f
Move the intel vulkan driver to src/intel/vulkan
2016-02-18 10:37:59 -08:00