kingscallop
6a529fca4b
Fix usage of bx::findIdentifierMatch for gl_FragDepth ( #2533 )
...
When trying to find all the instances of gl_FragDepth
and replace them with bgfx_FragDepth it only finds
the first instance.
2021-06-05 13:56:00 -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
Бранимир Караџић
3214539bad
Fixing WebGL + Android instancing.
2021-05-18 20:22:46 -07:00
pezcode
2c21f68998
VPRT support for D3D11, D3D12, GL ( #2507 )
...
* glsl-optimizer: whitelist ARB_shader_viewport_layer_array_enable
* D3D11: remove duplicate structs and enums
* D3D11: report BGFX_CAPS_VIEWPORT_LAYER_ARRAY
* D3D12: report BGFX_CAPS_VIEWPORT_LAYER_ARRAY
* GL: support for BGFX_CAPS_VIEWPORT_LAYER_ARRAY
* D3D11: multi-layer MSAA resolve
* D3D12: multi-layer MSAA resolve
* D3D12: fix binding multi-layer resolved textures
* GL: fix multi-layer rendertarget creation
2021-05-05 11:58:21 -07:00
Бранимир Караџић
9310d19141
Cleanup.
2021-04-27 09:18:22 -07:00
Бранимир Караџић
d01f86a6a9
Cleanup.
2021-04-26 19:54:58 -07:00
Бранимир Караџић
c319aa909e
Fixed build.
2021-04-23 22:30:21 -07:00
SnapperTT
ffde01f8c9
Fix change in blend rgba not being detected as a state change ( #2494 )
2021-04-23 20:15:01 -07:00
Hugo Amnov
24be4a38d0
WebGPU: Add texture format to shaderc (bin version 10) + streamline storage Images in shaders ( #2482 )
...
* WebGPU: Add texture format (shaderc bin version 10)
* WebGPU: Simplify storage images + Fix format decorations
* Shaderc: Cleanup Texture name assumption in textures
2021-04-20 20:18:49 -07:00
pezcode
900afe7644
GL: only unbind instance buffer if it changed ( #2463 )
2021-04-09 09:36:21 -07:00
simon chen
0b8677ed06
fix update bug when compressed texture create with BGFX_TEXTURE_SRGB ( #2437 )
...
Co-authored-by: chenmou.cm <chenmou.cm@alibaba-inc.com >
2021-03-30 19:50:19 -07:00
Lee Thomason
176ab53d45
Print error messages when shader doesn't compile. ( #2378 )
...
* Trace compile error if shader doesn't compile.
* remove redundant output
Co-authored-by: Lee Thomason <leet@unity3d.com >
2021-02-05 17:12:01 -08:00
Бранимир Караџић
16f441758f
Fixed #2368 .
2021-01-25 12:24:12 -08:00
kingscallop
758566b3af
Make the provoking vertex consistent across OpenGL, D3D and Vulkan ( #2360 )
...
The default provoking vertex on OpenGL is the last of a triangle, but
on D3D and Vulkan it is the first.
This patch sets the provoking vertex to the first vertex on OpenGL.
2021-01-16 13:59:28 -08:00
Бранимир Караџић
af49c5d264
Happy New Year!
2021-01-14 15:53:49 -08:00
Branimir Karadžić
5c304dad3b
Fixed issue #2330 . Added support for 32-bit indices in transient index buffer.
2020-12-15 19:01:25 -08:00
Бранимир Караџић
86583e9bbd
Cleanup.
2020-11-25 22:29:40 -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
Christophe Dehais
3a297ed3c0
Add support for OES_fbo_render_mipmap ( #2303 )
...
Co-authored-by: Christophe Dehais <christophe.dehais@fittingbox.com >
2020-10-30 11:58:36 -07:00
Christophe Dehais
3af46fd7dc
Explicitly enable WebGL extensions ( #2302 )
...
Co-authored-by: Christophe Dehais <christophe.dehais@fittingbox.com >
2020-10-30 11:57:09 -07:00
pezcode
09c11bca29
Mip + blit fixes ( #2281 )
...
* D3D12: Fix readback for non-zero mip
* Fix blit with non-zero mip
This required clamping the blit extents to the mip size, which is moved out of the renderers now
* Assert formatting
2020-10-09 15:32:50 -07:00
Бранимир Караџић
e878147cf9
Added version info to debug stats.
2020-10-05 19:45:22 -07:00
MooZ
9d369ab4a0
Fixed msaa for OpenGL ES targets. ( #2277 )
2020-10-05 10:17:01 -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
kingscallop
cb8f6dfcec
Fixes example 08 when using OpenGL ( #2233 )
...
This example was broken on Windows and Linux when using OpenGL.
The code path when using immutable compressed textures was wrong.
2020-08-16 11:42:42 -07:00
Julian Xhokaxhiu
daec25b6d0
OpenGL: Disable scissor testing while blitting framebuffers when MSAA is enabled ( #2200 )
2020-07-14 07:47:48 -07:00
Бранимир Караџић
a95ddd1c0c
Reemoved use of old LineReader.
2020-06-20 15:14:54 -07:00
Бранимир Караџић
d5d3d29e9c
Cleanup.
2020-06-20 14:29:25 -07:00
Бранимир Караџић
ce4fecc53e
Cleanup.
2020-06-19 20:39:19 -07:00
Бранимир Караџић
38ac02695d
Fixed emscripten build.
2020-06-19 20:36:44 -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
Бранимир Караџић
ee78de075c
Cleanup.
2020-06-16 08:25:54 -07:00
Бранимир Караџић
5b42be38ec
Cleanup.
2020-06-15 16:21:55 -07:00
Justin Murray
86bd3ad9ad
Broadened bypass mechanism for bgfx default headers in the OpenGL renderer. This reflects the fact that, if the first line of a shader is already a #version declaration, we never want to write lines above that regardless of what version is declared. ( #2168 )
2020-06-12 21:16:06 -07:00
juj
75384ccfe1
Add checks for Emscripten API return values to make sure API calls are not failing ( #2160 )
2020-06-05 07:34:11 -07:00
Бранимир Караџић
594be53891
Reverted #2021 .
2020-05-12 07:11:01 -07:00
Hugo Amnov
b62302631e
Add Webgpu backend ( #2132 )
...
* WebGPU first draft (shaderc bin version 8)
* WebGPU scripts
2020-05-08 08:53:53 -07:00
kingscallop
eaab1be079
Fix GpuShader5 extension on Intel and support 'bitsTo' functions ( #2118 )
...
GpuShader5 extension isn't supported on fragment shaders.
Bumps the GLSL version to support the 'bitsTo' functions when present on the shader.
2020-04-26 20:43:03 -07:00
Бранимир Караџић
23998f3d78
Fixed typo.
2020-04-08 08:05:11 -07:00
Бранимир Караџић
5555c73b3a
Cleanup.
2020-04-07 23:59:16 -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
1b85139371
Revert "Remove debug label quotes"
...
This reverts commit 08b3ec5814 .
2020-04-03 21:56:54 +00:00
Pablo Escobar
fdcdeae23a
Remove debug label quotes
2020-04-03 21:56:54 +00:00