mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 22:40:09 +01:00
pco: store additional metadata for precompiled shaders
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37439>
This commit is contained in:
parent
96e4026273
commit
7855446a51
2 changed files with 9 additions and 1 deletions
|
|
@ -305,10 +305,14 @@ pco_precomp_data pco_get_precomp_data(pco_shader *shader)
|
|||
{
|
||||
assert(pco_shader_binary_size(shader));
|
||||
|
||||
unsigned size_dwords = pco_shader_binary_size(shader) / sizeof(uint32_t);
|
||||
assert(size_dwords <= UINT16_MAX);
|
||||
|
||||
return (pco_precomp_data){
|
||||
.temps = shader->data.common.temps,
|
||||
.vtxins = shader->data.common.vtxins,
|
||||
.coeffs = shader->data.common.coeffs,
|
||||
.shareds = shader->data.common.shareds,
|
||||
.size_dwords = size_dwords,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -241,7 +241,11 @@ typedef struct PACKED _pco_precomp_data {
|
|||
uint16_t coeffs : 12;
|
||||
uint16_t shareds : 12;
|
||||
|
||||
uint8_t pad[3];
|
||||
uint16_t size_dwords;
|
||||
|
||||
uint8_t pad[1];
|
||||
|
||||
uint32_t binary[];
|
||||
} pco_precomp_data;
|
||||
static_assert(sizeof(pco_precomp_data) == 8, "sizeof(pco_precomp_data) != 8");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue