Commit Graph

277 Commits

Author SHA1 Message Date
Бранимир Караџић
93815ab7c7 Cleanup. 2023-06-26 21:16:17 -07:00
Branimir Karadžić
d6a251670a Fixed build. 2023-06-26 20:10:25 -07:00
Бранимир Караџић
b74da5c643 GL: Removed GLX context code. 2023-06-26 19:18:49 -07:00
Бранимир Караџић
928800feab macOS, iOS: Removed OpenGL/OpenGLES support. 2023-06-24 08:13:00 -07:00
Бранимир Караџић
cb7ca00fe1 GL: Include glcontext_* based on defines. 2023-06-23 21:14:06 -07:00
Бранимир Караџић
bea82a1343 GLES3+: Fix headers. 2023-01-21 08:51:44 -08:00
Бранимир Караџић
466c6a4e95 Happy New Year! 2023-01-14 10:05:12 -08:00
Бранимир Караџић
d5230bbbda GL: Added more missing ASTC formats. 2022-10-25 19:03:33 -07:00
Бранимир Караџић
42b154d925 GL: Added missing ASTC formats. 2022-10-25 19:00:30 -07:00
Raziel Alphadios
c2bc5177b5
Add support for remaining unsupported ASTC formats (#2963)
* Add support for remaining unsupported ASTC formats
Add new ASTC formats into pixelformats example and ninja scripts
Rebuild ASTC textures

* Update idl and generate
Move comma in pixelformats

Co-authored-by: Raziel Alphadios <raziely@gmail.com>
2022-10-25 17:03:40 -07:00
Бранимир Караџић
2d6c85ac7a Fixed emscripten build. 2022-09-23 10:01:47 -07:00
Бранимир Караџић
01f308dd58 GL: Fixed instace data offset when i_dataX is missing in shader. 2022-09-20 20:48:48 -07:00
jwdevel
f1f77a6cd3
Record frame num in view stats (#2908)
* Add 'frameNumber' to Frame struct

Previously, the frame number returned from bgfx::frame() was tracked separately in the Context. Now,
we store that information in the Frame. This will allow us to attach the frame number to ViewStats.

* Add frame number to ViewStats

When ViewStats are enabled, we tag each timer query with the current frame number, then include
that information in the final results. In this way, clients can correlate specific work that they
submitted to specific GPU timing information.

NOTE: Some backends not implemented, yet. They will always have 0 for frame number.
The ones which are implemented are:
 * OpenGL
 * Vulkan
 * D3D 9,11,12
 * Noop
2022-09-18 19:09:48 -07:00
Sandy
561e91a62b
opengl: Implement texture swizzle mapping (#2892)
* opengl: Implement texture swizzle mapping

* imageformats: Fix compilation on android

Android GLES does not have a definition for GL_BGR: Swizzle instead.
2022-08-25 06:54:57 -07:00
Бранимир Караџић
4581f14cd4 Happy New Year! 2022-01-15 11:59:06 -08:00
Branimir Karadžić
46384208ad Define WIN32_LEAN_AND_MEAN if it's not defined when including windows.h. 2021-10-13 20:18:03 -07:00
Branimir Karadžić
c5aea5325d Fixed MSVC build. 2021-05-19 07:03:02 -07:00
Бранимир Караџић
a47a1c8917 Fixed WebGL instancing and EGL context upgrade. 2021-05-18 22:41:51 -07:00
Бранимир Караџић
9310d19141 Cleanup. 2021-04-27 09:18:22 -07:00
Бранимир Караџић
d8cfb8f64d Fixed issue #2368. 2021-01-22 07:33:59 -08:00
Бранимир Караџић
af49c5d264 Happy New Year! 2021-01-14 15:53:49 -08:00
Christophe Dehais
6b790dc96b
Add opt-in compile flag for GL read back emulation (#2305)
Co-authored-by: Christophe Dehais <christophe.dehais@fittingbox.com>
2020-11-05 14:54:17 -08:00
generalzzd
0cce398530
generalzzd fix ios compling error (#2288)
Co-authored-by: Zidi <zzd007@hotmail.com>
2020-10-17 20:02:25 -07:00
kingscallop
436b7fab9e
Adds UAV support for D3D12, Vulkan and reworked for OpenGL, D3D11 (#2119)
* Adds UAV support for D3D12, Vulkan and reworked support for OpenGL, D3D11

UAV support is now uniform across compute and draw.
To set a UAV you just use bgfx::setImage() and IMAGE2D in the shader, just like in compute.
Due to these changes shaders will have to be recompiled.

The changes include:
	- D3D11 requires patching of the UAV slot number (which is now done by modifying the DXBC instead of using a macro)
	- If the DXBC binary includes a debug chunk, that is also patched to match the new slot number
	- All the other renderers don't need any kind of patching
	- There are some shader annotations to better convert the UAV format used in hlsl to spirv

Possibility of further enhancements:
	- bgfx::setViewFrameBuffer() only supports binding to a framebuffer or, using BGFX_INVALID_HANDLE, to bind the default backbuffer. This doesn't allow for the case where there is no need to bind to either one of them, for example when using a fragment shader only to read and write to an UAV.

* Bump shader version, because they need to be recompiled.
2020-10-04 21:51:41 -07:00
Бранимир Караџић
ffb2518d5a Cleanup. 2020-09-28 10:05:18 -07:00
Christophe Dehais
816026a8bf
Add blitting fallback for OGL (#2269)
Co-authored-by: Christophe Dehais <christophe.dehais@fittingbox.com>
2020-09-28 09:53:37 -07:00
Бранимир Караџић
d5d3d29e9c Cleanup. 2020-06-20 14:29:25 -07:00
Бранимир Караџић
3f6d049470 Fixed Emscripten function calls. 2020-06-19 09:31:32 -07:00
Бранимир Караџић
2cbcb6ea90 RRenamed BX_CHECK to BX_ASSERT. 2020-06-16 10:06:18 -07:00
Бранимир Караџић
594be53891 Reverted #2021. 2020-05-12 07:11:01 -07:00
Бранимир Караџић
9c5a236230 Cleanup. 2020-04-07 23:51:51 -07:00
Бранимир Караџић
1361ccf211 Revert "Revert "Avoid redundant uniform uploads (#2090)""
This reverts commit c023ac4620.
2020-04-07 23:43:21 -07:00
Бранимир Караџић
c023ac4620 Revert "Avoid redundant uniform uploads (#2090)"
This reverts commit d9d9865ad9.
2020-04-07 23:23:54 -07:00
juj
d9d9865ad9
Avoid redundant uniform uploads (#2090)
* Avoid redundant uniform uploads

* Fix placement of GL_CHECK()s and import of glUniform4f.

* Fix typo

* Migrate GL uniform cache to use tinystl to conform to BGFX data structures

* Address review

* Address review
2020-04-07 23:08:09 -07:00
G
f07a0f5179
Added support for the extension OES_EGL_image_external(_essl3) for GLES2/3 (#2021)
Co-authored-by: Gabriel <gabriel.sulka@visiarc.com>
2020-04-06 08:20:49 -07:00
Pablo Escobar
eeb5fe7c02 Don't double-quote profiler literals 2020-04-03 21:56:54 +00:00
Jukka Jylänki
43bd07f825 Fix OpenGL ES texture formats and remove runtime texture probing on WebGL. 2020-03-30 15:35:15 +00:00
Jukka Jylänki
bab9dc752e Avoid redundant GL calls to glEnableVertexAttribArray() and glDisableVertexAttribArray(). #1960 2020-03-30 15:26:15 +00:00
Бранимир Караџић
4d50e90dd2 Removed support for SteamLink (discontinued 11/2018). 2020-03-11 21:49:11 -07:00
Бранимир Караџић
82f56b5987 Happy New Year! 2020-01-14 21:37:06 -08:00
Бранимир Караџић
c3e93e39d1 Fixed issue #1927. 2019-11-01 07:40:50 -07:00
Leandro Freire
214a125432 Use underscore on arguments 2019-08-17 12:32:16 -07:00
Leandro Freire
1db46f4fe6 Rename variables and constants 2019-08-17 12:32:16 -07:00
Leandro Freire
855623e153 Rename VertexDecl to VertexLayout 2019-08-13 18:42:01 -07:00
Бранимир Караџић
7845b74b44 Fixed #1831. 2019-07-26 08:20:40 -07:00
Vladimir Vukicevic
142470237e html5 glcontext 2019-07-02 01:24:15 +00:00
Hugo Amnov
58563b0b1b FrameBuffer Read/Write access WIP 2019-02-17 16:50:26 +01:00
Бранимир Караџић
4c899553e3 Cleanup internal profiler. 2019-02-15 16:45:35 -08:00
Бранимир Караџић
dd10b04651 Fixed texture array frame buffer. 2019-02-07 18:02:48 -08:00
Бранимир Караџић
575c6ebda4 GL: Workaround issue with setting texture name. 2019-01-24 19:34:29 -08:00