mirror of https://github.com/bjornbytes/lovr.git
Always enable fullIndexBufferRange feature;
This commit is contained in:
parent
0ee4a105c5
commit
be1cedc922
|
@ -46,7 +46,6 @@ static int l_lovrGraphicsGetFeatures(lua_State* L) {
|
|||
lua_pushboolean(L, features.depthClamp), lua_setfield(L, -2, "depthClamp");
|
||||
lua_pushboolean(L, features.clipDistance), lua_setfield(L, -2, "clipDistance");
|
||||
lua_pushboolean(L, features.cullDistance), lua_setfield(L, -2, "cullDistance");
|
||||
lua_pushboolean(L, features.fullIndexBufferRange), lua_setfield(L, -2, "fullIndexBufferRange");
|
||||
lua_pushboolean(L, features.indirectDrawFirstInstance), lua_setfield(L, -2, "indirectDrawFirstInstance");
|
||||
lua_pushboolean(L, features.dynamicIndexing), lua_setfield(L, -2, "dynamicIndexing");
|
||||
lua_pushboolean(L, features.float64), lua_setfield(L, -2, "float64");
|
||||
|
|
|
@ -6,7 +6,7 @@ typedef struct {
|
|||
uint32_t serial;
|
||||
uint32_t vendor;
|
||||
uint32_t version;
|
||||
const char name[256];
|
||||
char name[256];
|
||||
const char* renderer;
|
||||
uint32_t subgroupSize;
|
||||
} gpu_device;
|
||||
|
@ -18,7 +18,6 @@ typedef struct {
|
|||
bool depthClamp;
|
||||
bool clipDistance;
|
||||
bool cullDistance;
|
||||
bool fullIndexBufferRange;
|
||||
bool indirectDrawFirstInstance;
|
||||
bool dynamicIndexing;
|
||||
bool float64;
|
||||
|
|
|
@ -272,14 +272,12 @@ bool gpu_init(gpu_config* config) {
|
|||
}
|
||||
|
||||
VkPhysicalDeviceShaderDrawParameterFeatures shaderDrawParameterFeatures = {
|
||||
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES,
|
||||
.shaderDrawParameters = true
|
||||
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES
|
||||
};
|
||||
|
||||
VkPhysicalDeviceMultiviewFeatures multiviewFeatures = {
|
||||
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES,
|
||||
.pNext = &shaderDrawParameterFeatures,
|
||||
.multiview = true
|
||||
.pNext = &shaderDrawParameterFeatures
|
||||
};
|
||||
|
||||
VkPhysicalDeviceFeatures2 enabledFeatures = {
|
||||
|
@ -293,7 +291,12 @@ bool gpu_init(gpu_config* config) {
|
|||
VkPhysicalDeviceFeatures* supports = &features2.features;
|
||||
vkGetPhysicalDeviceFeatures2(state.adapter, &features2);
|
||||
|
||||
// Internal features (they are exposed as limits)
|
||||
// Required features
|
||||
enable->fullDrawIndexUint32 = true;
|
||||
multiviewFeatures.multiview = true;
|
||||
shaderDrawParameterFeatures.shaderDrawParameters = true;
|
||||
|
||||
// Internal features (exposed as limits)
|
||||
enable->samplerAnisotropy = supports->samplerAnisotropy;
|
||||
enable->multiDrawIndirect = supports->multiDrawIndirect;
|
||||
enable->largePoints = supports->largePoints;
|
||||
|
@ -305,7 +308,6 @@ bool gpu_init(gpu_config* config) {
|
|||
config->features->depthClamp = enable->depthClamp = supports->depthClamp;
|
||||
config->features->clipDistance = enable->shaderClipDistance = supports->shaderClipDistance;
|
||||
config->features->cullDistance = enable->shaderCullDistance = supports->shaderCullDistance;
|
||||
config->features->fullIndexBufferRange = enable->fullDrawIndexUint32 = supports->fullDrawIndexUint32;
|
||||
config->features->indirectDrawFirstInstance = enable->drawIndirectFirstInstance = supports->drawIndirectFirstInstance;
|
||||
config->features->float64 = enable->shaderFloat64 = supports->shaderFloat64;
|
||||
config->features->int64 = enable->shaderInt64 = supports->shaderInt64;
|
||||
|
|
|
@ -58,7 +58,6 @@ void lovrGraphicsGetFeatures(GraphicsFeatures* features) {
|
|||
features->depthClamp = state.features.depthClamp;
|
||||
features->clipDistance = state.features.clipDistance;
|
||||
features->cullDistance = state.features.cullDistance;
|
||||
features->fullIndexBufferRange = state.features.fullIndexBufferRange;
|
||||
features->indirectDrawFirstInstance = state.features.indirectDrawFirstInstance;
|
||||
features->dynamicIndexing = state.features.dynamicIndexing;
|
||||
features->float64 = state.features.float64;
|
||||
|
|
Loading…
Reference in New Issue