mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
Make a number of key optimizations
- Changed glMapBuffer to glMapBufferRange to allow invalidation. Using just glMapBuffer alone was causing some unacceptable stalls. - Changed dynamic buffers from GL_DYNAMIC_WRITE to GL_STREAM_WRITE because I had misunderstood the OpenGL specification - Added _OPENGL and _D3D11 builtin preprocessor macros to effects to allow special processing if needed - Added fmod support to shaders (NOTE: D3D and GL do not function identically with negative numbers when using this. Positive numbers however function identically) - Created a planar conversion shader that converts from packed YUV to planar 420 right on the GPU without any CPU processing. Reduces required GPU download size to approximately 37.5% of its normal rate as well. GPU usage down by 10 entire percentage points despite the extra required pass.
This commit is contained in:
@@ -421,6 +421,11 @@ gs_device::gs_device(gs_init_data *data)
|
||||
device_setrendertarget(this, NULL, NULL);
|
||||
}
|
||||
|
||||
const char *device_preprocessor_name(void)
|
||||
{
|
||||
return "_D3D11";
|
||||
}
|
||||
|
||||
gs_device *device_create(gs_init_data *data)
|
||||
{
|
||||
gs_device *device = NULL;
|
||||
|
||||
Reference in New Issue
Block a user