From da763c87860a81825758c995b6682ddc2bf765c8 Mon Sep 17 00:00:00 2001 From: bjorn Date: Sat, 30 Dec 2023 19:52:41 -0800 Subject: [PATCH] rm ability to create shaders from tables of spirv opcodes; I don't think anyone was using this, and it adds ambiguity to the newShader argument logic. --- src/api/l_graphics.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/api/l_graphics.c b/src/api/l_graphics.c index f55c98f8..f9d96705 100644 --- a/src/api/l_graphics.c +++ b/src/api/l_graphics.c @@ -976,18 +976,6 @@ static ShaderSource luax_checkshadersource(lua_State* L, int index, ShaderStage luaL_argerror(L, index, "single-line string was not filename or DefaultShader"); } } - } else if (lua_istable(L, index)) { - int length = luax_len(L, index); - source.size = length * sizeof(uint32_t); - uint32_t* words = malloc(source.size); - lovrAssert(words, "Out of memory"); - source.code = words; - *allocated = true; - for (int i = 0; i < length; i++) { - lua_rawgeti(L, index, i + 1); - words[i] = luax_checku32(L, -1); - lua_pop(L, 1); - } } else if (lua_isuserdata(L, index)) { Blob* blob = luax_checktype(L, index, Blob); source.code = blob->data;