[nvdrv] fix

This commit is contained in:
lizzie 2025-07-19 08:53:08 +01:00
parent c0d2bbdcd5
commit 4c5df8c039

View file

@ -264,10 +264,10 @@ NvResult nvhost_ctrl_gpu::ZBCQueryTable(IoctlZbcQueryTable& params) {
u32_le index_size;
} entry = {};
std::memset(&entry, 0, sizeof(entry));
auto const index = param.index_size;
auto const index = params.index_size;
if (params.type == 0) { //no
entry.index_size = 15;
} else if (param.type == 1) { //color
} else if (params.type == 1) { //color
ASSERT(index < 16);
for (auto i = 0; i < 4; ++i) {
params.color_ds[i] = this->color_entries[index].color_ds[i];
@ -275,13 +275,13 @@ NvResult nvhost_ctrl_gpu::ZBCQueryTable(IoctlZbcQueryTable& params) {
}
// TODO: Only if no error thrown (otherwise dont modify)
params.format = this->color_entries[index].format;
params.ref_cnt = this->color_entries[index].ref_cnt;
} else if (param.type == 2) { //depth
//params.ref_cnt = this->color_entries[index].ref_cnt;
} else if (params.type == 2) { //depth
ASSERT(index < 16);
params.depth = this->depth_entries[index].depth;
// TODO: Only if no error thrown (otherwise dont modify)
params.format = this->depth_entries[index].format;
params.ref_cnt = this->depth_entries[index].ref_cnt;
//params.ref_cnt = this->depth_entries[index].ref_cnt;
} else {
UNREACHABLE();
}