DRW: Refactor to support draw call batching

Reviewers: brecht

Differential Revision: D4997
This commit is contained in:
2019-05-31 01:45:41 +02:00
parent 41299bce93
commit 3a08153d7a
57 changed files with 2299 additions and 1272 deletions

View File

@@ -248,6 +248,9 @@ static void gpu_shader_standard_extensions(char defines[MAX_EXT_DEFINE_LENGTH])
/* a #version 400 feature, but we use #version 330 maximum so use extension */
strcat(defines, "#extension GL_ARB_texture_query_lod: enable\n");
}
if (GLEW_ARB_shader_draw_parameters) {
strcat(defines, "#extension GL_ARB_shader_draw_parameters : enable\n");
}
}
static void gpu_shader_standard_defines(char defines[MAX_DEFINE_LENGTH])
@@ -255,6 +258,9 @@ static void gpu_shader_standard_defines(char defines[MAX_DEFINE_LENGTH])
/* some useful defines to detect GPU type */
if (GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_ANY, GPU_DRIVER_ANY)) {
strcat(defines, "#define GPU_ATI\n");
if (GPU_crappy_amd_driver()) {
strcat(defines, "#define GPU_CRAPPY_AMD_DRIVER\n");
}
}
else if (GPU_type_matches(GPU_DEVICE_NVIDIA, GPU_OS_ANY, GPU_DRIVER_ANY)) {
strcat(defines, "#define GPU_NVIDIA\n");