add debugname to settings table for texture and buffer,
which can be used for debugging in e.g. RenderDoc.
This commit is contained in:
niki
2023-12-13 14:28:34 +01:00
parent 8951635abc
commit a5d7ba1589
14 changed files with 76 additions and 0 deletions
+11
View File
@@ -738,6 +738,13 @@ static void luax_checktexturesettings(lua_State *L, int idx, bool opt, bool chec
if (!forceRenderTarget.hasValue)
s.renderTarget = luax_boolflag(L, idx, Texture::getConstant(Texture::SETTING_RENDER_TARGET), s.renderTarget);
lua_getfield(L, idx, Texture::getConstant(Texture::SETTING_DEBUGNAME));
if (!lua_isnoneornil(L, -1))
{
s.debugName = luaL_checkstring(L, -1);
}
lua_pop(L, 1);
lua_getfield(L, idx, Texture::getConstant(Texture::SETTING_FORMAT));
if (!lua_isnoneornil(L, -1))
{
@@ -1569,6 +1576,10 @@ static void luax_optbuffersettings(lua_State *L, int idx, Buffer::Settings &sett
lua_getfield(L, idx, "usage");
settings.dataUsage = luax_optdatausage(L, -1, settings.dataUsage);
lua_getfield(L, idx, "debugname");
settings.debugName = luax_checkstring(L, -1);
lua_pop(L, 1);
}