2022-02-11 09:07:11 +11:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
* Copyright 2005 Blender Foundation. All rights reserved. */
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
|
* \ingroup gpu
|
2020-09-07 19:35:56 +02:00
|
|
|
*
|
|
|
|
|
* GPU Capabilities & workarounds
|
|
|
|
|
* This module expose the reported implementation limits & enabled
|
2021-08-26 12:27:14 +10:00
|
|
|
* workaround for drivers that needs specific code-paths.
|
2011-02-21 06:58:46 +00:00
|
|
|
*/
|
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#pragma once
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2015-03-16 22:57:56 -04:00
|
|
|
int GPU_max_texture_size(void);
|
2018-07-27 14:15:45 +02:00
|
|
|
int GPU_max_texture_layers(void);
|
2015-12-06 21:20:19 +01:00
|
|
|
int GPU_max_textures(void);
|
2018-09-18 14:22:42 +02:00
|
|
|
int GPU_max_textures_vert(void);
|
|
|
|
|
int GPU_max_textures_geom(void);
|
|
|
|
|
int GPU_max_textures_frag(void);
|
2021-05-28 08:16:26 +02:00
|
|
|
int GPU_max_work_group_count(int index);
|
|
|
|
|
int GPU_max_work_group_size(int index);
|
2021-05-14 11:15:00 -03:00
|
|
|
int GPU_max_uniforms_vert(void);
|
|
|
|
|
int GPU_max_uniforms_frag(void);
|
|
|
|
|
int GPU_max_batch_indices(void);
|
|
|
|
|
int GPU_max_batch_vertices(void);
|
|
|
|
|
int GPU_max_vertex_attribs(void);
|
|
|
|
|
int GPU_max_varying_floats(void);
|
2022-03-15 16:04:41 +01:00
|
|
|
int GPU_max_shader_storage_buffer_bindings(void);
|
2021-05-14 11:15:00 -03:00
|
|
|
|
|
|
|
|
int GPU_extensions_len(void);
|
|
|
|
|
const char *GPU_extension_get(int i);
|
2020-09-07 19:35:56 +02:00
|
|
|
|
2021-02-08 15:42:59 +01:00
|
|
|
int GPU_texture_size_with_limit(int res, bool limit_gl_texture_size);
|
2020-09-07 19:35:56 +02:00
|
|
|
|
2018-10-22 12:58:11 +02:00
|
|
|
bool GPU_mip_render_workaround(void);
|
2018-10-25 21:57:40 +02:00
|
|
|
bool GPU_depth_blitting_workaround(void);
|
2020-08-05 15:26:49 +02:00
|
|
|
bool GPU_use_main_context_workaround(void);
|
2021-01-04 11:41:54 +01:00
|
|
|
bool GPU_use_hq_normals_workaround(void);
|
2019-03-04 10:18:57 -03:00
|
|
|
bool GPU_crappy_amd_driver(void);
|
2015-03-16 22:57:56 -04:00
|
|
|
|
2021-05-26 16:49:17 +02:00
|
|
|
bool GPU_compute_shader_support(void);
|
|
|
|
|
bool GPU_shader_storage_buffer_objects_support(void);
|
2020-09-12 06:10:11 +02:00
|
|
|
bool GPU_shader_image_load_store_support(void);
|
|
|
|
|
|
2015-04-24 14:11:05 +02:00
|
|
|
bool GPU_mem_stats_supported(void);
|
|
|
|
|
void GPU_mem_stats_get(int *totalmem, int *freemem);
|
|
|
|
|
|
2021-12-09 20:01:47 +11:00
|
|
|
/**
|
|
|
|
|
* Return support for the active context + window.
|
|
|
|
|
*/
|
2020-07-16 03:01:07 +02:00
|
|
|
bool GPU_stereo_quadbuffer_support(void);
|
|
|
|
|
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|