16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 15:49:19 +02:00

squash commits from internal:

use gfx queue when loading dynamic textures
fix possible timeout in light culling
exclude lods & transparencies from lod test
add cpu-side submodel structure for ray testing
This commit is contained in:
Wls50
2025-11-16 19:00:38 +01:00
parent 392ca6987c
commit 596ff9d5c2
10 changed files with 250 additions and 27 deletions

View File

@@ -386,12 +386,12 @@ bool NvTexture::CreateRhiTexture() {
.setHeight(m_height)
.setMipLevels(m_data.size())
.setFormat(m_format)
.setInitialState(nvrhi::ResourceStates::CopyDest)
.setInitialState(nvrhi::ResourceStates::ShaderResource)
.setKeepInitialState(true));
nvrhi::CommandListHandle command_list =
backend->GetDevice()->createCommandList(
nvrhi::CommandListParameters()
.setQueueType(nvrhi::CommandQueue::Copy)
.setQueueType(nvrhi::CommandQueue::Graphics)
.setEnableImmediateExecution(false));
command_list->open();
for (int mip = 0; mip < m_data.size(); ++mip) {
@@ -400,7 +400,7 @@ bool NvTexture::CreateRhiTexture() {
}
command_list->close();
backend->GetDevice()->executeCommandList(command_list,
nvrhi::CommandQueue::Copy);
nvrhi::CommandQueue::Graphics);
if (m_sz_texture->get_type() == "make:") {
auto const components{Split(std::string(m_sz_texture->get_name()), '?')};