mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-22 15:00:22 +01:00
nvk: Enable cbufs
Just in case this breaks and blows up the universe, we'll add a NO_CBUFS debug flag as a back-door. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
This commit is contained in:
parent
d41fe63d99
commit
45f320e97f
3 changed files with 12 additions and 2 deletions
|
|
@ -80,18 +80,20 @@ use_nak(const struct nvk_physical_device *pdev, gl_shader_stage stage)
|
|||
uint64_t
|
||||
nvk_physical_device_compiler_flags(const struct nvk_physical_device *pdev)
|
||||
{
|
||||
bool no_cbufs = pdev->debug_flags & NVK_DEBUG_NO_CBUF;
|
||||
uint64_t prog_debug = nvk_cg_get_prog_debug();
|
||||
uint64_t prog_optimize = nvk_cg_get_prog_optimize();
|
||||
uint64_t nak_stages = nvk_nak_stages(&pdev->info);
|
||||
uint64_t nak_flags = nak_debug_flags(pdev->nak);
|
||||
|
||||
assert(prog_debug <= UINT8_MAX);
|
||||
assert(prog_optimize <= UINT8_MAX);
|
||||
assert(prog_optimize < 16);
|
||||
assert(nak_stages <= UINT32_MAX);
|
||||
assert(nak_flags <= UINT16_MAX);
|
||||
|
||||
return prog_debug
|
||||
| (prog_optimize << 8)
|
||||
| ((uint64_t)no_cbufs << 12)
|
||||
| (nak_stages << 16)
|
||||
| (nak_flags << 48);
|
||||
}
|
||||
|
|
@ -350,7 +352,8 @@ nvk_lower_nir(struct nvk_device *dev, nir_shader *nir,
|
|||
assert(dev->pdev->info.cls_eng3d >= MAXWELL_A || !nir_has_image_var(nir));
|
||||
|
||||
struct nvk_cbuf_map *cbuf_map = NULL;
|
||||
if (use_nak(pdev, nir->info.stage) && 0) {
|
||||
if (use_nak(pdev, nir->info.stage) &&
|
||||
!(pdev->debug_flags & NVK_DEBUG_NO_CBUF)) {
|
||||
cbuf_map = &shader->cbuf_map;
|
||||
} else {
|
||||
/* Codegen sometimes puts stuff in cbuf 1 and adds 1 to our cbuf indices
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@ nouveau_ws_device_set_dbg_flags(struct nouveau_ws_device *dev)
|
|||
{ "push_sync", NVK_DEBUG_PUSH_SYNC },
|
||||
{ "zero_memory", NVK_DEBUG_ZERO_MEMORY },
|
||||
{ "vm", NVK_DEBUG_VM },
|
||||
{ "no_cbuf", NVK_DEBUG_NO_CBUF },
|
||||
{ NULL, 0 },
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,12 @@ enum nvk_debug {
|
|||
/* Dump VM bind/unbinds
|
||||
*/
|
||||
NVK_DEBUG_VM = 1ull << 3,
|
||||
|
||||
/* Disable most cbufs
|
||||
*
|
||||
* Root descriptors still end up in a cbuf
|
||||
*/
|
||||
NVK_DEBUG_NO_CBUF = 1ull << 5,
|
||||
};
|
||||
|
||||
struct nouveau_ws_device {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue