Бранимир Караџић
09de2467d5
Revert "Fix RGBA4 and RGB5_A1 type. GL_UNSIGNED_SHORT_4_4_4_4_REV and GL_UNSIGNED_SHORT_1_5_5_5_REV do not exist in GLES, only in desktop OpenGL, but the non _REV verrsion is present in both"
...
This reverts commit c56d843565 .
2020-03-02 22:09:00 -08:00
Jukka Jylänki
c56d843565
Fix RGBA4 and RGB5_A1 type. GL_UNSIGNED_SHORT_4_4_4_4_REV and GL_UNSIGNED_SHORT_1_5_5_5_REV do not exist in GLES, only in desktop OpenGL, but the non _REV verrsion is present in both
2020-03-03 06:04:45 +00:00
Jukka Jylänki
5b9b75abb2
Fix RGBA4 and RGB5A1 format & internalFormat
2020-03-03 04:08:27 +00:00
Jukka Jylänki
e1b3fe6d75
Fix OpenGL ES depth&stencil format querying.
2020-03-02 16:55:39 +00:00
Jukka Jylänki
d539f3425f
Avoid querying GL_MAX_ARRAY_TEXTURE_LAYERS and GL_MAX_LABEL_LENGTH if it is known at compile time that the GL context is not new enough to have them.
2020-03-02 16:54:25 +00:00
Minmin Gong
68e27b6655
Fix a couple framebuffer related bugs in D3D renderer
...
1. A crash in D3D11 renderer when create a texture with flag BGFX_TEXTURE_RT_WRITE_ONLY then override it, bcause m_srv is NULL.
2. In headless mode, RendererContextD3D12::m_swapChain is NULL, clear it resulting a D3D12 debug error
2020-02-27 04:59:35 +00:00
Minmin Gong
ca509c136d
Store the command queue into device in D3D12 renderer
2020-02-27 04:58:27 +00:00
Sandy Carter
d7e3f03780
shaderc_glsl: Fix error when mixing SamplerArray and flat keyword
...
Use of the `flat` keyword will have `glslopt_optimize` run with glsl
version 130. In this mode, it will change calls of `texture2DArray` to
the more general `textureArray`. However, this call results in an error
when reading the compiled shader:
```
bgfx/src/renderer_gl.cpp:5904: BGFX Failed to compile shader.
0: 0(45) : error C1503: undefined variable "textureArray"
```
Defining this call to be `texture` avoids this error.
2020-02-20 16:05:00 +00:00
Minmin Gong
de4e62692d
Don't clear RTVs/DSVs after creating them
2020-02-20 05:00:04 +00:00
Minmin Gong
141aae44cd
Fix the sRGB support in D3D12 renderer
2020-02-20 04:59:03 +00:00
Minmin Gong
ccdd6676ca
Implement the overrideInternal in D3D12 renderer
2020-02-13 07:11:47 +00:00
Attila Kocsis
6f168f0ca2
Metal: Fixed msaa capture
2020-02-11 03:20:53 +00:00
Justin Murray
248c7a88df
Modified CreateShaderResourceView() calls to use descriptiors from prior SRVs to handle cases where SRV format cannot be directly deduced from texture format. This happens when using D3D11's typeless texture formats, which can be introduced into a BGFX app using overrideInternal.
2020-02-11 03:19:58 +00:00
Elviss Strazdins
ff6aa27cae
Fix MSAA sample count for Metal
2020-02-10 16:17:56 +00:00
Бранимир Караџић
17db2f79e0
Revert "d3d9: Set RGBA4 to unknown"
...
This reverts commit c776c2eaaa .
2020-02-08 09:29:14 -08:00
Sandy Carter
c776c2eaaa
d3d9: Set RGBA4 to unknown
...
Color ordering of RGBA4 is wrong and there are no A4B4G4A4 format or swizzling
options.
2020-02-08 09:21:12 -08:00
Sandy Carter
dba8b8efef
vulkan: Add swizzle definition to formats
...
Fix color ordering of RGBA4
2020-02-08 09:21:12 -08:00
Sandy Carter
77fdc487ab
opengl: Fix color ordering of RGBA4
2020-02-08 09:21:12 -08:00
attilaz
cb4543cc67
Metal: Fixed compressed texture update
...
I have tested 08-update on iOS and Mac.
2020-02-07 07:23:17 -08:00
Attila Kocsis
8a3786c59c
Added desciption labels to 08-update
...
Added row of cubes whose compressed texture is created with empty content then updated using bgx::updateTexture2D.
Fixed default srcPitch in d3d11 renderer for compressed textures.
2020-02-07 07:23:17 -08:00
Бранимир Караџић
db961eacd2
Revert "Move more Mac UI-thread-only calls to main thread"
...
This reverts commit 9302fa6fe4 .
2020-02-06 19:12:35 -08:00
Vladimir Vukicevic
9302fa6fe4
Move more Mac UI-thread-only calls to main thread
2020-02-05 19:25:24 -08:00
stolk
e7b8606146
Properly size the set, so that no overrun happens.
2020-02-04 18:24:59 -08:00
Бранимир Караџић
3002159da9
Fixed state tracking.
2020-02-04 09:51:21 -08:00
Sandy Carter
5924652151
rebind instance data buffer if index offset changes
...
Fix case of drawing different offsets of indices of same vertex buffer
using same instance data.
This can happen in the case of conditionally drawing subsets of vertex
buffer stored in different offsets of the same index buffer while re-using
non-transient instance buffers.
2020-02-04 07:38:36 -08:00
Sandy Carter
a38e873f8a
rebind instance data buffer if index buffer changes
...
Fix case of drawing different indices of same vertex buffer using same
instance data.
This can happen in the case of conditionally drawing subsets of vertex
buffer stored in different index buffers while re-using non-transient
instance buffers.
2020-02-01 09:18:51 -08:00
Abraham Stolk
bb07e99907
Fix clear range.
2020-01-30 12:18:28 -08:00
Abraham Stolk
2efeada1c0
This fixes a buffer overflow in an array of write descriptor sets.
2020-01-30 12:18:28 -08:00
Алексей Тулинов
ac9c330100
Fixes #2000 . Restored old behavior of handling shaders with "#version 430" in them.
2020-01-29 19:23:31 -08:00
James Fulop
b9ab564c47
cleanup: fix redundancy in error message
2020-01-24 21:27:46 -08:00
JW
97bafaa7b8
Check for GLX vblank extensions more properly.
...
Previously, the code checked for an extension by checking if the pointer returned from
glXGetProcAddress was NULL or not.
But in truth, you can get a non-NULL pointer even if that extension is not supported.
Now, we parse the glXQueryExtensionsString() results.
GLFW code that does similar checks, for reference: 51bb76c7c3/src/glx_context.c (L208)
fixes #1367
2020-01-24 21:26:56 -08:00
Бранимир Караџић
6a1287e43d
Cleanup.
2020-01-23 09:10:05 -08:00
Attila Kocsis
ecc8f791f2
always calling UI API on main thread
2020-01-22 19:55:13 -08:00
Бранимир Караџић
b14f9dc280
Cleanup.
2020-01-21 20:08:48 -08:00
Бранимир Караџић
de9a508409
Cleanup.
2020-01-21 09:16:55 -08:00
Cedric Guillemet
9ee39e8241
PR feedback
2020-01-21 09:11:53 -08:00
Cedric Guillemet
b4cac17b93
default parameters
2020-01-21 09:11:53 -08:00
Cedric Guillemet
4b83e0f5bc
discard flags
2020-01-21 09:11:53 -08:00
Бранимир Караџић
82f56b5987
Happy New Year!
2020-01-14 21:37:06 -08:00
Daniele Bartolini
d102296d15
Suppress glxext.h #include-ed by glx.h
2020-01-13 22:00:39 -08:00
Oliver Collyer
7b7dca065b
implemented overrideInternal for Metal
...
The internal pointer is interpreted as being of type id<MTLTexture>.
2020-01-05 08:43:53 -08:00
Бранимир Караџић
aa1aed4ce1
Cleanup.
2019-12-07 07:39:49 -08:00
Giovanni Petrantoni
a965164bc1
Fix mac build, defined was not needed for IOS preprocessor
2019-12-07 07:37:59 -08:00
Giovanni Petrantoni
8c38f21e05
Fixes to texture formats related to mac catalyst builds (metal)
2019-12-07 07:37:59 -08:00
Boris Shirvinskii
6284cde9d6
[iOS] disabling D16 and D24S8 texture formats as it appears they are not supported
...
tested on the full range of iOS devices from iPhone 5s to iPhone 11
2019-12-04 09:28:01 -08:00
James Fulop
c04b923860
fix preprocessor boolean logic
2019-11-26 18:50:52 -08:00
James Fulop
e6ba3e49af
add an assert to catch unknown opcodes earlier
2019-11-26 18:50:33 -08:00
Gary Hsu
9ec0fd243a
Fix D3D11 exception with srgb backbuffer
2019-11-15 15:06:11 -08:00
Бранимир Караџић
c7d986f729
Attemp to build D3D11 on Linux.
2019-11-14 21:47:22 -08:00
Paul Gruenbacher
5ca9458605
Update bgfx_compute.sh
...
fix the indirect define declarations
2019-11-14 18:48:02 -08:00