mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
radeonsi: don't always strip NIR debug infos
When using NIR_DEBUG=print, always having shader names help debugging. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16247>
This commit is contained in:
parent
ce7966fcb4
commit
f1f2d407e7
1 changed files with 5 additions and 2 deletions
|
|
@ -154,7 +154,8 @@ void si_get_ir_cache_key(struct si_shader_selector *sel, bool ngg, bool es,
|
|||
assert(sel->nir);
|
||||
|
||||
blob_init(&blob);
|
||||
nir_serialize(&blob, sel->nir, true);
|
||||
/* Keep debug info if NIR debug prints are in use. */
|
||||
nir_serialize(&blob, sel->nir, NIR_DEBUG(PRINT) == 0);
|
||||
ir_binary = blob.data;
|
||||
ir_size = blob.size;
|
||||
}
|
||||
|
|
@ -2846,8 +2847,10 @@ static void si_init_shader_selector_async(void *job, void *gdata, int thread_ind
|
|||
/* true = remove optional debugging data to increase
|
||||
* the likehood of getting more shader cache hits.
|
||||
* It also drops variable names, so we'll save more memory.
|
||||
* If NIR debug prints are used we don't strip to get more
|
||||
* useful logs.
|
||||
*/
|
||||
nir_serialize(&blob, sel->nir, true);
|
||||
nir_serialize(&blob, sel->nir, NIR_DEBUG(PRINT) == 0);
|
||||
blob_finish_get_buffer(&blob, &sel->nir_binary, &size);
|
||||
sel->nir_size = size;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue