Commit Graph

4 Commits

Author SHA1 Message Date
Jason Ekstrand 8ae03af4ed compiler/blob: Allow for fixed-size blobs with a NULL data pointer
These can be used to easily count up the number of bytes that will be
required by "writing" it into the NULL blob.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2017-10-12 21:47:06 -07:00
Jason Ekstrand 26f6d4e5c7 compiler/blob: Add a concept of a fixed-allocation blob
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2017-10-12 21:47:06 -07:00
Jason Ekstrand 49bb9f785a compiler/blob: Switch to init/finish instead of create/destroy
There's no reason why that tiny bit of memory needs to be on the heap.
We always put blob_reader on the stack, so why not do the same with the
writable blob.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2017-10-12 21:47:06 -07:00
Jason Ekstrand 0e3bd56c6e compiler: Move blob up a level
We're going to want to use the blob for Vulkan pipeline caching so it
makes sense to have it in libcompiler not libglsl.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2017-10-12 21:47:06 -07:00
Renamed from src/compiler/glsl/blob.c (Browse further)