summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* vulkan: enable best-practices validationHEADmainErik Faye-Lund2023-04-171-1/+1
| | | | | | | Now that we've fixed all known best-practices validation errors, we should be able to enable this flag wihout producing needless noise. Acked-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* vkgears: properly pick color-formatErik Faye-Lund2023-04-171-2/+17
| | | | | | | | | | | Before this, we just assumed our preferred color-format was available. Now we instead look for it, and fall back to the first format if not found. We can probably do better in the future, though. Maybe we should prefer format with more bits instead of having a single preferred format? Acked-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* vkgears: do swapchain configuration up-frontErik Faye-Lund2023-04-171-21/+23
| | | | | | | | | | | There's no point in redoing all of the swapchain configuration when resizing the window; yeah, something's changed, but not *everything*. Let's move all configuration decisions to its own function, which runs before all the other logic. This is going to help us properly pick color formats in the next patch also. Acked-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* vkgears: follow best-practicesErik Faye-Lund2023-04-171-1/+2
| | | | | | | | | While I'm not convinced this should have been considered a best practice in the first place, the benefits from not having noise like this when running with validation layers is enough to convince me that it's better to do this than not to. Acked-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* meson: add more validationErik Faye-Lund2023-04-172-0/+8
| | | | | | | This adds a vk_layer_settings.txt file that we wire up when running with the meson devenv feature. That enables some extra validation. Acked-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* vkgears: recreate swapchain semaphore on resizeErik Faye-Lund2023-04-171-7/+9
| | | | | | | Otherwise, we end up waiting on an unsignaled semaphore when resizing, which isn't legal. Acked-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* vkgears: add missing subpass-dependenciesErik Faye-Lund2023-04-171-2/+36
| | | | | | This adds a few missing subpass-dependencies to the render-pass. Acked-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* vkgears: put barriers around vkCmdUpdateBufferErik Faye-Lund2023-04-171-0/+41
| | | | | | Without this, we end up with sync-hazards, it seems. Acked-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* egl: trigger redraw on keypress and window resizing on demosHoe Hao Cheng2023-04-043-0/+8
| | | | | | | | Otherwise on those demos the graphics will never update on Wayland. The X11 WSI forces a redraw on each keypress so this went unnoticed for a long time. Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
* eglut: remove remnants of the old WSI codeHoe Hao Cheng2023-04-044-841/+0
| | | | Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
* egl/opengles2: migrate to eglut with unified WSIHoe Hao Cheng2023-04-041-7/+2
| | | | Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
* egl/opengles1: migrate to eglut with unified WSIHoe Hao Cheng2023-04-041-5/+5
| | | | | | | Despite the fact that those demos were originally hardcoded to X11, they actually run pretty well on Wayland! Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
* egl/opengl: migrate to eglut with unified WSIHoe Hao Cheng2023-04-041-15/+4
| | | | Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
* meson: hook up the unified-WSI eglutHoe Hao Cheng2023-04-041-0/+32
| | | | Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
* eglut: support the new unified WSIHoe Hao Cheng2023-04-043-0/+38
| | | | | | | | | | This is no-op until the build system is hooked up to use it. Note: the ifdefs surrounding _eglutGetWindowSystemInterface() in eglut.c are temporary and will be ripped out with the entire old WSI code in another commit in this series. Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
* eglut/wsi: introduce X11 WSIHoe Hao Cheng2023-04-041-0/+265
| | | | | | | Similar to the Wayland commit - renaming, making things static, and adding a new x11_wsi_interface() function. Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
* eglut/wsi: introduce Wayland WSIHoe Hao Cheng2023-04-041-0/+579
| | | | | | | | This is copy-pasted from eglut_wayland.c, the only change that has been made is adding a wayland_wsi_interface() function, renaming the _eglut*() functions, and making them static. Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
* eglut: introduce eglut_wsi_interfaceHoe Hao Cheng2023-04-042-0/+92
| | | | | | | The goal is to unify the *_x11 and *_wayland binaries into one, just like how the Vulkan demo does it. Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
* glad: update instructions for generating files in READMEHoe Hao Cheng2023-03-291-4/+2
| | | | Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
* treewide: switch to glad2Hoe Hao Cheng2023-03-29271-35706/+35406
| | | | Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
* meson: fix glx-detection without glvndErik Faye-Lund2023-03-271-4/+5
| | | | | | | | | | | | | | When build without GLVND, Mesa provides GLX as a part of libGL, just like XQuartz does on MacOS. There's nothing really macOS specific about this fallback, so let's drop the condition. And just for good measure, let's add in dep_gl as a dependency for the header-check here, in case some one decides to install libGL outside of the default include directory. Fixes: 34300551 ("meson: explicitly check for glx dependency") Closes: https://gitlab.freedesktop.org/mesa/demos/-/issues/36 Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* vulkan/wsi: use unsigned instead of uintpsykose2023-03-231-7/+7
| | | | | | uint is not a standard type name and fails to build against musl libc Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
* bump version to 9.0.0 for releasemesa-demos-9.0.0Erik Faye-Lund2023-03-221-1/+1
|
* osdemos: link to dep_osmesa rather than dep_glErik Faye-Lund2023-03-221-1/+1
| | | | | | | | This fixes the OSMesa demos for me, and matches what we did for the old Autotools build system. Closes: https://gitlab.freedesktop.org/mesa/demos/-/issues/35 Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* completely retire xmesa/fx codeErik Faye-Lund2023-03-149-460/+0
| | | | | | | | | | | | | | | This is ancient code that hasn't been hooked up to the build system since the conversion to autoconf, back in 2007. The code is here to support Mesa on Glide, which isn't something that hasn't been supported in Mesa since Mesa 7.2/3, released in 2009. We had a dummy implementation in Mesa that did nothing and always reported failure until 2017, but now even that is gone. It's about time to let this code go, as it has no chance to even build on new Mesa versions. Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* ci: enable mr-pipelinesErik Faye-Lund2023-03-141-0/+4
| | | | | | | | We need this for CI to work now, due to some changes on the gitlab infrastructure. See this link for details: https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/438#what-it-means-for-me-a-maintainer-of-a-project-part-of-gitlabfreedesktoporg
* tests/texdown: cast pointer to uintptr_tErik Faye-Lund2023-03-131-1/+1
| | | | | | This avoids a compiler-warning on MSVC. Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* demos/vao_demo: pass literal pointers through uintptr_tErik Faye-Lund2023-03-131-2/+2
| | | | | | This avoids a compiler-warning on MSVC. Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* meson: disable some msvc warnings for c++Erik Faye-Lund2023-03-131-0/+7
| | | | | | | | | The macro definition warning is about APIENTRY, which glad defines in an incompatible way with windows.h. But this is fixed in glad 2.x, so instead of tring to fix every single test to undef APIENTRY, let's just disable the warning until we land the glad 2.x upgrade. Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* meson: correct spellingErik Faye-Lund2023-03-131-1/+1
| | | | | | | This spelling-error originates in Mesa, but we copied it when we copied the initial list of warning-disables here. Whoops, let's fix it! Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* xdemos: require gl 3.2 headersErik Faye-Lund2023-03-132-19/+4
| | | | | | | | | The GL_VERSION_X_Y defines tells us that we have an gl.h file that supports OpenGL X.Y. Considering it's been well over a decade since OpenGL 3.2 was released, let's just always assume that it's recent enough. Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* demos: require gl 2.0 headersErik Faye-Lund2023-03-133-50/+28
| | | | | | | | | The GL_VERSION_X_Y defines tells us that we have an gl.h file that supports OpenGL X.Y. Considering it's been almost two decades since OpenGL 2.0 was released, let's just always assume that it's recent enough. Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* redbook: require gl 1.3 headersErik Faye-Lund2023-03-1310-101/+0
| | | | | | | | The GL_VERSION_X_Y defines tells us that we have an gl.h file that supports OpenGL X.Y. Considering it's been several decades since OpenGL 1.3 was released, let's just always assume that it's recent enough. Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* tests/texobj: require gl 1.1 headersErik Faye-Lund2023-03-131-26/+0
| | | | | | | | The GL_VERSION_1_1 define tells us that we have an gl.h file that supports OpenGL 1.1. Considering it's been several decades since OpenGL 1.1 was released, let's just always assume that it's recent enough. Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* demos/glinfo: make sure GL_SHADING_LANGUAGE_VERSION is definedErik Faye-Lund2023-03-131-0/+3
| | | | | | | | | | This is needed for Windows support here, because the Windows GL/gl.h header is missing the definition. Usually it'd be better to use GLAD for modern GL support on Windows, but this is an extremely simple program, so it doesn't seem worth it. Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* meson: avoid building unix-source on windowsErik Faye-Lund2023-03-131-1/+5
| | | | | | | | | This was already done for CMake in af9e1d12 ("cmake: texleak requires unix."), and we should have added a similar condition in the Meson build system as well, but we somehow missed it. Add that condition back. Fixes: 4973b62b ("add a meson build system") Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* update some WIN32 vs _WIN32 checksErik Faye-Lund2023-03-133-3/+3
| | | | | | | | When we did the switch to C11, we missed a few sources that doesn't currently build for Windows on CI. Let's fix these. Fixes: 49439b31 ("meson: update standard to C11 and C++17") Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* meson: use win_subsystem instead of gui_appErik Faye-Lund2023-03-101-1/+1
| | | | | | | gui_app has been deprecated, so let's switch to win_subsystem for the same effect instead. Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* tests: use gl2-functions for logsErik Faye-Lund2023-03-061-18/+21
| | | | | | | glGetInfoLogARB is only available in ARB_shader_objects, which we don't really use. So let's use the GL2 equivialents instead. Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* util: do not call gl2 through extra func-ptrsErik Faye-Lund2023-03-067-111/+45
| | | | | | | | Since we no longer support loading ARB shaders, using these function pointers makes no sense. They can only ever resolve to one function, and we already load that one through GLAD. Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* util: remove defective arb-shader fallbackErik Faye-Lund2023-03-061-26/+0
| | | | | | | | | | | | | We already call glCompileShader() without fallback to the ARB version in the CompileShaderText() function. In fact, we've been doing this for well over a decade now. The ARB-shader code-path is broken, and it seems nobody noticed until now. So let's just get rid of it. Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* util: use gl2 program-parametersErik Faye-Lund2023-03-061-3/+3
| | | | | | | There's no good reason to use the ARB versions instead of the non-ARB versions. Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* util: use gl2 program validationErik Faye-Lund2023-03-061-11/+4
| | | | | | | There's a glValidateProgram function in GL2 and later; let's use that instead of trying to use the ARB function and falling back to nothing. Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
* eglinfo: parse -v option for verbose visual infosHoe Hao Cheng2023-03-031-69/+175
| | | | Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
* eglinfo: fix the ifdef-guard in parse_args()Hoe Hao Cheng2023-03-031-1/+1
| | | | | | | Theoretically this only affects people compiling eglinfo with EGL 1.2 headers... Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
* eglinfo: print GPU memory infoHoe Hao Cheng2023-03-031-10/+13
| | | | Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
* eglinfo: parse -l for printing OpenGL limitsHoe Hao Cheng2023-03-031-4/+24
| | | | Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
* eglinfo: let createEGLContext() return version of the created contextHoe Hao Cheng2023-03-031-4/+13
| | | | | | | The version is returned in an integer consisting of 2 digits. First digit is the major version, second digit is the minor version. Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
* eglinfo: make PrintContextExtensions() return a stringHoe Hao Cheng2023-03-031-6/+7
| | | | | | | This will be useful in the following patches. Also, this is consistent with the other Print functions. Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
* eglinfo: parse -s option for single-extension-per-line outputHoe Hao Cheng2023-03-031-11/+18
| | | | Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>