mirror of
https://github.com/Ed94/VEFontCache-Odin.git
synced 2025-08-06 15:02:44 -07:00
Update thirdparty to latest
This commit is contained in:
43
thirdparty/sokol/c/sokol_app.h
vendored
43
thirdparty/sokol/c/sokol_app.h
vendored
@@ -2675,7 +2675,10 @@ typedef struct {
|
||||
bool tracked;
|
||||
uint8_t capture_mask;
|
||||
} mouse;
|
||||
uint8_t raw_input_data[256];
|
||||
struct {
|
||||
size_t size;
|
||||
void* ptr;
|
||||
} raw_input_data;
|
||||
} _sapp_win32_t;
|
||||
|
||||
#if defined(SOKOL_GLCORE)
|
||||
@@ -7253,6 +7256,32 @@ _SOKOL_PRIVATE void _sapp_win32_lock_mouse(bool lock) {
|
||||
_sapp.win32.mouse.requested_lock = lock;
|
||||
}
|
||||
|
||||
_SOKOL_PRIVATE void _sapp_win32_free_raw_input_data(void) {
|
||||
if (_sapp.win32.raw_input_data.ptr) {
|
||||
_sapp_free(_sapp.win32.raw_input_data.ptr);
|
||||
_sapp.win32.raw_input_data.ptr = 0;
|
||||
_sapp.win32.raw_input_data.size = 0;
|
||||
}
|
||||
}
|
||||
|
||||
_SOKOL_PRIVATE void _sapp_win32_alloc_raw_input_data(size_t size) {
|
||||
SOKOL_ASSERT(!_sapp.win32.raw_input_data.ptr);
|
||||
SOKOL_ASSERT(size > 0);
|
||||
_sapp.win32.raw_input_data.ptr = _sapp_malloc(size);
|
||||
_sapp.win32.raw_input_data.size = size;
|
||||
SOKOL_ASSERT(_sapp.win32.raw_input_data.ptr);
|
||||
}
|
||||
|
||||
_SOKOL_PRIVATE void* _sapp_win32_ensure_raw_input_data(size_t required_size) {
|
||||
if (required_size > _sapp.win32.raw_input_data.size) {
|
||||
_sapp_win32_free_raw_input_data();
|
||||
_sapp_win32_alloc_raw_input_data(required_size);
|
||||
}
|
||||
// we expect that malloc() returns at least 8-byte aligned memory
|
||||
SOKOL_ASSERT((((uintptr_t)_sapp.win32.raw_input_data.ptr) & 7) == 0);
|
||||
return _sapp.win32.raw_input_data.ptr;
|
||||
}
|
||||
|
||||
_SOKOL_PRIVATE void _sapp_win32_do_lock_mouse(void) {
|
||||
_sapp.mouse.locked = true;
|
||||
|
||||
@@ -7668,13 +7697,18 @@ _SOKOL_PRIVATE LRESULT CALLBACK _sapp_win32_wndproc(HWND hWnd, UINT uMsg, WPARAM
|
||||
/* raw mouse input during mouse-lock */
|
||||
if (_sapp.mouse.locked) {
|
||||
HRAWINPUT ri = (HRAWINPUT) lParam;
|
||||
UINT size = sizeof(_sapp.win32.raw_input_data);
|
||||
// see: https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getrawinputdata
|
||||
if ((UINT)-1 == GetRawInputData(ri, RID_INPUT, &_sapp.win32.raw_input_data, &size, sizeof(RAWINPUTHEADER))) {
|
||||
// also see: https://github.com/glfw/glfw/blob/e7ea71be039836da3a98cea55ae5569cb5eb885c/src/win32_window.c#L912-L924
|
||||
|
||||
// first poll for required size to alloc/grow input buffer, then get the actual data
|
||||
UINT size = 0;
|
||||
GetRawInputData(ri, RID_INPUT, NULL, &size, sizeof(RAWINPUTHEADER));
|
||||
void* raw_input_data_ptr = _sapp_win32_ensure_raw_input_data(size);
|
||||
if ((UINT)-1 == GetRawInputData(ri, RID_INPUT, raw_input_data_ptr, &size, sizeof(RAWINPUTHEADER))) {
|
||||
_SAPP_ERROR(WIN32_GET_RAW_INPUT_DATA_FAILED);
|
||||
break;
|
||||
}
|
||||
const RAWINPUT* raw_mouse_data = (const RAWINPUT*) &_sapp.win32.raw_input_data;
|
||||
const RAWINPUT* raw_mouse_data = (const RAWINPUT*) raw_input_data_ptr;
|
||||
if (raw_mouse_data->data.mouse.usFlags & MOUSE_MOVE_ABSOLUTE) {
|
||||
/* mouse only reports absolute position
|
||||
NOTE: This code is untested and will most likely behave wrong in Remote Desktop sessions.
|
||||
@@ -8215,6 +8249,7 @@ _SOKOL_PRIVATE void _sapp_win32_run(const sapp_desc* desc) {
|
||||
_sapp_win32_destroy_window();
|
||||
_sapp_win32_destroy_icons();
|
||||
_sapp_win32_restore_console();
|
||||
_sapp_win32_free_raw_input_data();
|
||||
_sapp_discard_state();
|
||||
}
|
||||
|
||||
|
10
thirdparty/sokol/c/sokol_gfx.h
vendored
10
thirdparty/sokol/c/sokol_gfx.h
vendored
@@ -452,7 +452,7 @@
|
||||
sg_apply_scissor_rect[f]
|
||||
sg_draw
|
||||
|
||||
The folling function may be called inside a render- or compute-pass, but
|
||||
The following function may be called inside a render- or compute-pass, but
|
||||
not outside a pass:
|
||||
|
||||
sg_apply_pipeline
|
||||
@@ -818,7 +818,7 @@
|
||||
- for the GLES3 backend, source code must be provided in '#version 300 es' syntax
|
||||
- for the D3D11 backend, shaders can be provided as source or binary
|
||||
blobs, the source code should be in HLSL4.0 (for compatibility with old
|
||||
low-end GPUs) or preferrably in HLSL5.0 syntax, note that when
|
||||
low-end GPUs) or preferably in HLSL5.0 syntax, note that when
|
||||
shader source code is provided for the D3D11 backend, sokol-gfx will
|
||||
dynamically load 'd3dcompiler_47.dll'
|
||||
- for the Metal backends, shaders can be provided as source or binary blobs, the
|
||||
@@ -883,7 +883,7 @@
|
||||
- a boolean 'readonly' flag, this is used for validation and hazard
|
||||
tracking in some 3D backends. Note that in render passes, only
|
||||
readonly storage buffer bindings are allowed. In compute passes, any
|
||||
read/write storage buffer binding is assumbed to be written to by the
|
||||
read/write storage buffer binding is assumed to be written to by the
|
||||
compute shader.
|
||||
- a backend-specific bind slot:
|
||||
- D3D11/HLSL:
|
||||
@@ -978,7 +978,7 @@
|
||||
- for Metal: https://github.com/floooh/sokol-samples/tree/master/metal
|
||||
- for OpenGL: https://github.com/floooh/sokol-samples/tree/master/glfw
|
||||
- for GLES3: https://github.com/floooh/sokol-samples/tree/master/html5
|
||||
- for WebGPI: https://github.com/floooh/sokol-samples/tree/master/wgpu
|
||||
- for WebGPU: https://github.com/floooh/sokol-samples/tree/master/wgpu
|
||||
|
||||
|
||||
ON SG_IMAGESAMPLETYPE_UNFILTERABLE_FLOAT AND SG_SAMPLERTYPE_NONFILTERING
|
||||
@@ -4124,7 +4124,7 @@ typedef struct sg_frame_stats {
|
||||
_SG_LOGITEM_XMACRO(VALIDATE_PIPELINEDESC_COMPUTE_SHADER_EXPECTED, "sg_pipeline_desc.shader must be a compute shader") \
|
||||
_SG_LOGITEM_XMACRO(VALIDATE_PIPELINEDESC_NO_COMPUTE_SHADER_EXPECTED, "sg_pipeline_desc.compute is false, but shader is a compute shader") \
|
||||
_SG_LOGITEM_XMACRO(VALIDATE_PIPELINEDESC_NO_CONT_ATTRS, "sg_pipeline_desc.layout.attrs is not continuous") \
|
||||
_SG_LOGITEM_XMACRO(VALIDATE_PIPELINEDESC_ATTR_BASETYPE_MISMATCH, "sg_pipeline_desc.layout.attrs[].format is incompatble with sg_shader_desc.attrs[].base_type") \
|
||||
_SG_LOGITEM_XMACRO(VALIDATE_PIPELINEDESC_ATTR_BASETYPE_MISMATCH, "sg_pipeline_desc.layout.attrs[].format is incompatible with sg_shader_desc.attrs[].base_type") \
|
||||
_SG_LOGITEM_XMACRO(VALIDATE_PIPELINEDESC_LAYOUT_STRIDE4, "sg_pipeline_desc.layout.buffers[].stride must be multiple of 4") \
|
||||
_SG_LOGITEM_XMACRO(VALIDATE_PIPELINEDESC_ATTR_SEMANTICS, "D3D11 missing vertex attribute semantics in shader") \
|
||||
_SG_LOGITEM_XMACRO(VALIDATE_PIPELINEDESC_SHADER_READONLY_STORAGEBUFFERS, "sg_pipeline_desc.shader: only readonly storage buffer bindings allowed in render pipelines") \
|
||||
|
Reference in New Issue
Block a user