Merge branch 'main' into geometry-nodes-simulation

This commit is contained in:
2023-03-28 11:48:25 +02:00
379 changed files with 15602 additions and 3574 deletions

View File

@@ -617,10 +617,12 @@ endif()
option(WITH_OPENGL "When off limits visibility of the opengl headers to just bf_gpu and gawain (temporary option for development purposes)" ON)
option(WITH_GPU_BUILDTIME_SHADER_BUILDER "Shader builder is a developer option enabling linting on GLSL during compilation" OFF)
option(WITH_RENDERDOC "Use Renderdoc API to capture frames" OFF)
mark_as_advanced(
WITH_OPENGL
WITH_GPU_BUILDTIME_SHADER_BUILDER
WITH_RENDERDOC
)
# Vulkan

View File

@@ -78,12 +78,7 @@ include(cmake/tbb.cmake)
include(cmake/python.cmake)
include(cmake/llvm.cmake)
include(cmake/osl.cmake)
option(USE_PIP_NUMPY "Install NumPy using pip wheel instead of building from source" OFF)
if(APPLE AND ("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64"))
set(USE_PIP_NUMPY ON)
else()
include(cmake/numpy.cmake)
endif()
include(cmake/numpy.cmake)
include(cmake/python_site_packages.cmake)
include(cmake/package_python.cmake)
include(cmake/openimageio.cmake)

View File

@@ -38,15 +38,6 @@ ExternalProject_Add(external_python_site_packages
--no-binary :all:
)
if(USE_PIP_NUMPY)
# Use only wheel (and not build from source) to stop NumPy from linking against buggy
# Accelerate framework backend on macOS. Official wheels are built with OpenBLAS.
ExternalProject_Add_Step(external_python_site_packages after_install
COMMAND ${PYTHON_BINARY} -m pip install --no-cache-dir numpy==${NUMPY_VERSION} --only-binary :all:
DEPENDEES install
)
endif()
add_dependencies(
external_python_site_packages
external_python

View File

@@ -80,6 +80,7 @@ set(_CLANG_FIND_COMPONENTS
clangAST
clangLex
clangBasic
clangSupport
)
set(_CLANG_LIBRARIES)
@@ -94,7 +95,9 @@ foreach(COMPONENT ${_CLANG_FIND_COMPONENTS})
PATH_SUFFIXES
lib64 lib
)
list(APPEND _CLANG_LIBRARIES "${CLANG_${UPPERCOMPONENT}_LIBRARY}")
if(CLANG_${UPPERCOMPONENT}_LIBRARY)
list(APPEND _CLANG_LIBRARIES "${CLANG_${UPPERCOMPONENT}_LIBRARY}")
endif()
endforeach()

View File

@@ -8,6 +8,7 @@
#include "loader.hpp"
#include <cstdint>
#include <fstream>
#include <unordered_map>

5
extern/renderdoc/README.blender vendored Normal file
View File

@@ -0,0 +1,5 @@
Project: Renderdoc APP
URL: https://github.com/baldurk/renderdoc/
License: MIT
Upstream version: d47e79ae079783935b8857d6a1730440eafb0b38
Local modifications: None

723
extern/renderdoc/include/renderdoc_app.h vendored Normal file
View File

@@ -0,0 +1,723 @@
/******************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2019-2023 Baldur Karlsson
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
******************************************************************************/
#pragma once
//////////////////////////////////////////////////////////////////////////////////////////////////
//
// Documentation for the API is available at https://renderdoc.org/docs/in_application_api.html
//
#if !defined(RENDERDOC_NO_STDINT)
#include <stdint.h>
#endif
#if defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER)
#define RENDERDOC_CC __cdecl
#elif defined(__linux__)
#define RENDERDOC_CC
#elif defined(__APPLE__)
#define RENDERDOC_CC
#else
#error "Unknown platform"
#endif
#ifdef __cplusplus
extern "C" {
#endif
//////////////////////////////////////////////////////////////////////////////////////////////////
// Constants not used directly in below API
// This is a GUID/magic value used for when applications pass a path where shader debug
// information can be found to match up with a stripped shader.
// the define can be used like so: const GUID RENDERDOC_ShaderDebugMagicValue =
// RENDERDOC_ShaderDebugMagicValue_value
#define RENDERDOC_ShaderDebugMagicValue_struct \
{ \
0xeab25520, 0x6670, 0x4865, 0x84, 0x29, 0x6c, 0x8, 0x51, 0x54, 0x00, 0xff \
}
// as an alternative when you want a byte array (assuming x86 endianness):
#define RENDERDOC_ShaderDebugMagicValue_bytearray \
{ \
0x20, 0x55, 0xb2, 0xea, 0x70, 0x66, 0x65, 0x48, 0x84, 0x29, 0x6c, 0x8, 0x51, 0x54, 0x00, 0xff \
}
// truncated version when only a uint64_t is available (e.g. Vulkan tags):
#define RENDERDOC_ShaderDebugMagicValue_truncated 0x48656670eab25520ULL
//////////////////////////////////////////////////////////////////////////////////////////////////
// RenderDoc capture options
//
typedef enum RENDERDOC_CaptureOption {
// Allow the application to enable vsync
//
// Default - enabled
//
// 1 - The application can enable or disable vsync at will
// 0 - vsync is force disabled
eRENDERDOC_Option_AllowVSync = 0,
// Allow the application to enable fullscreen
//
// Default - enabled
//
// 1 - The application can enable or disable fullscreen at will
// 0 - fullscreen is force disabled
eRENDERDOC_Option_AllowFullscreen = 1,
// Record API debugging events and messages
//
// Default - disabled
//
// 1 - Enable built-in API debugging features and records the results into
// the capture, which is matched up with events on replay
// 0 - no API debugging is forcibly enabled
eRENDERDOC_Option_APIValidation = 2,
eRENDERDOC_Option_DebugDeviceMode = 2, // deprecated name of this enum
// Capture CPU callstacks for API events
//
// Default - disabled
//
// 1 - Enables capturing of callstacks
// 0 - no callstacks are captured
eRENDERDOC_Option_CaptureCallstacks = 3,
// When capturing CPU callstacks, only capture them from actions.
// This option does nothing without the above option being enabled
//
// Default - disabled
//
// 1 - Only captures callstacks for actions.
// Ignored if CaptureCallstacks is disabled
// 0 - Callstacks, if enabled, are captured for every event.
eRENDERDOC_Option_CaptureCallstacksOnlyDraws = 4,
eRENDERDOC_Option_CaptureCallstacksOnlyActions = 4,
// Specify a delay in seconds to wait for a debugger to attach, after
// creating or injecting into a process, before continuing to allow it to run.
//
// 0 indicates no delay, and the process will run immediately after injection
//
// Default - 0 seconds
//
eRENDERDOC_Option_DelayForDebugger = 5,
// Verify buffer access. This includes checking the memory returned by a Map() call to
// detect any out-of-bounds modification, as well as initialising buffers with undefined contents
// to a marker value to catch use of uninitialised memory.
//
// NOTE: This option is only valid for OpenGL and D3D11. Explicit APIs such as D3D12 and Vulkan do
// not do the same kind of interception & checking and undefined contents are really undefined.
//
// Default - disabled
//
// 1 - Verify buffer access
// 0 - No verification is performed, and overwriting bounds may cause crashes or corruption in
// RenderDoc.
eRENDERDOC_Option_VerifyBufferAccess = 6,
// The old name for eRENDERDOC_Option_VerifyBufferAccess was eRENDERDOC_Option_VerifyMapWrites.
// This option now controls the filling of uninitialised buffers with 0xdddddddd which was
// previously always enabled
eRENDERDOC_Option_VerifyMapWrites = eRENDERDOC_Option_VerifyBufferAccess,
// Hooks any system API calls that create child processes, and injects
// RenderDoc into them recursively with the same options.
//
// Default - disabled
//
// 1 - Hooks into spawned child processes
// 0 - Child processes are not hooked by RenderDoc
eRENDERDOC_Option_HookIntoChildren = 7,
// By default RenderDoc only includes resources in the final capture necessary
// for that frame, this allows you to override that behaviour.
//
// Default - disabled
//
// 1 - all live resources at the time of capture are included in the capture
// and available for inspection
// 0 - only the resources referenced by the captured frame are included
eRENDERDOC_Option_RefAllResources = 8,
// **NOTE**: As of RenderDoc v1.1 this option has been deprecated. Setting or
// getting it will be ignored, to allow compatibility with older versions.
// In v1.1 the option acts as if it's always enabled.
//
// By default RenderDoc skips saving initial states for resources where the
// previous contents don't appear to be used, assuming that writes before
// reads indicate previous contents aren't used.
//
// Default - disabled
//
// 1 - initial contents at the start of each captured frame are saved, even if
// they are later overwritten or cleared before being used.
// 0 - unless a read is detected, initial contents will not be saved and will
// appear as black or empty data.
eRENDERDOC_Option_SaveAllInitials = 9,
// In APIs that allow for the recording of command lists to be replayed later,
// RenderDoc may choose to not capture command lists before a frame capture is
// triggered, to reduce overheads. This means any command lists recorded once
// and replayed many times will not be available and may cause a failure to
// capture.
//
// NOTE: This is only true for APIs where multithreading is difficult or
// discouraged. Newer APIs like Vulkan and D3D12 will ignore this option
// and always capture all command lists since the API is heavily oriented
// around it and the overheads have been reduced by API design.
//
// 1 - All command lists are captured from the start of the application
// 0 - Command lists are only captured if their recording begins during
// the period when a frame capture is in progress.
eRENDERDOC_Option_CaptureAllCmdLists = 10,
// Mute API debugging output when the API validation mode option is enabled
//
// Default - enabled
//
// 1 - Mute any API debug messages from being displayed or passed through
// 0 - API debugging is displayed as normal
eRENDERDOC_Option_DebugOutputMute = 11,
// Option to allow vendor extensions to be used even when they may be
// incompatible with RenderDoc and cause corrupted replays or crashes.
//
// Default - inactive
//
// No values are documented, this option should only be used when absolutely
// necessary as directed by a RenderDoc developer.
eRENDERDOC_Option_AllowUnsupportedVendorExtensions = 12,
} RENDERDOC_CaptureOption;
// Sets an option that controls how RenderDoc behaves on capture.
//
// Returns 1 if the option and value are valid
// Returns 0 if either is invalid and the option is unchanged
typedef int(RENDERDOC_CC *pRENDERDOC_SetCaptureOptionU32)(RENDERDOC_CaptureOption opt, uint32_t val);
typedef int(RENDERDOC_CC *pRENDERDOC_SetCaptureOptionF32)(RENDERDOC_CaptureOption opt, float val);
// Gets the current value of an option as a uint32_t
//
// If the option is invalid, 0xffffffff is returned
typedef uint32_t(RENDERDOC_CC *pRENDERDOC_GetCaptureOptionU32)(RENDERDOC_CaptureOption opt);
// Gets the current value of an option as a float
//
// If the option is invalid, -FLT_MAX is returned
typedef float(RENDERDOC_CC *pRENDERDOC_GetCaptureOptionF32)(RENDERDOC_CaptureOption opt);
typedef enum RENDERDOC_InputButton {
// '0' - '9' matches ASCII values
eRENDERDOC_Key_0 = 0x30,
eRENDERDOC_Key_1 = 0x31,
eRENDERDOC_Key_2 = 0x32,
eRENDERDOC_Key_3 = 0x33,
eRENDERDOC_Key_4 = 0x34,
eRENDERDOC_Key_5 = 0x35,
eRENDERDOC_Key_6 = 0x36,
eRENDERDOC_Key_7 = 0x37,
eRENDERDOC_Key_8 = 0x38,
eRENDERDOC_Key_9 = 0x39,
// 'A' - 'Z' matches ASCII values
eRENDERDOC_Key_A = 0x41,
eRENDERDOC_Key_B = 0x42,
eRENDERDOC_Key_C = 0x43,
eRENDERDOC_Key_D = 0x44,
eRENDERDOC_Key_E = 0x45,
eRENDERDOC_Key_F = 0x46,
eRENDERDOC_Key_G = 0x47,
eRENDERDOC_Key_H = 0x48,
eRENDERDOC_Key_I = 0x49,
eRENDERDOC_Key_J = 0x4A,
eRENDERDOC_Key_K = 0x4B,
eRENDERDOC_Key_L = 0x4C,
eRENDERDOC_Key_M = 0x4D,
eRENDERDOC_Key_N = 0x4E,
eRENDERDOC_Key_O = 0x4F,
eRENDERDOC_Key_P = 0x50,
eRENDERDOC_Key_Q = 0x51,
eRENDERDOC_Key_R = 0x52,
eRENDERDOC_Key_S = 0x53,
eRENDERDOC_Key_T = 0x54,
eRENDERDOC_Key_U = 0x55,
eRENDERDOC_Key_V = 0x56,
eRENDERDOC_Key_W = 0x57,
eRENDERDOC_Key_X = 0x58,
eRENDERDOC_Key_Y = 0x59,
eRENDERDOC_Key_Z = 0x5A,
// leave the rest of the ASCII range free
// in case we want to use it later
eRENDERDOC_Key_NonPrintable = 0x100,
eRENDERDOC_Key_Divide,
eRENDERDOC_Key_Multiply,
eRENDERDOC_Key_Subtract,
eRENDERDOC_Key_Plus,
eRENDERDOC_Key_F1,
eRENDERDOC_Key_F2,
eRENDERDOC_Key_F3,
eRENDERDOC_Key_F4,
eRENDERDOC_Key_F5,
eRENDERDOC_Key_F6,
eRENDERDOC_Key_F7,
eRENDERDOC_Key_F8,
eRENDERDOC_Key_F9,
eRENDERDOC_Key_F10,
eRENDERDOC_Key_F11,
eRENDERDOC_Key_F12,
eRENDERDOC_Key_Home,
eRENDERDOC_Key_End,
eRENDERDOC_Key_Insert,
eRENDERDOC_Key_Delete,
eRENDERDOC_Key_PageUp,
eRENDERDOC_Key_PageDn,
eRENDERDOC_Key_Backspace,
eRENDERDOC_Key_Tab,
eRENDERDOC_Key_PrtScrn,
eRENDERDOC_Key_Pause,
eRENDERDOC_Key_Max,
} RENDERDOC_InputButton;
// Sets which key or keys can be used to toggle focus between multiple windows
//
// If keys is NULL or num is 0, toggle keys will be disabled
typedef void(RENDERDOC_CC *pRENDERDOC_SetFocusToggleKeys)(RENDERDOC_InputButton *keys, int num);
// Sets which key or keys can be used to capture the next frame
//
// If keys is NULL or num is 0, captures keys will be disabled
typedef void(RENDERDOC_CC *pRENDERDOC_SetCaptureKeys)(RENDERDOC_InputButton *keys, int num);
typedef enum RENDERDOC_OverlayBits {
// This single bit controls whether the overlay is enabled or disabled globally
eRENDERDOC_Overlay_Enabled = 0x1,
// Show the average framerate over several seconds as well as min/max
eRENDERDOC_Overlay_FrameRate = 0x2,
// Show the current frame number
eRENDERDOC_Overlay_FrameNumber = 0x4,
// Show a list of recent captures, and how many captures have been made
eRENDERDOC_Overlay_CaptureList = 0x8,
// Default values for the overlay mask
eRENDERDOC_Overlay_Default = (eRENDERDOC_Overlay_Enabled | eRENDERDOC_Overlay_FrameRate |
eRENDERDOC_Overlay_FrameNumber | eRENDERDOC_Overlay_CaptureList),
// Enable all bits
eRENDERDOC_Overlay_All = ~0U,
// Disable all bits
eRENDERDOC_Overlay_None = 0,
} RENDERDOC_OverlayBits;
// returns the overlay bits that have been set
typedef uint32_t(RENDERDOC_CC *pRENDERDOC_GetOverlayBits)();
// sets the overlay bits with an and & or mask
typedef void(RENDERDOC_CC *pRENDERDOC_MaskOverlayBits)(uint32_t And, uint32_t Or);
// this function will attempt to remove RenderDoc's hooks in the application.
//
// Note: that this can only work correctly if done immediately after
// the module is loaded, before any API work happens. RenderDoc will remove its
// injected hooks and shut down. Behaviour is undefined if this is called
// after any API functions have been called, and there is still no guarantee of
// success.
typedef void(RENDERDOC_CC *pRENDERDOC_RemoveHooks)();
// DEPRECATED: compatibility for code compiled against pre-1.4.1 headers.
typedef pRENDERDOC_RemoveHooks pRENDERDOC_Shutdown;
// This function will unload RenderDoc's crash handler.
//
// If you use your own crash handler and don't want RenderDoc's handler to
// intercede, you can call this function to unload it and any unhandled
// exceptions will pass to the next handler.
typedef void(RENDERDOC_CC *pRENDERDOC_UnloadCrashHandler)();
// Sets the capture file path template
//
// pathtemplate is a UTF-8 string that gives a template for how captures will be named
// and where they will be saved.
//
// Any extension is stripped off the path, and captures are saved in the directory
// specified, and named with the filename and the frame number appended. If the
// directory does not exist it will be created, including any parent directories.
//
// If pathtemplate is NULL, the template will remain unchanged
//
// Example:
//
// SetCaptureFilePathTemplate("my_captures/example");
//
// Capture #1 -> my_captures/example_frame123.rdc
// Capture #2 -> my_captures/example_frame456.rdc
typedef void(RENDERDOC_CC *pRENDERDOC_SetCaptureFilePathTemplate)(const char *pathtemplate);
// returns the current capture path template, see SetCaptureFileTemplate above, as a UTF-8 string
typedef const char *(RENDERDOC_CC *pRENDERDOC_GetCaptureFilePathTemplate)();
// DEPRECATED: compatibility for code compiled against pre-1.1.2 headers.
typedef pRENDERDOC_SetCaptureFilePathTemplate pRENDERDOC_SetLogFilePathTemplate;
typedef pRENDERDOC_GetCaptureFilePathTemplate pRENDERDOC_GetLogFilePathTemplate;
// returns the number of captures that have been made
typedef uint32_t(RENDERDOC_CC *pRENDERDOC_GetNumCaptures)();
// This function returns the details of a capture, by index. New captures are added
// to the end of the list.
//
// filename will be filled with the absolute path to the capture file, as a UTF-8 string
// pathlength will be written with the length in bytes of the filename string
// timestamp will be written with the time of the capture, in seconds since the Unix epoch
//
// Any of the parameters can be NULL and they'll be skipped.
//
// The function will return 1 if the capture index is valid, or 0 if the index is invalid
// If the index is invalid, the values will be unchanged
//
// Note: when captures are deleted in the UI they will remain in this list, so the
// capture path may not exist anymore.
typedef uint32_t(RENDERDOC_CC *pRENDERDOC_GetCapture)(uint32_t idx, char *filename,
uint32_t *pathlength, uint64_t *timestamp);
// Sets the comments associated with a capture file. These comments are displayed in the
// UI program when opening.
//
// filePath should be a path to the capture file to add comments to. If set to NULL or ""
// the most recent capture file created made will be used instead.
// comments should be a NULL-terminated UTF-8 string to add as comments.
//
// Any existing comments will be overwritten.
typedef void(RENDERDOC_CC *pRENDERDOC_SetCaptureFileComments)(const char *filePath,
const char *comments);
// returns 1 if the RenderDoc UI is connected to this application, 0 otherwise
typedef uint32_t(RENDERDOC_CC *pRENDERDOC_IsTargetControlConnected)();
// DEPRECATED: compatibility for code compiled against pre-1.1.1 headers.
// This was renamed to IsTargetControlConnected in API 1.1.1, the old typedef is kept here for
// backwards compatibility with old code, it is castable either way since it's ABI compatible
// as the same function pointer type.
typedef pRENDERDOC_IsTargetControlConnected pRENDERDOC_IsRemoteAccessConnected;
// This function will launch the Replay UI associated with the RenderDoc library injected
// into the running application.
//
// if connectTargetControl is 1, the Replay UI will be launched with a command line parameter
// to connect to this application
// cmdline is the rest of the command line, as a UTF-8 string. E.g. a captures to open
// if cmdline is NULL, the command line will be empty.
//
// returns the PID of the replay UI if successful, 0 if not successful.
typedef uint32_t(RENDERDOC_CC *pRENDERDOC_LaunchReplayUI)(uint32_t connectTargetControl,
const char *cmdline);
// RenderDoc can return a higher version than requested if it's backwards compatible,
// this function returns the actual version returned. If a parameter is NULL, it will be
// ignored and the others will be filled out.
typedef void(RENDERDOC_CC *pRENDERDOC_GetAPIVersion)(int *major, int *minor, int *patch);
// Requests that the replay UI show itself (if hidden or not the current top window). This can be
// used in conjunction with IsTargetControlConnected and LaunchReplayUI to intelligently handle
// showing the UI after making a capture.
//
// This will return 1 if the request was successfully passed on, though it's not guaranteed that
// the UI will be on top in all cases depending on OS rules. It will return 0 if there is no current
// target control connection to make such a request, or if there was another error
typedef uint32_t(RENDERDOC_CC *pRENDERDOC_ShowReplayUI)();
//////////////////////////////////////////////////////////////////////////
// Capturing functions
//
// A device pointer is a pointer to the API's root handle.
//
// This would be an ID3D11Device, HGLRC/GLXContext, ID3D12Device, etc
typedef void *RENDERDOC_DevicePointer;
// A window handle is the OS's native window handle
//
// This would be an HWND, GLXDrawable, etc
typedef void *RENDERDOC_WindowHandle;
// A helper macro for Vulkan, where the device handle cannot be used directly.
//
// Passing the VkInstance to this macro will return the RENDERDOC_DevicePointer to use.
//
// Specifically, the value needed is the dispatch table pointer, which sits as the first
// pointer-sized object in the memory pointed to by the VkInstance. Thus we cast to a void** and
// indirect once.
#define RENDERDOC_DEVICEPOINTER_FROM_VKINSTANCE(inst) (*((void **)(inst)))
// This sets the RenderDoc in-app overlay in the API/window pair as 'active' and it will
// respond to keypresses. Neither parameter can be NULL
typedef void(RENDERDOC_CC *pRENDERDOC_SetActiveWindow)(RENDERDOC_DevicePointer device,
RENDERDOC_WindowHandle wndHandle);
// capture the next frame on whichever window and API is currently considered active
typedef void(RENDERDOC_CC *pRENDERDOC_TriggerCapture)();
// capture the next N frames on whichever window and API is currently considered active
typedef void(RENDERDOC_CC *pRENDERDOC_TriggerMultiFrameCapture)(uint32_t numFrames);
// When choosing either a device pointer or a window handle to capture, you can pass NULL.
// Passing NULL specifies a 'wildcard' match against anything. This allows you to specify
// any API rendering to a specific window, or a specific API instance rendering to any window,
// or in the simplest case of one window and one API, you can just pass NULL for both.
//
// In either case, if there are two or more possible matching (device,window) pairs it
// is undefined which one will be captured.
//
// Note: for headless rendering you can pass NULL for the window handle and either specify
// a device pointer or leave it NULL as above.
// Immediately starts capturing API calls on the specified device pointer and window handle.
//
// If there is no matching thing to capture (e.g. no supported API has been initialised),
// this will do nothing.
//
// The results are undefined (including crashes) if two captures are started overlapping,
// even on separate devices and/oror windows.
typedef void(RENDERDOC_CC *pRENDERDOC_StartFrameCapture)(RENDERDOC_DevicePointer device,
RENDERDOC_WindowHandle wndHandle);
// Returns whether or not a frame capture is currently ongoing anywhere.
//
// This will return 1 if a capture is ongoing, and 0 if there is no capture running
typedef uint32_t(RENDERDOC_CC *pRENDERDOC_IsFrameCapturing)();
// Ends capturing immediately.
//
// This will return 1 if the capture succeeded, and 0 if there was an error capturing.
typedef uint32_t(RENDERDOC_CC *pRENDERDOC_EndFrameCapture)(RENDERDOC_DevicePointer device,
RENDERDOC_WindowHandle wndHandle);
// Ends capturing immediately and discard any data stored without saving to disk.
//
// This will return 1 if the capture was discarded, and 0 if there was an error or no capture
// was in progress
typedef uint32_t(RENDERDOC_CC *pRENDERDOC_DiscardFrameCapture)(RENDERDOC_DevicePointer device,
RENDERDOC_WindowHandle wndHandle);
// Only valid to be called between a call to StartFrameCapture and EndFrameCapture. Gives a custom
// title to the capture produced which will be displayed in the UI.
//
// If multiple captures are ongoing, this title will be applied to the first capture to end after
// this call. The second capture to end will have no title, unless this function is called again.
//
// Calling this function has no effect if no capture is currently running
typedef void(RENDERDOC_CC *pRENDERDOC_SetCaptureTitle)(const char *title);
//////////////////////////////////////////////////////////////////////////////////////////////////
// RenderDoc API versions
//
// RenderDoc uses semantic versioning (http://semver.org/).
//
// MAJOR version is incremented when incompatible API changes happen.
// MINOR version is incremented when functionality is added in a backwards-compatible manner.
// PATCH version is incremented when backwards-compatible bug fixes happen.
//
// Note that this means the API returned can be higher than the one you might have requested.
// e.g. if you are running against a newer RenderDoc that supports 1.0.1, it will be returned
// instead of 1.0.0. You can check this with the GetAPIVersion entry point
typedef enum RENDERDOC_Version {
eRENDERDOC_API_Version_1_0_0 = 10000, // RENDERDOC_API_1_0_0 = 1 00 00
eRENDERDOC_API_Version_1_0_1 = 10001, // RENDERDOC_API_1_0_1 = 1 00 01
eRENDERDOC_API_Version_1_0_2 = 10002, // RENDERDOC_API_1_0_2 = 1 00 02
eRENDERDOC_API_Version_1_1_0 = 10100, // RENDERDOC_API_1_1_0 = 1 01 00
eRENDERDOC_API_Version_1_1_1 = 10101, // RENDERDOC_API_1_1_1 = 1 01 01
eRENDERDOC_API_Version_1_1_2 = 10102, // RENDERDOC_API_1_1_2 = 1 01 02
eRENDERDOC_API_Version_1_2_0 = 10200, // RENDERDOC_API_1_2_0 = 1 02 00
eRENDERDOC_API_Version_1_3_0 = 10300, // RENDERDOC_API_1_3_0 = 1 03 00
eRENDERDOC_API_Version_1_4_0 = 10400, // RENDERDOC_API_1_4_0 = 1 04 00
eRENDERDOC_API_Version_1_4_1 = 10401, // RENDERDOC_API_1_4_1 = 1 04 01
eRENDERDOC_API_Version_1_4_2 = 10402, // RENDERDOC_API_1_4_2 = 1 04 02
eRENDERDOC_API_Version_1_5_0 = 10500, // RENDERDOC_API_1_5_0 = 1 05 00
eRENDERDOC_API_Version_1_6_0 = 10600, // RENDERDOC_API_1_6_0 = 1 06 00
} RENDERDOC_Version;
// API version changelog:
//
// 1.0.0 - initial release
// 1.0.1 - Bugfix: IsFrameCapturing() was returning false for captures that were triggered
// by keypress or TriggerCapture, instead of Start/EndFrameCapture.
// 1.0.2 - Refactor: Renamed eRENDERDOC_Option_DebugDeviceMode to eRENDERDOC_Option_APIValidation
// 1.1.0 - Add feature: TriggerMultiFrameCapture(). Backwards compatible with 1.0.x since the new
// function pointer is added to the end of the struct, the original layout is identical
// 1.1.1 - Refactor: Renamed remote access to target control (to better disambiguate from remote
// replay/remote server concept in replay UI)
// 1.1.2 - Refactor: Renamed "log file" in function names to just capture, to clarify that these
// are captures and not debug logging files. This is the first API version in the v1.0
// branch.
// 1.2.0 - Added feature: SetCaptureFileComments() to add comments to a capture file that will be
// displayed in the UI program on load.
// 1.3.0 - Added feature: New capture option eRENDERDOC_Option_AllowUnsupportedVendorExtensions
// which allows users to opt-in to allowing unsupported vendor extensions to function.
// Should be used at the user's own risk.
// Refactor: Renamed eRENDERDOC_Option_VerifyMapWrites to
// eRENDERDOC_Option_VerifyBufferAccess, which now also controls initialisation to
// 0xdddddddd of uninitialised buffer contents.
// 1.4.0 - Added feature: DiscardFrameCapture() to discard a frame capture in progress and stop
// capturing without saving anything to disk.
// 1.4.1 - Refactor: Renamed Shutdown to RemoveHooks to better clarify what is happening
// 1.4.2 - Refactor: Renamed 'draws' to 'actions' in callstack capture option.
// 1.5.0 - Added feature: ShowReplayUI() to request that the replay UI show itself if connected
// 1.6.0 - Added feature: SetCaptureTitle() which can be used to set a title for a
// capture made with StartFrameCapture() or EndFrameCapture()
typedef struct RENDERDOC_API_1_6_0
{
pRENDERDOC_GetAPIVersion GetAPIVersion;
pRENDERDOC_SetCaptureOptionU32 SetCaptureOptionU32;
pRENDERDOC_SetCaptureOptionF32 SetCaptureOptionF32;
pRENDERDOC_GetCaptureOptionU32 GetCaptureOptionU32;
pRENDERDOC_GetCaptureOptionF32 GetCaptureOptionF32;
pRENDERDOC_SetFocusToggleKeys SetFocusToggleKeys;
pRENDERDOC_SetCaptureKeys SetCaptureKeys;
pRENDERDOC_GetOverlayBits GetOverlayBits;
pRENDERDOC_MaskOverlayBits MaskOverlayBits;
// Shutdown was renamed to RemoveHooks in 1.4.1.
// These unions allow old code to continue compiling without changes
union
{
pRENDERDOC_Shutdown Shutdown;
pRENDERDOC_RemoveHooks RemoveHooks;
};
pRENDERDOC_UnloadCrashHandler UnloadCrashHandler;
// Get/SetLogFilePathTemplate was renamed to Get/SetCaptureFilePathTemplate in 1.1.2.
// These unions allow old code to continue compiling without changes
union
{
// deprecated name
pRENDERDOC_SetLogFilePathTemplate SetLogFilePathTemplate;
// current name
pRENDERDOC_SetCaptureFilePathTemplate SetCaptureFilePathTemplate;
};
union
{
// deprecated name
pRENDERDOC_GetLogFilePathTemplate GetLogFilePathTemplate;
// current name
pRENDERDOC_GetCaptureFilePathTemplate GetCaptureFilePathTemplate;
};
pRENDERDOC_GetNumCaptures GetNumCaptures;
pRENDERDOC_GetCapture GetCapture;
pRENDERDOC_TriggerCapture TriggerCapture;
// IsRemoteAccessConnected was renamed to IsTargetControlConnected in 1.1.1.
// This union allows old code to continue compiling without changes
union
{
// deprecated name
pRENDERDOC_IsRemoteAccessConnected IsRemoteAccessConnected;
// current name
pRENDERDOC_IsTargetControlConnected IsTargetControlConnected;
};
pRENDERDOC_LaunchReplayUI LaunchReplayUI;
pRENDERDOC_SetActiveWindow SetActiveWindow;
pRENDERDOC_StartFrameCapture StartFrameCapture;
pRENDERDOC_IsFrameCapturing IsFrameCapturing;
pRENDERDOC_EndFrameCapture EndFrameCapture;
// new function in 1.1.0
pRENDERDOC_TriggerMultiFrameCapture TriggerMultiFrameCapture;
// new function in 1.2.0
pRENDERDOC_SetCaptureFileComments SetCaptureFileComments;
// new function in 1.4.0
pRENDERDOC_DiscardFrameCapture DiscardFrameCapture;
// new function in 1.5.0
pRENDERDOC_ShowReplayUI ShowReplayUI;
// new function in 1.6.0
pRENDERDOC_SetCaptureTitle SetCaptureTitle;
} RENDERDOC_API_1_6_0;
typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_0_0;
typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_0_1;
typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_0_2;
typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_1_0;
typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_1_1;
typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_1_2;
typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_2_0;
typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_3_0;
typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_4_0;
typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_4_1;
typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_4_2;
typedef RENDERDOC_API_1_6_0 RENDERDOC_API_1_5_0;
//////////////////////////////////////////////////////////////////////////////////////////////////
// RenderDoc API entry point
//
// This entry point can be obtained via GetProcAddress/dlsym if RenderDoc is available.
//
// The name is the same as the typedef - "RENDERDOC_GetAPI"
//
// This function is not thread safe, and should not be called on multiple threads at once.
// Ideally, call this once as early as possible in your application's startup, before doing
// any API work, since some configuration functionality etc has to be done also before
// initialising any APIs.
//
// Parameters:
// version is a single value from the RENDERDOC_Version above.
//
// outAPIPointers will be filled out with a pointer to the corresponding struct of function
// pointers.
//
// Returns:
// 1 - if the outAPIPointers has been filled with a pointer to the API struct requested
// 0 - if the requested version is not supported or the arguments are invalid.
//
typedef int(RENDERDOC_CC *pRENDERDOC_GetAPI)(RENDERDOC_Version version, void **outAPIPointers);
#ifdef __cplusplus
} // extern "C"
#endif

View File

@@ -7,7 +7,7 @@ set(INC
)
set(INC_SYS
${X11_X11_INCLUDE_PATH}
)
set(SRC

View File

@@ -67,6 +67,10 @@ if(UNIX AND NOT APPLE)
add_subdirectory(libc_compat)
endif()
if (WITH_RENDERDOC)
add_subdirectory(renderdoc_dynload)
endif()
if(UNIX AND NOT APPLE)
# Important this comes after "ghost" as it uses includes defined by GHOST's CMake.
if(WITH_GHOST_WAYLAND AND WITH_GHOST_WAYLAND_DYNLOAD)

View File

@@ -309,7 +309,7 @@ class Device {
static uint devices_initialized_mask;
};
/* Device, which is GPU, with some common functionality for GPU backends */
/* Device, which is GPU, with some common functionality for GPU back-ends. */
class GPUDevice : public Device {
protected:
GPUDevice(const DeviceInfo &info_, Stats &stats_, Profiler &profiler_)

View File

@@ -204,7 +204,7 @@ ccl_device bool integrator_init_from_bake(KernelGlobals kg,
ray.time = 0.5f;
ray.dP = differential_zero_compact();
ray.dD = differential_zero_compact();
integrator_state_write_ray(kg, state, &ray);
integrator_state_write_ray(state, &ray);
/* Setup next kernel to execute. */
integrator_path_init(kg, state, DEVICE_KERNEL_INTEGRATOR_SHADE_BACKGROUND);
@@ -299,7 +299,7 @@ ccl_device bool integrator_init_from_bake(KernelGlobals kg,
ray.dD = differential_zero_compact();
/* Write ray. */
integrator_state_write_ray(kg, state, &ray);
integrator_state_write_ray(state, &ray);
/* Setup and write intersection. */
Intersection isect ccl_optional_struct_init;
@@ -309,7 +309,7 @@ ccl_device bool integrator_init_from_bake(KernelGlobals kg,
isect.v = v;
isect.t = 1.0f;
isect.type = PRIMITIVE_TRIANGLE;
integrator_state_write_isect(kg, state, &isect);
integrator_state_write_isect(state, &isect);
/* Setup next kernel to execute. */
const bool use_caustics = kernel_data.integrator.use_caustics &&

View File

@@ -85,7 +85,7 @@ ccl_device bool integrator_init_from_camera(KernelGlobals kg,
}
/* Write camera ray to state. */
integrator_state_write_ray(kg, state, &ray);
integrator_state_write_ray(state, &ray);
}
/* Initialize path state for path integration. */

View File

@@ -150,7 +150,7 @@ ccl_device_forceinline void integrator_intersect_next_kernel_after_shadow_catche
/* Continue with shading shadow catcher surface. Same as integrator_split_shadow_catcher, but
* using NEXT instead of INIT. */
Intersection isect ccl_optional_struct_init;
integrator_state_read_isect(kg, state, &isect);
integrator_state_read_isect(state, &isect);
const int shader = intersection_get_shader(kg, &isect);
const int flags = kernel_data_fetch(shaders, shader).flags;
@@ -326,7 +326,7 @@ ccl_device void integrator_intersect_closest(KernelGlobals kg,
/* Read ray from integrator state into local memory. */
Ray ray ccl_optional_struct_init;
integrator_state_read_ray(kg, state, &ray);
integrator_state_read_ray(state, &ray);
kernel_assert(ray.tmax != 0.0f);
const uint visibility = path_state_ray_visibility(state);
@@ -397,7 +397,7 @@ ccl_device void integrator_intersect_closest(KernelGlobals kg,
}
/* Write intersection result into global integrator state memory. */
integrator_state_write_isect(kg, state, &isect);
integrator_state_write_isect(state, &isect);
/* Setup up next kernel to be executed. */
integrator_intersect_next_kernel<DEVICE_KERNEL_INTEGRATOR_INTERSECT_CLOSEST>(

View File

@@ -142,7 +142,7 @@ ccl_device void integrator_intersect_shadow(KernelGlobals kg, IntegratorShadowSt
/* Read ray from integrator state into local memory. */
Ray ray ccl_optional_struct_init;
integrator_state_read_shadow_ray(kg, state, &ray);
integrator_state_read_shadow_ray(state, &ray);
ray.self.object = INTEGRATOR_STATE_ARRAY(state, shadow_isect, 0, object);
ray.self.prim = INTEGRATOR_STATE_ARRAY(state, shadow_isect, 0, prim);
ray.self.light_object = INTEGRATOR_STATE_ARRAY(state, shadow_isect, 1, object);

View File

@@ -73,7 +73,7 @@ ccl_device void integrator_volume_stack_init(KernelGlobals kg, IntegratorState s
ccl_private ShaderData *stack_sd = AS_SHADER_DATA(&stack_sd_storage);
Ray volume_ray ccl_optional_struct_init;
integrator_state_read_ray(kg, state, &volume_ray);
integrator_state_read_ray(state, &volume_ray);
/* Trace ray in random direction. Any direction works, Z up is a guess to get the
* fewest hits. */

View File

@@ -16,7 +16,7 @@ ccl_device_inline void integrate_light(KernelGlobals kg,
{
/* Setup light sample. */
Intersection isect ccl_optional_struct_init;
integrator_state_read_isect(kg, state, &isect);
integrator_state_read_isect(state, &isect);
guiding_record_light_surface_segment(kg, state, &isect);

View File

@@ -35,7 +35,7 @@ ccl_device_inline Spectrum integrate_transparent_surface_shadow(KernelGlobals kg
integrator_state_read_shadow_isect(state, &isect, hit);
Ray ray ccl_optional_struct_init;
integrator_state_read_shadow_ray(kg, state, &ray);
integrator_state_read_shadow_ray(state, &ray);
shader_setup_from_ray(kg, shadow_sd, &ray, &isect);
@@ -70,7 +70,7 @@ ccl_device_inline void integrate_transparent_volume_shadow(KernelGlobals kg,
/* Setup shader data. */
Ray ray ccl_optional_struct_init;
integrator_state_read_shadow_ray(kg, state, &ray);
integrator_state_read_shadow_ray(state, &ray);
ray.self.object = OBJECT_NONE;
ray.self.prim = PRIM_NONE;
ray.self.light_object = OBJECT_NONE;

View File

@@ -24,10 +24,10 @@ ccl_device_forceinline void integrate_surface_shader_setup(KernelGlobals kg,
ccl_private ShaderData *sd)
{
Intersection isect ccl_optional_struct_init;
integrator_state_read_isect(kg, state, &isect);
integrator_state_read_isect(state, &isect);
Ray ray ccl_optional_struct_init;
integrator_state_read_ray(kg, state, &ray);
integrator_state_read_ray(state, &ray);
shader_setup_from_ray(kg, sd, &ray, &isect);
}
@@ -253,7 +253,7 @@ ccl_device_forceinline void integrate_surface_direct_light(KernelGlobals kg,
}
/* Write shadow ray and associated state to global memory. */
integrator_state_write_shadow_ray(kg, shadow_state, &ray);
integrator_state_write_shadow_ray(shadow_state, &ray);
// Save memory by storing the light and object indices in the shadow_isect
INTEGRATOR_STATE_ARRAY_WRITE(shadow_state, shadow_isect, 0, object) = ray.self.object;
INTEGRATOR_STATE_ARRAY_WRITE(shadow_state, shadow_isect, 0, prim) = ray.self.prim;
@@ -548,7 +548,7 @@ ccl_device_forceinline void integrate_surface_ao(KernelGlobals kg,
integrator_state_copy_volume_stack_to_shadow(kg, shadow_state, state);
/* Write shadow ray and associated state to global memory. */
integrator_state_write_shadow_ray(kg, shadow_state, &ray);
integrator_state_write_shadow_ray(shadow_state, &ray);
INTEGRATOR_STATE_ARRAY_WRITE(shadow_state, shadow_isect, 0, object) = ray.self.object;
INTEGRATOR_STATE_ARRAY_WRITE(shadow_state, shadow_isect, 0, prim) = ray.self.prim;
INTEGRATOR_STATE_ARRAY_WRITE(shadow_state, shadow_isect, 1, object) = ray.self.light_object;

View File

@@ -827,7 +827,7 @@ ccl_device_forceinline void integrate_volume_direct_light(
kg, state, DEVICE_KERNEL_INTEGRATOR_INTERSECT_SHADOW, false);
/* Write shadow ray and associated state to global memory. */
integrator_state_write_shadow_ray(kg, shadow_state, &ray);
integrator_state_write_shadow_ray(shadow_state, &ray);
INTEGRATOR_STATE_ARRAY_WRITE(shadow_state, shadow_isect, 0, object) = ray.self.object;
INTEGRATOR_STATE_ARRAY_WRITE(shadow_state, shadow_isect, 0, prim) = ray.self.prim;
INTEGRATOR_STATE_ARRAY_WRITE(shadow_state, shadow_isect, 1, object) = ray.self.light_object;
@@ -1172,10 +1172,10 @@ ccl_device void integrator_shade_volume(KernelGlobals kg,
#ifdef __VOLUME__
/* Setup shader data. */
Ray ray ccl_optional_struct_init;
integrator_state_read_ray(kg, state, &ray);
integrator_state_read_ray(state, &ray);
Intersection isect ccl_optional_struct_init;
integrator_state_read_isect(kg, state, &isect);
integrator_state_read_isect(state, &isect);
/* Set ray length to current segment. */
ray.tmax = (isect.prim != PRIM_NONE) ? isect.t : FLT_MAX;

View File

@@ -11,8 +11,7 @@ CCL_NAMESPACE_BEGIN
/* Ray */
ccl_device_forceinline void integrator_state_write_ray(KernelGlobals kg,
IntegratorState state,
ccl_device_forceinline void integrator_state_write_ray(IntegratorState state,
ccl_private const Ray *ccl_restrict ray)
{
INTEGRATOR_STATE_WRITE(state, ray, P) = ray->P;
@@ -24,8 +23,7 @@ ccl_device_forceinline void integrator_state_write_ray(KernelGlobals kg,
INTEGRATOR_STATE_WRITE(state, ray, dD) = ray->dD;
}
ccl_device_forceinline void integrator_state_read_ray(KernelGlobals kg,
ConstIntegratorState state,
ccl_device_forceinline void integrator_state_read_ray(ConstIntegratorState state,
ccl_private Ray *ccl_restrict ray)
{
ray->P = INTEGRATOR_STATE(state, ray, P);
@@ -40,7 +38,7 @@ ccl_device_forceinline void integrator_state_read_ray(KernelGlobals kg,
/* Shadow Ray */
ccl_device_forceinline void integrator_state_write_shadow_ray(
KernelGlobals kg, IntegratorShadowState state, ccl_private const Ray *ccl_restrict ray)
IntegratorShadowState state, ccl_private const Ray *ccl_restrict ray)
{
INTEGRATOR_STATE_WRITE(state, shadow_ray, P) = ray->P;
INTEGRATOR_STATE_WRITE(state, shadow_ray, D) = ray->D;
@@ -50,8 +48,7 @@ ccl_device_forceinline void integrator_state_write_shadow_ray(
INTEGRATOR_STATE_WRITE(state, shadow_ray, dP) = ray->dP;
}
ccl_device_forceinline void integrator_state_read_shadow_ray(KernelGlobals kg,
ConstIntegratorShadowState state,
ccl_device_forceinline void integrator_state_read_shadow_ray(ConstIntegratorShadowState state,
ccl_private Ray *ccl_restrict ray)
{
ray->P = INTEGRATOR_STATE(state, shadow_ray, P);
@@ -66,7 +63,7 @@ ccl_device_forceinline void integrator_state_read_shadow_ray(KernelGlobals kg,
/* Intersection */
ccl_device_forceinline void integrator_state_write_isect(
KernelGlobals kg, IntegratorState state, ccl_private const Intersection *ccl_restrict isect)
IntegratorState state, ccl_private const Intersection *ccl_restrict isect)
{
INTEGRATOR_STATE_WRITE(state, isect, t) = isect->t;
INTEGRATOR_STATE_WRITE(state, isect, u) = isect->u;
@@ -77,7 +74,7 @@ ccl_device_forceinline void integrator_state_write_isect(
}
ccl_device_forceinline void integrator_state_read_isect(
KernelGlobals kg, ConstIntegratorState state, ccl_private Intersection *ccl_restrict isect)
ConstIntegratorState state, ccl_private Intersection *ccl_restrict isect)
{
isect->prim = INTEGRATOR_STATE(state, isect, prim);
isect->object = INTEGRATOR_STATE(state, isect, object);

View File

@@ -162,8 +162,8 @@ ccl_device_inline bool subsurface_scatter(KernelGlobals kg, IntegratorState stat
ray.P += ray.D * ray.tmax * 2.0f;
ray.D = -ray.D;
integrator_state_write_isect(kg, state, &ss_isect.hits[0]);
integrator_state_write_ray(kg, state, &ray);
integrator_state_write_isect(state, &ss_isect.hits[0]);
integrator_state_write_ray(state, &ray);
/* Advance random number offset for bounce. */
INTEGRATOR_STATE_WRITE(state, path, rng_offset) += PRNG_BOUNCE_NUM;

View File

@@ -161,7 +161,11 @@ ccl_device_inline void osl_eval_nodes(KernelGlobals kg,
/* shadeindex = */ 0);
# endif
# if __cplusplus < 201703L
if (type == SHADER_TYPE_DISPLACEMENT) {
# else
if constexpr (type == SHADER_TYPE_DISPLACEMENT) {
# endif
sd->P = globals.P;
}
else if (globals.Ci) {

View File

@@ -1646,8 +1646,8 @@ enum KernelFeatureFlag : uint32_t {
/* Must be constexpr on the CPU to avoid compile errors because the state types
* are different depending on the main, shadow or null path. For GPU we don't have
* C++17 everywhere so can't use it. */
#ifdef __KERNEL_GPU__
* C++17 everywhere so need to check it. */
#if __cplusplus < 201703L
# define IF_KERNEL_FEATURE(feature) if ((node_feature_mask & (KERNEL_FEATURE_##feature)) != 0U)
# define IF_KERNEL_NODES_FEATURE(feature) \
if ((node_feature_mask & (KERNEL_FEATURE_NODE_##feature)) != 0U)

View File

@@ -442,6 +442,13 @@ void ColorSpaceManager::free_memory()
#endif
}
void ColorSpaceManager::init_fallback_config()
{
#ifdef WITH_OCIO
OCIO::SetCurrentConfig(OCIO::Config::CreateRaw());
#endif
}
/* Template instantiations so we don't have to inline functions. */
template void ColorSpaceManager::to_scene_linear(ustring, uchar *, size_t, bool, bool);
template void ColorSpaceManager::to_scene_linear(ustring, ushort *, size_t, bool, bool);

View File

@@ -43,6 +43,12 @@ class ColorSpaceManager {
/* Clear memory when the application exits. Invalidates all processors. */
static void free_memory();
/* Create a fallback color space configuration.
*
* This may be useful to allow regression test to create a configuration which is considered
* valid without knowing the actual configuration used by the final application. */
static void init_fallback_config();
private:
static void is_builtin_colorspace(ustring colorspace, bool &is_no_op, bool &is_srgb);
};

View File

@@ -39,7 +39,8 @@ OrientationBounds merge(const OrientationBounds &cone_a, const OrientationBounds
b = &cone_a;
}
float theta_d = safe_acosf(dot(a->axis, b->axis));
float cos_a_b = dot(a->axis, b->axis);
float theta_d = safe_acosf(cos_a_b);
float theta_e = fmaxf(a->theta_e, b->theta_e);
/* Return axis and theta_o of a if it already contains b. */
@@ -55,10 +56,18 @@ OrientationBounds merge(const OrientationBounds &cone_a, const OrientationBounds
return OrientationBounds({a->axis, M_PI_F, theta_e});
}
/* Rotate new axis to be between a and b. */
float theta_r = theta_o - a->theta_o;
float3 new_axis = rotate_around_axis(a->axis, cross(a->axis, b->axis), theta_r);
new_axis = normalize(new_axis);
/* Slerp between a and b. */
float3 new_axis;
if (cos_a_b < -0.9995f) {
/* Opposite direction, any orthogonal vector is fine. */
float3 unused;
make_orthonormals(a->axis, &new_axis, &unused);
}
else {
float theta_r = theta_o - a->theta_o;
float3 ortho = normalize(b->axis - a->axis * cos_a_b);
new_axis = a->axis * cosf(theta_r) + ortho * sinf(theta_r);
}
return OrientationBounds({new_axis, theta_o, theta_e});
}

View File

@@ -6,6 +6,7 @@
#include "device/device.h"
#include "scene/colorspace.h"
#include "scene/scene.h"
#include "scene/shader_graph.h"
#include "scene/shader_nodes.h"
@@ -165,15 +166,29 @@ class RenderGraph : public testing::Test {
virtual void SetUp()
{
util_logging_start();
util_logging_verbosity_set(5);
/* The test is running outside of the typical application configuration when the OCIO is
* initialized prior to Cycles. Explicitly create the raw configuration to avoid the warning
* printed by the OCIO when accessing non-figured environment.
* Functionally it is the same as not doing this explicit call: the OCIO will warn and then do
* the same raw configuration. */
ColorSpaceManager::init_fallback_config();
device_cpu = Device::create(device_info, stats, profiler);
scene = new Scene(scene_params, device_cpu);
/* Initialize logging after the creation of the essential resources. This way the logging
* mock sink does not warn about uninteresting messages which happens prior to the setup of
* the actual mock sinks. */
util_logging_start();
util_logging_verbosity_set(5);
}
virtual void TearDown()
{
/* Effectively disable logging, so that the next test suit starts in an environment which is
* not logging by default. */
util_logging_verbosity_set(0);
delete scene;
delete device_cpu;
}

View File

@@ -398,6 +398,10 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND)
generate_protocol_bindings(
"${WAYLAND_PROTOCOLS_DIR}/unstable/xdg-output/xdg-output-unstable-v1.xml"
)
# `xdg-activation`.
generate_protocol_bindings(
"${WAYLAND_PROTOCOLS_DIR}/staging/xdg-activation/xdg-activation-v1.xml"
)
# Pointer-constraints.
generate_protocol_bindings(
"${WAYLAND_PROTOCOLS_DIR}/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml"

View File

@@ -924,14 +924,9 @@ extern bool GHOST_setConsoleWindowState(GHOST_TConsoleWindowState action);
extern bool GHOST_UseNativePixels(void);
/**
* Warp the cursor, if supported.
* Return features which are supported by the GHOST back-end.
*/
extern bool GHOST_SupportsCursorWarp(void);
/**
* Support positioning windows (when false `wmWindow.x,y` are meaningless).
*/
extern bool GHOST_SupportsWindowPosition(void);
extern GHOST_TCapabilityFlag GHOST_GetCapabilities(void);
/**
* Assign the callback which generates a back-trace (may be NULL).

View File

@@ -304,28 +304,25 @@ class GHOST_ISystem {
* Ends full screen mode.
* \return Indication of success.
*/
virtual GHOST_TSuccess endFullScreen(void) = 0;
virtual GHOST_TSuccess endFullScreen() = 0;
/**
* Returns current full screen mode status.
* \return The current status.
*/
virtual bool getFullScreen(void) = 0;
virtual bool getFullScreen() = 0;
/**
* Native pixel size support (MacBook 'retina').
*/
virtual bool useNativePixel(void) = 0;
virtual bool useNativePixel() = 0;
/**
* Return true when warping the cursor is supported.
* Return features supported by the system back-end.
*
* The resulting value doesn't change at run-time.
*/
virtual bool supportsCursorWarp() = 0;
/**
* Return true getting/setting the window position is supported.
*/
virtual bool supportsWindowPosition() = 0;
virtual GHOST_TCapabilityFlag getCapabilities() const = 0;
/**
* Focus window after opening, or put them in the background.

View File

@@ -333,7 +333,7 @@ class GHOST_IWindow {
virtual GHOST_TSuccess beginFullScreen() const = 0;
virtual GHOST_TSuccess endFullScreen() const = 0;
virtual float getNativePixelSize(void) = 0;
virtual float getNativePixelSize() = 0;
/**
* Returns the recommended DPI for this window.

View File

@@ -9,6 +9,9 @@
#include <stdint.h>
/* This is used by `GHOST_C-api.h` too, cannot use C++ conventions. */
// NOLINTBEGIN: modernize-use-using
#ifdef WITH_CXX_GUARDEDALLOC
# include "MEM_guardedalloc.h"
#else
@@ -74,6 +77,37 @@ typedef void *GHOST_TUserDataPtr;
typedef enum { GHOST_kFailure = 0, GHOST_kSuccess } GHOST_TSuccess;
/**
* Static flag (relating to the back-ends support for features).
*
* \note When adding new capabilities, add to #GHOST_CAPABILITY_FLAG_ALL,
* then mask out of from the `getCapabilities(..)` callback with an explanation for why
* the feature is not supported.
*/
typedef enum {
/**
* Set when warping the cursor is supported (re-positioning the users cursor).
*/
GHOST_kCapabilityCursorWarp = (1 << 0),
/**
* Set when getting/setting the window position is supported.
*/
GHOST_kCapabilityWindowPosition = (1 << 1),
/**
* Set when a separate primary clipboard is supported.
* This is a convention for X11/WAYLAND, select text & MMB to paste (without an explicit copy).
*/
GHOST_kCapabilityPrimaryClipboard = (1 << 2),
} GHOST_TCapabilityFlag;
/**
* Back-ends should use this, masking out features which are not supported
* with notes as to why those features cannot be supported.
*/
#define GHOST_CAPABILITY_FLAG_ALL \
(GHOST_kCapabilityCursorWarp | GHOST_kCapabilityWindowPosition | \
GHOST_kCapabilityPrimaryClipboard)
/* Xtilt and Ytilt represent how much the pen is tilted away from
* vertically upright in either the X or Y direction, with X and Y the
* axes of the tablet surface.
@@ -848,3 +882,5 @@ typedef struct GHOST_XrControllerModelData {
} GHOST_XrControllerModelData;
#endif /* WITH_XR_OPENXR */
// NOLINTEND: modernize-use-using

View File

@@ -895,16 +895,10 @@ bool GHOST_UseNativePixels(void)
return system->useNativePixel();
}
bool GHOST_SupportsCursorWarp(void)
GHOST_TCapabilityFlag GHOST_GetCapabilities(void)
{
GHOST_ISystem *system = GHOST_ISystem::getSystem();
return system->supportsCursorWarp();
}
bool GHOST_SupportsWindowPosition(void)
{
GHOST_ISystem *system = GHOST_ISystem::getSystem();
return system->supportsWindowPosition();
return system->getCapabilities();
}
void GHOST_SetBacktraceHandler(GHOST_TBacktraceFn backtrace_fn)

View File

@@ -28,7 +28,7 @@ class GHOST_CallbackEventConsumer : public GHOST_IEventConsumer {
/**
* Destructor.
*/
~GHOST_CallbackEventConsumer(void)
~GHOST_CallbackEventConsumer()
{
}

View File

@@ -43,52 +43,52 @@ class GHOST_ContextEGL : public GHOST_Context {
/**
* Destructor.
*/
~GHOST_ContextEGL();
~GHOST_ContextEGL() override;
/**
* Swaps front and back buffers of a window.
* \return A boolean success indicator.
*/
GHOST_TSuccess swapBuffers();
GHOST_TSuccess swapBuffers() override;
/**
* Activates the drawing context of this window.
* \return A boolean success indicator.
*/
GHOST_TSuccess activateDrawingContext();
GHOST_TSuccess activateDrawingContext() override;
/**
* Release the drawing context of the calling thread.
* \return A boolean success indicator.
*/
GHOST_TSuccess releaseDrawingContext();
GHOST_TSuccess releaseDrawingContext() override;
/**
* Call immediately after new to initialize. If this fails then immediately delete the object.
* \return Indication as to whether initialization has succeeded.
*/
GHOST_TSuccess initializeDrawingContext();
GHOST_TSuccess initializeDrawingContext() override;
/**
* Removes references to native handles from this context and then returns
* \return GHOST_kSuccess if it is OK for the parent to release the handles and
* GHOST_kFailure if releasing the handles will interfere with sharing
*/
GHOST_TSuccess releaseNativeHandles();
GHOST_TSuccess releaseNativeHandles() override;
/**
* Sets the swap interval for #swapBuffers.
* \param interval: The swap interval to use.
* \return A boolean success indicator.
*/
GHOST_TSuccess setSwapInterval(int interval);
GHOST_TSuccess setSwapInterval(int interval) override;
/**
* Gets the current swap interval for #swapBuffers.
* \param intervalOut: Variable to store the swap interval if it can be read.
* \return Whether the swap interval can be read.
*/
GHOST_TSuccess getSwapInterval(int &intervalOut);
GHOST_TSuccess getSwapInterval(int &intervalOut) override;
EGLDisplay getDisplay() const;

View File

@@ -41,52 +41,52 @@ class GHOST_ContextGLX : public GHOST_Context {
/**
* Destructor.
*/
~GHOST_ContextGLX();
~GHOST_ContextGLX() override;
/**
* Swaps front and back buffers of a window.
* \return A boolean success indicator.
*/
GHOST_TSuccess swapBuffers();
GHOST_TSuccess swapBuffers() override;
/**
* Activates the drawing context of this window.
* \return A boolean success indicator.
*/
GHOST_TSuccess activateDrawingContext();
GHOST_TSuccess activateDrawingContext() override;
/**
* Release the drawing context of the calling thread.
* \return A boolean success indicator.
*/
GHOST_TSuccess releaseDrawingContext();
GHOST_TSuccess releaseDrawingContext() override;
/**
* Call immediately after new to initialize. If this fails then immediately delete the object.
* \return Indication as to whether initialization has succeeded.
*/
GHOST_TSuccess initializeDrawingContext();
GHOST_TSuccess initializeDrawingContext() override;
/**
* Removes references to native handles from this context and then returns
* \return GHOST_kSuccess if it is OK for the parent to release the handles and
* GHOST_kFailure if releasing the handles will interfere with sharing
*/
GHOST_TSuccess releaseNativeHandles();
GHOST_TSuccess releaseNativeHandles() override;
/**
* Sets the swap interval for #swapBuffers.
* \param interval: The swap interval to use.
* \return A boolean success indicator.
*/
GHOST_TSuccess setSwapInterval(int interval);
GHOST_TSuccess setSwapInterval(int interval) override;
/**
* Gets the current swap interval for #swapBuffers.
* \param intervalOut: Variable to store the swap interval if it can be read.
* \return Whether the swap interval can be read.
*/
GHOST_TSuccess getSwapInterval(int &intervalOut);
GHOST_TSuccess getSwapInterval(int &intervalOut) override;
private:
Display *m_display;

View File

@@ -21,50 +21,50 @@ class GHOST_ContextNone : public GHOST_Context {
* Dummy function
* \return Always succeeds
*/
GHOST_TSuccess swapBuffers();
GHOST_TSuccess swapBuffers() override;
/**
* Dummy function
* \return Always succeeds.
*/
GHOST_TSuccess activateDrawingContext();
GHOST_TSuccess activateDrawingContext() override;
/**
* Dummy function
* \return Always succeeds.
*/
GHOST_TSuccess releaseDrawingContext();
GHOST_TSuccess releaseDrawingContext() override;
/**
* Dummy function
* \return Always succeeds.
*/
GHOST_TSuccess updateDrawingContext();
GHOST_TSuccess updateDrawingContext() override;
/**
* Dummy function
* \return Always succeeds.
*/
GHOST_TSuccess initializeDrawingContext();
GHOST_TSuccess initializeDrawingContext() override;
/**
* Dummy function
* \return Always succeeds.
*/
GHOST_TSuccess releaseNativeHandles();
GHOST_TSuccess releaseNativeHandles() override;
/**
* Dummy function
* \return Always succeeds.
*/
GHOST_TSuccess setSwapInterval(int interval);
GHOST_TSuccess setSwapInterval(int interval) override;
/**
* Dummy function
* \param intervalOut: Gets whatever was set by #setSwapInterval.
* \return Always succeeds.
*/
GHOST_TSuccess getSwapInterval(int &intervalOut);
GHOST_TSuccess getSwapInterval(int &intervalOut) override;
private:
int m_swapInterval;

View File

@@ -41,52 +41,52 @@ class GHOST_ContextSDL : public GHOST_Context {
/**
* Destructor.
*/
~GHOST_ContextSDL();
~GHOST_ContextSDL() override;
/**
* Swaps front and back buffers of a window.
* \return A boolean success indicator.
*/
GHOST_TSuccess swapBuffers();
GHOST_TSuccess swapBuffers() override;
/**
* Activates the drawing context of this window.
* \return A boolean success indicator.
*/
GHOST_TSuccess activateDrawingContext();
GHOST_TSuccess activateDrawingContext() override;
/**
* Release the drawing context of the calling thread.
* \return A boolean success indicator.
*/
GHOST_TSuccess releaseDrawingContext();
GHOST_TSuccess releaseDrawingContext() override;
/**
* Call immediately after new to initialize. If this fails then immediately delete the object.
* \return Indication as to whether initialization has succeeded.
*/
GHOST_TSuccess initializeDrawingContext();
GHOST_TSuccess initializeDrawingContext() override;
/**
* Removes references to native handles from this context and then returns
* \return GHOST_kSuccess if it is OK for the parent to release the handles and
* GHOST_kFailure if releasing the handles will interfere with sharing
*/
GHOST_TSuccess releaseNativeHandles();
GHOST_TSuccess releaseNativeHandles() override;
/**
* Sets the swap interval for #swapBuffers.
* \param interval: The swap interval to use.
* \return A boolean success indicator.
*/
GHOST_TSuccess setSwapInterval(int interval);
GHOST_TSuccess setSwapInterval(int interval) override;
/**
* Gets the current swap interval for #swapBuffers.
* \param intervalOut: Variable to store the swap interval if it can be read.
* \return Whether the swap interval can be read.
*/
GHOST_TSuccess getSwapInterval(int &intervalOut);
GHOST_TSuccess getSwapInterval(int &intervalOut) override;
private:
SDL_Window *m_window;

View File

@@ -23,6 +23,9 @@
#include <cstdio>
#include <cstring>
#include <iostream>
#include <sstream>
#include <sys/stat.h>
/* Set to 0 to allow devices that do not have the required features.
* This allows development on OSX until we really needs these features. */
@@ -80,6 +83,21 @@ static const char *vulkan_error_as_string(VkResult result)
}
}
enum class VkLayer : uint8_t { KHRONOS_validation };
static bool vklayer_config_exist(const char *vk_extension_config)
{
const char *ev_val = getenv("VK_LAYER_PATH");
if (ev_val == nullptr) {
return false;
}
std::stringstream filename;
filename << ev_val;
filename << "/" << vk_extension_config;
struct stat buffer;
return (stat(filename.str().c_str(), &buffer) == 0);
}
#define __STR(A) "" #A
#define VK_CHECK(__expression) \
do { \
@@ -401,16 +419,38 @@ static bool checkLayerSupport(vector<VkLayerProperties> &layers_available, const
static void enableLayer(vector<VkLayerProperties> &layers_available,
vector<const char *> &layers_enabled,
const char *layer_name,
const bool debug)
const VkLayer layer,
const bool display_warning)
{
if (checkLayerSupport(layers_available, layer_name)) {
layers_enabled.push_back(layer_name);
#define PUSH_VKLAYER(name, name2) \
if (vklayer_config_exist("VkLayer_" #name ".json") && \
checkLayerSupport(layers_available, "VK_LAYER_" #name2)) { \
layers_enabled.push_back("VK_LAYER_" #name2); \
enabled = true; \
} \
else { \
warnings << "VK_LAYER_" #name2; \
}
else if (debug) {
fprintf(
stderr, "Warning: Layer requested, but not supported by the platform. [%s]\n", layer_name);
bool enabled = false;
std::stringstream warnings;
switch (layer) {
case VkLayer::KHRONOS_validation:
PUSH_VKLAYER(khronos_validation, KHRONOS_validation);
};
if (enabled) {
return;
}
if (display_warning) {
fprintf(stderr,
"Warning: Layer requested, but not supported by the platform. [%s] \n",
warnings.str().c_str());
}
#undef PUSH_VKLAYER
}
static bool device_extensions_support(VkPhysicalDevice device, vector<const char *> required_exts)
@@ -864,7 +904,7 @@ GHOST_TSuccess GHOST_ContextVK::initializeDrawingContext()
vector<const char *> layers_enabled;
if (m_debug) {
enableLayer(layers_available, layers_enabled, "VK_LAYER_KHRONOS_validation", m_debug);
enableLayer(layers_available, layers_enabled, VkLayer::KHRONOS_validation, m_debug);
}
vector<const char *> extensions_device;

View File

@@ -21,18 +21,18 @@ class GHOST_DisplayManager {
/**
* Constructor.
*/
GHOST_DisplayManager(void);
GHOST_DisplayManager();
/**
* Destructor.
*/
virtual ~GHOST_DisplayManager(void);
virtual ~GHOST_DisplayManager();
/**
* Initializes the list with devices and settings.
* \return Indication of success.
*/
virtual GHOST_TSuccess initialize(void);
virtual GHOST_TSuccess initialize();
/**
* Returns the number of display devices on this system.
@@ -98,7 +98,7 @@ class GHOST_DisplayManager {
* Retrieves settings for each display device and stores them.
* \return Indication of success.
*/
GHOST_TSuccess initializeSettings(void);
GHOST_TSuccess initializeSettings();
/** Tells whether the list of display modes has been stored already. */
bool m_settingsInitialized;

View File

@@ -49,12 +49,12 @@ class GHOST_DropTargetX11 {
/**
* Initialize XDND and all related X atoms
*/
void Initialize(void);
void Initialize();
/**
* Uninitialized XDND and all related X atoms
*/
void Uninitialize(void);
void Uninitialize();
/**
* Get data to be passed to event from text/URI-list mime type

View File

@@ -12,12 +12,12 @@
#include "GHOST_Types.h"
#include "intern/GHOST_Debug.h"
GHOST_TSuccess GHOST_CreateSystemPaths(void)
GHOST_TSuccess GHOST_CreateSystemPaths()
{
return GHOST_ISystemPaths::create();
}
GHOST_TSuccess GHOST_DisposeSystemPaths(void)
GHOST_TSuccess GHOST_DisposeSystemPaths()
{
return GHOST_ISystemPaths::dispose();
}

View File

@@ -418,16 +418,6 @@ void GHOST_System::setAutoFocus(const bool auto_focus)
m_autoFocus = auto_focus;
}
bool GHOST_System::supportsCursorWarp()
{
return true;
}
bool GHOST_System::supportsWindowPosition()
{
return true;
}
void GHOST_System::initDebug(GHOST_Debug debug)
{
m_is_debug_enabled = debug.flags & GHOST_kDebugDefault;

View File

@@ -135,24 +135,21 @@ class GHOST_System : public GHOST_ISystem {
* Ends full screen mode.
* \return Indication of success.
*/
GHOST_TSuccess endFullScreen(void);
GHOST_TSuccess endFullScreen();
/**
* Returns current full screen mode status.
* \return The current status.
*/
bool getFullScreen(void);
bool getFullScreen();
/**
* Native pixel size support (MacBook 'retina').
* \return The pixel size in float.
*/
bool useNativePixel(void);
bool useNativePixel();
bool m_nativePixel;
bool supportsCursorWarp(void);
bool supportsWindowPosition(void);
/**
* Focus window after opening, or put them in the background.
*/

View File

@@ -193,6 +193,8 @@ class GHOST_SystemCocoa : public GHOST_System {
*/
GHOST_TSuccess getButtons(GHOST_Buttons &buttons) const;
GHOST_TCapabilityFlag getCapabilities() const;
/**
* Returns Clipboard data
* \param selection: Indicate which buffer to return.

View File

@@ -900,6 +900,14 @@ GHOST_TSuccess GHOST_SystemCocoa::getButtons(GHOST_Buttons &buttons) const
return GHOST_kSuccess;
}
GHOST_TCapabilityFlag GHOST_SystemCocoa::getCapabilities() const
{
return GHOST_TCapabilityFlag(GHOST_CAPABILITY_FLAG_ALL &
~(
/* Cocoa has no support for a primary selection clipboard. */
GHOST_kCapabilityPrimaryClipboard));
}
#pragma mark Event handlers
/**

View File

@@ -42,6 +42,13 @@ class GHOST_SystemHeadless : public GHOST_System {
{
return GHOST_kSuccess;
}
GHOST_TCapabilityFlag getCapabilities() const override
{
return GHOST_TCapabilityFlag(GHOST_CAPABILITY_FLAG_ALL &
/* No windowing functionality supported. */
~(GHOST_kCapabilityWindowPosition | GHOST_kCapabilityCursorWarp |
GHOST_kCapabilityPrimaryClipboard));
}
char *getClipboard(bool /*selection*/) const override
{
return nullptr;

View File

@@ -715,7 +715,7 @@ GHOST_WindowSDL *GHOST_SystemSDL::findGhostWindow(SDL_Window *sdl_win)
if (sdl_win == nullptr) {
return nullptr;
}
/* It is not entirely safe to do this as the backptr may point
/* It is not entirely safe to do this as the back-pointer may point
* to a window that has recently been removed.
* We should always check the window manager's list of windows
* and only process events on these windows. */
@@ -751,6 +751,15 @@ GHOST_TSuccess GHOST_SystemSDL::getButtons(GHOST_Buttons &buttons) const
return GHOST_kSuccess;
}
GHOST_TCapabilityFlag GHOST_SystemSDL::getCapabilities() const
{
return GHOST_TCapabilityFlag(
GHOST_CAPABILITY_FLAG_ALL &
~(
/* This SDL back-end has not yet implemented primary clipboard. */
GHOST_kCapabilityPrimaryClipboard));
}
char *GHOST_SystemSDL::getClipboard(bool /*selection*/) const
{
return (char *)SDL_GetClipboardText();
@@ -761,7 +770,7 @@ void GHOST_SystemSDL::putClipboard(const char *buffer, bool /*selection*/) const
SDL_SetClipboardText(buffer);
}
uint64_t GHOST_SystemSDL::getMilliSeconds()
uint64_t GHOST_SystemSDL::getMilliSeconds() const
{
return uint64_t(SDL_GetTicks()); /* NOTE: 32 -> 64bits. */
}

View File

@@ -31,39 +31,41 @@ class GHOST_SystemSDL : public GHOST_System {
GHOST_SystemSDL();
~GHOST_SystemSDL();
bool processEvents(bool waitForEvent);
bool processEvents(bool waitForEvent) override;
bool setConsoleWindowState(GHOST_TConsoleWindowState /*action*/)
bool setConsoleWindowState(GHOST_TConsoleWindowState /*action*/) override
{
return false;
}
GHOST_TSuccess getModifierKeys(GHOST_ModifierKeys &keys) const;
GHOST_TSuccess getModifierKeys(GHOST_ModifierKeys &keys) const override;
GHOST_TSuccess getButtons(GHOST_Buttons &buttons) const;
GHOST_TSuccess getButtons(GHOST_Buttons &buttons) const override;
char *getClipboard(bool selection) const;
GHOST_TCapabilityFlag getCapabilities() const override;
void putClipboard(const char *buffer, bool selection) const;
char *getClipboard(bool selection) const override;
uint64_t getMilliSeconds();
void putClipboard(const char *buffer, bool selection) const override;
uint8_t getNumDisplays() const;
uint64_t getMilliSeconds() const override;
GHOST_TSuccess getCursorPosition(int32_t &x, int32_t &y) const;
uint8_t getNumDisplays() const override;
GHOST_TSuccess setCursorPosition(int32_t x, int32_t y);
GHOST_TSuccess getCursorPosition(int32_t &x, int32_t &y) const override;
void getAllDisplayDimensions(uint32_t &width, uint32_t &height) const;
GHOST_TSuccess setCursorPosition(int32_t x, int32_t y) override;
void getMainDisplayDimensions(uint32_t &width, uint32_t &height) const;
void getAllDisplayDimensions(uint32_t &width, uint32_t &height) const override;
GHOST_IContext *createOffscreenContext(GHOST_GLSettings glSettings);
void getMainDisplayDimensions(uint32_t &width, uint32_t &height) const override;
GHOST_TSuccess disposeContext(GHOST_IContext *context);
GHOST_IContext *createOffscreenContext(GHOST_GLSettings glSettings) override;
GHOST_TSuccess disposeContext(GHOST_IContext *context) override;
private:
GHOST_TSuccess init();
GHOST_TSuccess init() override;
GHOST_IWindow *createWindow(const char *title,
int32_t left,
@@ -74,7 +76,7 @@ class GHOST_SystemSDL : public GHOST_System {
GHOST_GLSettings glSettings,
const bool exclusive = false,
const bool is_dialog = false,
const GHOST_IWindow *parentWindow = NULL);
const GHOST_IWindow *parentWindow = nullptr) override;
/* SDL specific */
GHOST_WindowSDL *findGhostWindow(SDL_Window *sdl_win);

View File

@@ -59,6 +59,7 @@
#include <primary-selection-unstable-v1-client-protocol.h>
#include <relative-pointer-unstable-v1-client-protocol.h>
#include <tablet-unstable-v2-client-protocol.h>
#include <xdg-activation-v1-client-protocol.h>
#include <xdg-output-unstable-v1-client-protocol.h>
/* Decorations `xdg_decor`. */
@@ -798,7 +799,12 @@ struct GWL_Seat {
struct zwp_primary_selection_device_v1 *wp_primary_selection_device = nullptr;
struct GWL_PrimarySelection primary_selection;
/** Last device that was active. */
/**
* Last input device that was active (pointer/tablet/keyboard).
*
* \note Multi-touch gestures don't set this value,
* if there is some use-case where this is needed - assignments can be added.
*/
uint32_t data_source_serial = 0;
};
@@ -929,6 +935,7 @@ struct GWL_Display {
struct zwp_tablet_manager_v2 *wp_tablet_manager = nullptr;
struct zwp_relative_pointer_manager_v1 *wp_relative_pointer_manager = nullptr;
struct zwp_primary_selection_device_manager_v1 *wp_primary_selection_device_manager = nullptr;
struct xdg_activation_v1 *xdg_activation_manager = nullptr;
struct zwp_pointer_constraints_v1 *wp_pointer_constraints = nullptr;
struct zwp_pointer_gestures_v1 *wp_pointer_gestures = nullptr;
@@ -1117,7 +1124,7 @@ using GWL_RegistryHandler_UpdateFn = void (*)(GWL_Display *display,
using GWL_RegistryEntry_RemoveFn = void (*)(GWL_Display *display, void *user_data, bool on_exit);
struct GWL_RegistryHandler {
/** Pointer to the name (not the name it's self), needed as the values aren't set on startup. */
/** Pointer to the name (not the name itself), needed as the values aren't set on startup. */
const char *const *interface_p = nullptr;
/** Add the interface. */
@@ -2016,7 +2023,13 @@ static char *read_file_as_buffer(const int fd, const bool nil_terminate, size_t
{
struct ByteChunk {
ByteChunk *next;
char data[4096 - sizeof(ByteChunk *)];
/* NOTE(@ideasman42): On GNOME-SHELL-43.3, non powers of two values
* (1023 or 4088 for e.g.) makes `read()` *intermittently* include uninitialized memory
* (failing to read the end of the chunk) as well as truncating the end of the whole buffer.
* The WAYLAND spec doesn't mention buffer-size so this may be a bug in GNOME-SHELL.
* Whatever the case, using a power of two isn't a problem (besides some slop-space waste).
* This workaround isn't necessary for KDE & WLROOTS based compositors, see: #106040. */
char data[4096];
};
ByteChunk *chunk_first = nullptr, **chunk_link_p = &chunk_first;
bool ok = true;
@@ -2664,13 +2677,7 @@ static void pointer_handle_enter(void *data,
/* Resetting scroll events is likely unnecessary,
* do this to avoid any possible problems as it's harmless. */
seat->pointer_scroll.smooth_xy[0] = 0;
seat->pointer_scroll.smooth_xy[1] = 0;
seat->pointer_scroll.discrete_xy[0] = 0;
seat->pointer_scroll.discrete_xy[1] = 0;
seat->pointer_scroll.inverted_xy[0] = false;
seat->pointer_scroll.inverted_xy[1] = false;
seat->pointer_scroll.axis_source = WL_POINTER_AXIS_SOURCE_WHEEL;
seat->pointer_scroll = GWL_SeatStatePointerScroll{};
seat->pointer.wl_surface_window = wl_surface;
@@ -3627,7 +3634,7 @@ static void tablet_seat_handle_tool_added(void *data,
GWL_TabletTool *tablet_tool = new GWL_TabletTool();
tablet_tool->seat = seat;
/* Every tool has it's own cursor wl_surface. */
/* Every tool has its own cursor wl_surface. */
tablet_tool->wl_surface_cursor = wl_compositor_create_surface(seat->system->wl_compositor());
ghost_wl_surface_tag_cursor_tablet(tablet_tool->wl_surface_cursor);
@@ -3969,7 +3976,7 @@ static void keyboard_handle_key(void *data,
}
else if (xkb_keymap_key_repeats(xkb_state_get_keymap(seat->xkb_state), key_code)) {
if (etype == GHOST_kEventKeyDown) {
/* Any other key-down always cancels (and may start it's own repeat timer). */
/* Any other key-down always cancels (and may start its own repeat timer). */
timer_action = CANCEL;
}
else {
@@ -4057,7 +4064,7 @@ static void keyboard_handle_key(void *data,
static void keyboard_handle_modifiers(void *data,
struct wl_keyboard * /*wl_keyboard*/,
const uint32_t /*serial*/,
const uint32_t serial,
const uint32_t mods_depressed,
const uint32_t mods_latched,
const uint32_t mods_locked,
@@ -4088,6 +4095,8 @@ static void keyboard_handle_modifiers(void *data,
#ifdef USE_GNOME_KEYBOARD_SUPPRESS_WARNING
seat->key_depressed_suppress_warning.any_mod_held = mods_depressed != 0;
#endif
seat->data_source_serial = serial;
}
static void keyboard_handle_repeat_info(void *data,
@@ -5154,6 +5163,24 @@ static void gwl_registry_wp_pointer_gestures_remove(GWL_Display *display,
*value_p = nullptr;
}
/* #GWL_Display.xdg_activation */
static void gwl_registry_xdg_activation_add(GWL_Display *display,
const GWL_RegisteryAdd_Params *params)
{
display->xdg_activation_manager = static_cast<xdg_activation_v1 *>(
wl_registry_bind(display->wl_registry, params->name, &xdg_activation_v1_interface, 1));
gwl_registry_entry_add(display, params, nullptr);
}
static void gwl_registry_xdg_activation_remove(GWL_Display *display,
void * /*user_data*/,
const bool /*on_exit*/)
{
struct xdg_activation_v1 **value_p = &display->xdg_activation_manager;
xdg_activation_v1_destroy(*value_p);
*value_p = nullptr;
}
/* #GWL_Display.wp_primary_selection_device_manager */
static void gwl_registry_wp_primary_selection_device_manager_add(
@@ -5190,90 +5217,97 @@ static void gwl_registry_wp_primary_selection_device_manager_remove(GWL_Display
static const GWL_RegistryHandler gwl_registry_handlers[] = {
/* Low level interfaces. */
{
&wl_compositor_interface.name,
gwl_registry_compositor_add,
nullptr,
gwl_registry_compositor_remove,
/*interface_p*/ &wl_compositor_interface.name,
/*add_fn*/ gwl_registry_compositor_add,
/*update_fn*/ nullptr,
/*remove_fn*/ gwl_registry_compositor_remove,
},
{
&wl_shm_interface.name,
gwl_registry_wl_shm_add,
nullptr,
gwl_registry_wl_shm_remove,
/*interface_p*/ &wl_shm_interface.name,
/*add_fn*/ gwl_registry_wl_shm_add,
/*update_fn*/ nullptr,
/*remove_fn*/ gwl_registry_wl_shm_remove,
},
{
&xdg_wm_base_interface.name,
gwl_registry_xdg_wm_base_add,
nullptr,
gwl_registry_xdg_wm_base_remove,
/*interface_p*/ &xdg_wm_base_interface.name,
/*add_fn*/ gwl_registry_xdg_wm_base_add,
/*update_fn*/ nullptr,
/*remove_fn*/ gwl_registry_xdg_wm_base_remove,
},
/* Managers. */
{
&zxdg_decoration_manager_v1_interface.name,
gwl_registry_xdg_decoration_manager_add,
nullptr,
gwl_registry_xdg_decoration_manager_remove,
/*interface_p*/ &zxdg_decoration_manager_v1_interface.name,
/*add_fn*/ gwl_registry_xdg_decoration_manager_add,
/*update_fn*/ nullptr,
/*remove_fn*/ gwl_registry_xdg_decoration_manager_remove,
},
{
&zxdg_output_manager_v1_interface.name,
gwl_registry_xdg_output_manager_add,
nullptr,
gwl_registry_xdg_output_manager_remove,
/*interface_p*/ &zxdg_output_manager_v1_interface.name,
/*add_fn*/ gwl_registry_xdg_output_manager_add,
/*update_fn*/ nullptr,
/*remove_fn*/ gwl_registry_xdg_output_manager_remove,
},
{
&wl_data_device_manager_interface.name,
gwl_registry_wl_data_device_manager_add,
nullptr,
gwl_registry_wl_data_device_manager_remove,
/*interface_p*/ &wl_data_device_manager_interface.name,
/*add_fn*/ gwl_registry_wl_data_device_manager_add,
/*update_fn*/ nullptr,
/*remove_fn*/ gwl_registry_wl_data_device_manager_remove,
},
{
&zwp_primary_selection_device_manager_v1_interface.name,
gwl_registry_wp_primary_selection_device_manager_add,
nullptr,
gwl_registry_wp_primary_selection_device_manager_remove,
/*interface_p*/ &zwp_primary_selection_device_manager_v1_interface.name,
/*add_fn*/ gwl_registry_wp_primary_selection_device_manager_add,
/*update_fn*/ nullptr,
/*remove_fn*/ gwl_registry_wp_primary_selection_device_manager_remove,
},
{
&zwp_tablet_manager_v2_interface.name,
gwl_registry_wp_tablet_manager_add,
nullptr,
gwl_registry_wp_tablet_manager_remove,
/*interface_p*/ &zwp_tablet_manager_v2_interface.name,
/*add_fn*/ gwl_registry_wp_tablet_manager_add,
/*update_fn*/ nullptr,
/*remove_fn*/ gwl_registry_wp_tablet_manager_remove,
},
{
&zwp_relative_pointer_manager_v1_interface.name,
gwl_registry_wp_relative_pointer_manager_add,
nullptr,
gwl_registry_wp_relative_pointer_manager_remove,
/*interface_p*/ &zwp_relative_pointer_manager_v1_interface.name,
/*add_fn*/ gwl_registry_wp_relative_pointer_manager_add,
/*update_fn*/ nullptr,
/*remove_fn*/ gwl_registry_wp_relative_pointer_manager_remove,
},
/* Higher level interfaces. */
{
&zwp_pointer_constraints_v1_interface.name,
gwl_registry_wp_pointer_constraints_add,
nullptr,
gwl_registry_wp_pointer_constraints_remove,
/*interface_p*/ &zwp_pointer_constraints_v1_interface.name,
/*add_fn*/ gwl_registry_wp_pointer_constraints_add,
/*update_fn*/ nullptr,
/*remove_fn*/ gwl_registry_wp_pointer_constraints_remove,
},
{
&zwp_pointer_gestures_v1_interface.name,
gwl_registry_wp_pointer_gestures_add,
nullptr,
gwl_registry_wp_pointer_gestures_remove,
/*interface_p*/ &zwp_pointer_gestures_v1_interface.name,
/*add_fn*/ gwl_registry_wp_pointer_gestures_add,
/*update_fn*/ nullptr,
/*remove_fn*/ gwl_registry_wp_pointer_gestures_remove,
},
{
/*interface_p*/ &xdg_activation_v1_interface.name,
/*add_fn*/ gwl_registry_xdg_activation_add,
/*update_fn*/ nullptr,
/*remove_fn*/ gwl_registry_xdg_activation_remove,
},
/* Display outputs. */
{
&wl_output_interface.name,
gwl_registry_wl_output_add,
gwl_registry_wl_output_update,
gwl_registry_wl_output_remove,
/*interface_p*/ &wl_output_interface.name,
/*add_fn*/ gwl_registry_wl_output_add,
/*update_fn*/ gwl_registry_wl_output_update,
/*remove_fn*/ gwl_registry_wl_output_remove,
},
/* Seats.
* Keep the seat near the end to ensure other types are created first.
* as the seat creates data based on other interfaces. */
{
&wl_seat_interface.name,
gwl_registry_wl_seat_add,
gwl_registry_wl_seat_update,
gwl_registry_wl_seat_remove,
/*interface_p*/ &wl_seat_interface.name,
/*add_fn*/ gwl_registry_wl_seat_add,
/*update_fn*/ gwl_registry_wl_seat_update,
/*remove_fn*/ gwl_registry_wl_seat_remove,
},
{nullptr, nullptr, nullptr},
{nullptr},
};
/**
@@ -6675,17 +6709,16 @@ GHOST_TSuccess GHOST_SystemWayland::cursor_visibility_set(const bool visible)
return GHOST_kSuccess;
}
bool GHOST_SystemWayland::supportsCursorWarp()
GHOST_TCapabilityFlag GHOST_SystemWayland::getCapabilities() const
{
/* WAYLAND doesn't support setting the cursor position directly,
* this is an intentional choice, forcing us to use a software cursor in this case. */
return false;
}
bool GHOST_SystemWayland::supportsWindowPosition()
{
/* WAYLAND doesn't support accessing the window position. */
return false;
return GHOST_TCapabilityFlag(
GHOST_CAPABILITY_FLAG_ALL &
~(
/* WAYLAND doesn't support accessing the window position. */
GHOST_kCapabilityWindowPosition |
/* WAYLAND doesn't support setting the cursor position directly,
* this is an intentional choice, forcing us to use a software cursor in this case. */
GHOST_kCapabilityCursorWarp));
}
bool GHOST_SystemWayland::cursor_grab_use_software_display_get(const GHOST_TGrabCursorMode mode)
@@ -6817,11 +6850,36 @@ struct zwp_primary_selection_device_manager_v1 *GHOST_SystemWayland::wp_primary_
return display_->wp_primary_selection_device_manager;
}
struct xdg_activation_v1 *GHOST_SystemWayland::xdg_activation_manager()
{
return display_->xdg_activation_manager;
}
struct zwp_pointer_gestures_v1 *GHOST_SystemWayland::wp_pointer_gestures()
{
return display_->wp_pointer_gestures;
}
/* This value is expected to match the base name of the `.desktop` file. see #101805.
*
* NOTE: the XDG desktop-entry-spec defines that this should follow the "reverse DNS" convention.
* For e.g. `org.blender.Blender` - however the `.desktop` file distributed with Blender is
* simply called `blender.desktop`, so the it's important to follow that name.
* Other distributions such as SNAP & FLATPAK may need to change this value #101779.
* Currently there isn't a way to configure this, we may want to support that. */
static const char *ghost_wl_app_id = (
#ifdef WITH_GHOST_WAYLAND_APP_ID
STRINGIFY(WITH_GHOST_WAYLAND_APP_ID)
#else
"blender"
#endif
);
const char *GHOST_SystemWayland::xdg_app_id()
{
return ghost_wl_app_id;
}
#ifdef WITH_GHOST_WAYLAND_LIBDECOR
libdecor *GHOST_SystemWayland::libdecor_context()
@@ -6908,6 +6966,16 @@ void GHOST_SystemWayland::seat_active_set(const struct GWL_Seat *seat)
gwl_display_seat_active_set(display_, seat);
}
struct wl_seat *GHOST_SystemWayland::wl_seat_active_get_with_input_serial(uint32_t &serial)
{
GWL_Seat *seat = gwl_display_seat_active_get(display_);
if (seat) {
serial = seat->data_source_serial;
return seat->wl_seat;
}
return nullptr;
}
bool GHOST_SystemWayland::window_surface_unref(const wl_surface *wl_surface)
{
bool changed = false;
@@ -7033,7 +7101,7 @@ bool GHOST_SystemWayland::window_cursor_grab_set(const GHOST_TGrabCursorMode mod
const struct GWL_SeatStateGrab grab_state_next = seat_grab_state_from_mode(mode,
use_software_confine);
/* Check for wrap as #supportsCursorWarp isn't supported. */
/* Check for wrap as #GHOST_kCapabilityCursorWarp isn't supported. */
const bool use_visible = !(ELEM(mode, GHOST_kGrabHide, GHOST_kGrabWrap) || use_software_confine);
const bool is_hardware_cursor = !cursor_is_software(mode, use_software_confine);

View File

@@ -142,8 +142,7 @@ class GHOST_SystemWayland : public GHOST_System {
const bool is_dialog,
const GHOST_IWindow *parentWindow) override;
bool supportsCursorWarp() override;
bool supportsWindowPosition() override;
GHOST_TCapabilityFlag getCapabilities() const override;
/* WAYLAND utility functions (share window/system logic). */
@@ -180,6 +179,7 @@ class GHOST_SystemWayland : public GHOST_System {
struct wl_display *wl_display();
struct wl_compositor *wl_compositor();
struct zwp_primary_selection_device_manager_v1 *wp_primary_selection_manager();
struct xdg_activation_v1 *xdg_activation_manager();
struct zwp_pointer_gestures_v1 *wp_pointer_gestures();
#ifdef WITH_GHOST_WAYLAND_LIBDECOR
@@ -193,6 +193,8 @@ class GHOST_SystemWayland : public GHOST_System {
struct wl_shm *wl_shm() const;
static const char *xdg_app_id();
/* WAYLAND utility functions. */
/**
@@ -204,6 +206,8 @@ class GHOST_SystemWayland : public GHOST_System {
/** Set this seat to be active. */
void seat_active_set(const struct GWL_Seat *seat);
struct wl_seat *wl_seat_active_get_with_input_serial(uint32_t &serial);
/**
* Clear all references to this output.
*

View File

@@ -496,6 +496,14 @@ GHOST_TSuccess GHOST_SystemWin32::getButtons(GHOST_Buttons &buttons) const
return GHOST_kSuccess;
}
GHOST_TCapabilityFlag GHOST_SystemWin32::getCapabilities() const
{
return GHOST_TCapabilityFlag(GHOST_CAPABILITY_FLAG_ALL &
~(
/* WIN32 has no support for a primary selection clipboard. */
GHOST_kCapabilityPrimaryClipboard));
}
GHOST_TSuccess GHOST_SystemWin32::init()
{
GHOST_TSuccess success = GHOST_System::init();

View File

@@ -199,6 +199,8 @@ class GHOST_SystemWin32 : public GHOST_System {
*/
GHOST_TSuccess getButtons(GHOST_Buttons &buttons) const;
GHOST_TCapabilityFlag getCapabilities() const;
/**
* Returns unsigned char from CUT_BUFFER0
* \param selection: Used by X11 only.

View File

@@ -497,7 +497,7 @@ GHOST_WindowX11 *GHOST_SystemX11::findGhostWindow(Window xwind) const
return nullptr;
}
/* It is not entirely safe to do this as the backptr may point
/* It is not entirely safe to do this as the back-pointer may point
* to a window that has recently been removed.
* We should always check the window manager's list of windows
* and only process events on these windows. */
@@ -1740,6 +1740,11 @@ GHOST_TSuccess GHOST_SystemX11::setCursorPosition(int32_t x, int32_t y)
return GHOST_kSuccess;
}
GHOST_TCapabilityFlag GHOST_SystemX11::getCapabilities() const
{
return GHOST_TCapabilityFlag(GHOST_CAPABILITY_FLAG_ALL);
}
void GHOST_SystemX11::addDirtyWindow(GHOST_WindowX11 *bad_wind)
{
GHOST_ASSERT((bad_wind != nullptr), "addDirtyWindow() nullptr ptr trapped (window)");

View File

@@ -69,9 +69,9 @@ class GHOST_SystemX11 : public GHOST_System {
/**
* Destructor.
*/
~GHOST_SystemX11();
~GHOST_SystemX11() override;
GHOST_TSuccess init();
GHOST_TSuccess init() override;
/**
* \section Interface Inherited from GHOST_ISystem
@@ -82,25 +82,25 @@ class GHOST_SystemX11 : public GHOST_System {
* Returns the number of milliseconds since the start of the system process.
* \return The number of milliseconds.
*/
uint64_t getMilliSeconds() const;
uint64_t getMilliSeconds() const override;
/**
* Returns the number of displays on this system.
* \return The number of displays.
*/
uint8_t getNumDisplays() const;
uint8_t getNumDisplays() const override;
/**
* Returns the dimensions of the main display on this system.
* \return The dimension of the main display.
*/
void getMainDisplayDimensions(uint32_t &width, uint32_t &height) const;
void getMainDisplayDimensions(uint32_t &width, uint32_t &height) const override;
/**
* Returns the dimensions of all displays on this system.
* \return The dimension of the main display.
*/
void getAllDisplayDimensions(uint32_t &width, uint32_t &height) const;
void getAllDisplayDimensions(uint32_t &width, uint32_t &height) const override;
/**
* Create a new window.
@@ -127,46 +127,48 @@ class GHOST_SystemX11 : public GHOST_System {
GHOST_GLSettings glSettings,
const bool exclusive = false,
const bool is_dialog = false,
const GHOST_IWindow *parentWindow = 0);
const GHOST_IWindow *parentWindow = nullptr) override;
/**
* Create a new off-screen context.
* Never explicitly delete the context, use #disposeContext() instead.
* \return The new context (or 0 if creation failed).
*/
GHOST_IContext *createOffscreenContext(GHOST_GLSettings glSettings);
GHOST_IContext *createOffscreenContext(GHOST_GLSettings glSettings) override;
/**
* Dispose of a context.
* \param context: Pointer to the context to be disposed.
* \return Indication of success.
*/
GHOST_TSuccess disposeContext(GHOST_IContext *context);
GHOST_TSuccess disposeContext(GHOST_IContext *context) override;
/**
* Retrieves events from the system and stores them in the queue.
* \param waitForEvent: Flag to wait for an event (or return immediately).
* \return Indication of the presence of events.
*/
bool processEvents(bool waitForEvent);
bool processEvents(bool waitForEvent) override;
GHOST_TSuccess getCursorPosition(int32_t &x, int32_t &y) const;
GHOST_TSuccess getCursorPosition(int32_t &x, int32_t &y) const override;
GHOST_TSuccess setCursorPosition(int32_t x, int32_t y);
GHOST_TSuccess setCursorPosition(int32_t x, int32_t y) override;
/**
* Returns the state of all modifier keys.
* \param keys: The state of all modifier keys (true == pressed).
* \return Indication of success.
*/
GHOST_TSuccess getModifierKeys(GHOST_ModifierKeys &keys) const;
GHOST_TSuccess getModifierKeys(GHOST_ModifierKeys &keys) const override;
/**
* Returns the state of the mouse buttons (outside the message queue).
* \param buttons: The state of the buttons.
* \return Indication of success.
*/
GHOST_TSuccess getButtons(GHOST_Buttons &buttons) const;
GHOST_TSuccess getButtons(GHOST_Buttons &buttons) const override;
GHOST_TCapabilityFlag getCapabilities() const override;
/**
* Flag a window as dirty. This will
@@ -204,14 +206,14 @@ class GHOST_SystemX11 : public GHOST_System {
* \param selection: Get selection, X11 only feature.
* \return Returns the Clipboard indicated by Flag.
*/
char *getClipboard(bool selection) const;
char *getClipboard(bool selection) const override;
/**
* Puts buffer to system clipboard
* \param buffer: The buffer to copy to the clipboard.
* \param selection: Set the selection into the clipboard, X11 only feature.
*/
void putClipboard(const char *buffer, bool selection) const;
void putClipboard(const char *buffer, bool selection) const override;
/**
* Show a system message box
@@ -227,7 +229,7 @@ class GHOST_SystemX11 : public GHOST_System {
const char *help_label,
const char *continue_label,
const char *link,
GHOST_DialogOptions dialog_options) const;
GHOST_DialogOptions dialog_options) const override;
#ifdef WITH_XDND
/**
* Creates a drag'n'drop event and pushes it immediately onto the event queue.
@@ -251,7 +253,7 @@ class GHOST_SystemX11 : public GHOST_System {
/**
* \see GHOST_ISystem
*/
bool setConsoleWindowState(GHOST_TConsoleWindowState /*action*/)
bool setConsoleWindowState(GHOST_TConsoleWindowState /*action*/) override
{
return 0;
}

View File

@@ -295,7 +295,7 @@ class GHOST_Window : public GHOST_IWindow {
m_userData = userData;
}
float getNativePixelSize(void) override
float getNativePixelSize() override
{
if (m_nativePixelSize > 0.0f) {
return m_nativePixelSize;

View File

@@ -54,13 +54,13 @@ class GHOST_WindowManager {
* Returns whether one of the windows is full-screen.
* \return A boolean indicator.
*/
bool getFullScreen(void) const;
bool getFullScreen() const;
/**
* Returns pointer to the full-screen window.
* \return The full-screen window (NULL if not in full-screen).
*/
GHOST_IWindow *getFullScreenWindow(void) const;
GHOST_IWindow *getFullScreenWindow() const;
/**
* Activates full-screen mode for a window.
@@ -73,7 +73,7 @@ class GHOST_WindowManager {
* Closes full-screen mode down.
* \return Indication of success.
*/
GHOST_TSuccess endFullScreen(void);
GHOST_TSuccess endFullScreen();
/**
* Sets new window as active window (the window receiving events).
@@ -87,7 +87,7 @@ class GHOST_WindowManager {
* There can be only one window active which should be in the current window list.
* \return window The active window (or NULL if there is none).
*/
GHOST_IWindow *getActiveWindow(void) const;
GHOST_IWindow *getActiveWindow() const;
/**
* Set this window to be inactive (not receiving events).

View File

@@ -42,7 +42,7 @@ class GHOST_WindowSDL : public GHOST_Window {
GHOST_TDrawingContextType type = GHOST_kDrawingContextTypeNone,
const bool stereoVisual = false,
const bool exclusive = false,
const GHOST_IWindow *parentWindow = NULL);
const GHOST_IWindow *parentWindow = nullptr);
~GHOST_WindowSDL();
@@ -52,7 +52,7 @@ class GHOST_WindowSDL : public GHOST_Window {
return m_sdl_win;
}
GHOST_TSuccess invalidate(void);
GHOST_TSuccess invalidate() override;
/**
* called by the X11 system implementation when expose events
@@ -64,22 +64,22 @@ class GHOST_WindowSDL : public GHOST_Window {
m_invalid_window = false;
}
bool getValid() const;
bool getValid() const override;
void getWindowBounds(GHOST_Rect &bounds) const;
void getClientBounds(GHOST_Rect &bounds) const;
void getWindowBounds(GHOST_Rect &bounds) const override;
void getClientBounds(GHOST_Rect &bounds) const override;
protected:
/**
* \param type: The type of rendering context create.
* \return Indication of success.
*/
GHOST_Context *newDrawingContext(GHOST_TDrawingContextType type);
GHOST_Context *newDrawingContext(GHOST_TDrawingContextType type) override;
GHOST_TSuccess setWindowCursorGrab(GHOST_TGrabCursorMode mode);
GHOST_TSuccess setWindowCursorGrab(GHOST_TGrabCursorMode mode) override;
GHOST_TSuccess setWindowCursorShape(GHOST_TStandardCursor shape);
GHOST_TSuccess hasCursorShape(GHOST_TStandardCursor shape);
GHOST_TSuccess setWindowCursorShape(GHOST_TStandardCursor shape) override;
GHOST_TSuccess hasCursorShape(GHOST_TStandardCursor shape) override;
GHOST_TSuccess setWindowCustomCursorShape(uint8_t *bitmap,
uint8_t *mask,
@@ -87,44 +87,44 @@ class GHOST_WindowSDL : public GHOST_Window {
int sizey,
int hotX,
int hotY,
bool canInvertColor);
bool canInvertColor) override;
GHOST_TSuccess setWindowCursorVisibility(bool visible);
GHOST_TSuccess setWindowCursorVisibility(bool visible) override;
void setTitle(const char *title);
void setTitle(const char *title) override;
std::string getTitle() const;
std::string getTitle() const override;
GHOST_TSuccess setClientWidth(uint32_t width);
GHOST_TSuccess setClientWidth(uint32_t width) override;
GHOST_TSuccess setClientHeight(uint32_t height);
GHOST_TSuccess setClientHeight(uint32_t height) override;
GHOST_TSuccess setClientSize(uint32_t width, uint32_t height);
GHOST_TSuccess setClientSize(uint32_t width, uint32_t height) override;
void screenToClient(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const;
void screenToClient(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const override;
void clientToScreen(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const;
void clientToScreen(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const override;
GHOST_TSuccess setState(GHOST_TWindowState state);
GHOST_TSuccess setState(GHOST_TWindowState state) override;
GHOST_TWindowState getState() const;
GHOST_TWindowState getState() const override;
GHOST_TSuccess setOrder(GHOST_TWindowOrder /*order*/)
GHOST_TSuccess setOrder(GHOST_TWindowOrder /*order*/) override
{
// TODO
return GHOST_kSuccess;
}
// TODO
GHOST_TSuccess beginFullScreen() const
GHOST_TSuccess beginFullScreen() const override
{
return GHOST_kFailure;
}
GHOST_TSuccess endFullScreen() const
GHOST_TSuccess endFullScreen() const override
{
return GHOST_kFailure;
}
uint16_t getDPIHint();
uint16_t getDPIHint() override;
};

View File

@@ -35,6 +35,7 @@
#endif
/* Generated by `wayland-scanner`. */
#include <xdg-activation-v1-client-protocol.h>
#include <xdg-decoration-unstable-v1-client-protocol.h>
#include <xdg-shell-client-protocol.h>
@@ -43,6 +44,8 @@
/* Logging, use `ghost.wl.*` prefix. */
#include "CLG_log.h"
static const struct xdg_activation_token_v1_listener *xdg_activation_listener_get();
static constexpr size_t base_dpi = 96;
#ifdef WITH_GHOST_WAYLAND_LIBDECOR
@@ -111,6 +114,9 @@ struct GWL_Window {
*/
wl_fixed_t scale_fractional = 0;
/** A temporary token used for the window to be notified of of it's activation. */
struct xdg_activation_token_v1 *xdg_activation_token = nullptr;
#ifdef WITH_GHOST_WAYLAND_LIBDECOR
WGL_LibDecor_Window *libdecor = nullptr;
#endif
@@ -281,6 +287,61 @@ static bool gwl_window_state_set(GWL_Window *win, const GHOST_TWindowState state
/** \} */
/* -------------------------------------------------------------------- */
/** \name Internal #GWL_Window Activation
* \{ */
/**
* Unlike #GHOST_WindowWayland::activate which responds to WAYLAND having set the window active.
* This function makes a request to WAYLAND for the window to become active.
*
* \note The request may be ignored and may not work on all compositors.
*/
static void gwl_window_activate(GWL_Window *win)
{
GHOST_SystemWayland *system = win->ghost_system;
struct xdg_activation_v1 *activation_manager = system->xdg_activation_manager();
if (UNLIKELY(activation_manager == nullptr)) {
return;
}
if (win->xdg_activation_token) {
/* We're about to overwrite this with a new request. */
xdg_activation_token_v1_destroy(win->xdg_activation_token);
}
win->xdg_activation_token = xdg_activation_v1_get_activation_token(activation_manager);
xdg_activation_token_v1_add_listener(
win->xdg_activation_token, xdg_activation_listener_get(), win);
xdg_activation_token_v1_set_app_id(win->xdg_activation_token, GHOST_SystemWayland::xdg_app_id());
/* The serial of the input device requesting activation. */
{
uint32_t serial = 0;
struct wl_seat *seat = system->wl_seat_active_get_with_input_serial(serial);
if (seat) {
xdg_activation_token_v1_set_serial(win->xdg_activation_token, serial, seat);
}
}
/* The surface of the window requesting activation. */
{
GHOST_WindowWayland *ghost_window_active = static_cast<GHOST_WindowWayland *>(
system->getWindowManager()->getActiveWindow());
if (ghost_window_active) {
struct wl_surface *surface = ghost_window_active->wl_surface();
if (surface) {
xdg_activation_token_v1_set_surface(win->xdg_activation_token, surface);
}
}
}
xdg_activation_token_v1_commit(win->xdg_activation_token);
}
/** \} */
/* -------------------------------------------------------------------- */
/** \name Internal #GWL_Window Pending Actions
* \{ */
@@ -521,6 +582,39 @@ static const xdg_toplevel_listener xdg_toplevel_listener = {
/** \} */
/* -------------------------------------------------------------------- */
/** \name Listener (XDG Activation), #xdg_activation_v1_interface
*
* Used by #gwl_window_activate.
* \{ */
static void xdg_activation_handle_done(void *data,
struct xdg_activation_token_v1 *xdg_activation_token_v1,
const char *token)
{
GWL_Window *win = static_cast<GWL_Window *>(data);
if (xdg_activation_token_v1 != win->xdg_activation_token) {
return;
}
GHOST_SystemWayland *system = win->ghost_system;
struct xdg_activation_v1 *activation_manager = system->xdg_activation_manager();
xdg_activation_v1_activate(activation_manager, token, win->wl_surface);
xdg_activation_token_v1_destroy(win->xdg_activation_token);
win->xdg_activation_token = nullptr;
}
static const struct xdg_activation_token_v1_listener xdg_activation_listener = {
/*done*/ xdg_activation_handle_done,
};
static const struct xdg_activation_token_v1_listener *xdg_activation_listener_get()
{
return &xdg_activation_listener;
}
/** \} */
/* -------------------------------------------------------------------- */
/** \name Listener (LibDecor Frame), #libdecor_frame_interface
* \{ */
@@ -823,20 +917,7 @@ GHOST_WindowWayland::GHOST_WindowWayland(GHOST_SystemWayland *system,
* when the `window_->scale` changed. */
const int32_t size_min[2] = {320, 240};
/* This value is expected to match the base name of the `.desktop` file. see #101805.
*
* NOTE: the XDG desktop-entry-spec defines that this should follow the "reverse DNS" convention.
* For e.g. `org.blender.Blender` - however the `.desktop` file distributed with Blender is
* simply called `blender.desktop`, so the it's important to follow that name.
* Other distributions such as SNAP & FLATPAK may need to change this value #101779.
* Currently there isn't a way to configure this, we may want to support that. */
const char *xdg_app_id = (
#ifdef WITH_GHOST_WAYLAND_APP_ID
STRINGIFY(WITH_GHOST_WAYLAND_APP_ID)
#else
"blender"
#endif
);
const char *xdg_app_id = GHOST_SystemWayland::xdg_app_id();
#ifdef WITH_GHOST_WAYLAND_LIBDECOR
if (use_libdecor) {
@@ -1073,6 +1154,11 @@ GHOST_WindowWayland::~GHOST_WindowWayland()
wl_egl_window_destroy(window_->egl_window);
if (window_->xdg_activation_token) {
xdg_activation_token_v1_destroy(window_->xdg_activation_token);
window_->xdg_activation_token = nullptr;
}
#ifdef WITH_GHOST_WAYLAND_LIBDECOR
if (use_libdecor) {
gwl_libdecor_window_destroy(window_->libdecor);
@@ -1136,8 +1222,16 @@ GHOST_TSuccess GHOST_WindowWayland::invalidate()
return GHOST_kSuccess;
}
GHOST_TSuccess GHOST_WindowWayland::setOrder(GHOST_TWindowOrder /*order*/)
GHOST_TSuccess GHOST_WindowWayland::setOrder(GHOST_TWindowOrder order)
{
/* NOTE(@ideasman42): only activation is supported (on X11 & Cocoa for e.g.)
* both activation and raising is performed. Since WAYLAND only supports activation,
* do that as the compositor will likely raise the window as well.
* Although it's not ideal that raising does something but lowering a window is ignored. */
if (order == GHOST_kWindowOrderTop) {
gwl_window_activate(window_);
}
return GHOST_kSuccess;
}

View File

@@ -63,44 +63,44 @@ class GHOST_WindowX11 : public GHOST_Window {
const bool exclusive = false,
const bool is_debug = false);
bool getValid() const;
bool getValid() const override;
void setTitle(const char *title);
void setTitle(const char *title) override;
std::string getTitle() const;
std::string getTitle() const override;
void getWindowBounds(GHOST_Rect &bounds) const;
void getWindowBounds(GHOST_Rect &bounds) const override;
void getClientBounds(GHOST_Rect &bounds) const;
void getClientBounds(GHOST_Rect &bounds) const override;
bool isDialog() const;
bool isDialog() const override;
GHOST_TSuccess setClientWidth(uint32_t width);
GHOST_TSuccess setClientWidth(uint32_t width) override;
GHOST_TSuccess setClientHeight(uint32_t height);
GHOST_TSuccess setClientHeight(uint32_t height) override;
GHOST_TSuccess setClientSize(uint32_t width, uint32_t height);
GHOST_TSuccess setClientSize(uint32_t width, uint32_t height) override;
void screenToClient(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const;
void screenToClient(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const override;
void clientToScreen(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const;
void clientToScreen(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const override;
GHOST_TWindowState getState() const;
GHOST_TWindowState getState() const override;
GHOST_TSuccess setState(GHOST_TWindowState state);
GHOST_TSuccess setState(GHOST_TWindowState state) override;
GHOST_TSuccess setOrder(GHOST_TWindowOrder order);
GHOST_TSuccess setOrder(GHOST_TWindowOrder order) override;
GHOST_TSuccess invalidate();
GHOST_TSuccess invalidate() override;
GHOST_TSuccess setProgressBar(float progress);
GHOST_TSuccess endProgressBar();
GHOST_TSuccess setProgressBar(float progress) override;
GHOST_TSuccess endProgressBar() override;
/**
* Destructor.
* Closes the window and disposes resources allocated.
*/
~GHOST_WindowX11();
~GHOST_WindowX11() override;
/**
* \section x11specific X11 system specific calls
@@ -152,32 +152,32 @@ class GHOST_WindowX11 : public GHOST_Window {
bool m_post_init;
GHOST_TWindowState m_post_state;
GHOST_TSuccess beginFullScreen() const;
GHOST_TSuccess beginFullScreen() const override;
GHOST_TSuccess endFullScreen() const;
GHOST_TSuccess endFullScreen() const override;
GHOST_TSuccess setDialogHints(GHOST_WindowX11 *parentWindow);
uint16_t getDPIHint();
uint16_t getDPIHint() override;
protected:
/**
* \param type: The type of rendering context create.
* \return Indication of success.
*/
GHOST_Context *newDrawingContext(GHOST_TDrawingContextType type);
GHOST_Context *newDrawingContext(GHOST_TDrawingContextType type) override;
/**
* Sets the cursor visibility on the window using
* native window system calls.
*/
GHOST_TSuccess setWindowCursorVisibility(bool visible);
GHOST_TSuccess setWindowCursorVisibility(bool visible) override;
/**
* Sets the cursor grab on the window using
* native window system calls.
*/
GHOST_TSuccess setWindowCursorGrab(GHOST_TGrabCursorMode mode);
GHOST_TSuccess setWindowCursorGrab(GHOST_TGrabCursorMode mode) override;
GHOST_TGrabCursorMode getWindowCursorGrab() const;
@@ -185,8 +185,8 @@ class GHOST_WindowX11 : public GHOST_Window {
* Sets the cursor shape on the window using
* native window system calls.
*/
GHOST_TSuccess setWindowCursorShape(GHOST_TStandardCursor shape);
GHOST_TSuccess hasCursorShape(GHOST_TStandardCursor shape);
GHOST_TSuccess setWindowCursorShape(GHOST_TStandardCursor shape) override;
GHOST_TSuccess hasCursorShape(GHOST_TStandardCursor shape) override;
/**
* Sets the cursor shape on the window using
@@ -198,7 +198,7 @@ class GHOST_WindowX11 : public GHOST_Window {
int sizey,
int hotX,
int hotY,
bool canInvertColor);
bool canInvertColor) override;
private:
/* Force use of public constructor. */

View File

@@ -381,7 +381,7 @@ void StereoProjection(float left,
class Application : public GHOST_IEventConsumer {
public:
Application(GHOST_ISystem *system);
~Application(void);
~Application();
virtual bool processEvent(GHOST_IEvent *event);
GHOST_ISystem *m_system;
@@ -431,7 +431,7 @@ Application::Application(GHOST_ISystem *system)
m_gearsTimer = system->installTimer(0 /*delay*/, 20 /*interval*/, gearsTimerProc, m_mainWindow);
}
Application::~Application(void)
Application::~Application()
{
// Dispose windows
if (m_system->validWindow(m_mainWindow)) {

View File

@@ -450,10 +450,10 @@ void *MEM_guarded_mallocN(size_t len, const char *str)
#endif
return (++memh);
}
print_error("Malloc returns null: len=" SIZET_FORMAT " in %s, total %u\n",
print_error("Malloc returns null: len=" SIZET_FORMAT " in %s, total " SIZET_FORMAT "\n",
SIZET_ARG(len),
str,
(uint)mem_in_use);
mem_in_use);
return NULL;
}
@@ -463,11 +463,11 @@ void *MEM_guarded_malloc_arrayN(size_t len, size_t size, const char *str)
if (UNLIKELY(!MEM_size_safe_multiply(len, size, &total_size))) {
print_error(
"Malloc array aborted due to integer overflow: "
"len=" SIZET_FORMAT "x" SIZET_FORMAT " in %s, total %u\n",
"len=" SIZET_FORMAT "x" SIZET_FORMAT " in %s, total " SIZET_FORMAT "\n",
SIZET_ARG(len),
SIZET_ARG(size),
str,
(uint)mem_in_use);
mem_in_use);
abort();
return NULL;
}
@@ -523,10 +523,10 @@ void *MEM_guarded_mallocN_aligned(size_t len, size_t alignment, const char *str)
#endif
return (++memh);
}
print_error("aligned_malloc returns null: len=" SIZET_FORMAT " in %s, total %u\n",
print_error("aligned_malloc returns null: len=" SIZET_FORMAT " in %s, total " SIZET_FORMAT "\n",
SIZET_ARG(len),
str,
(uint)mem_in_use);
mem_in_use);
return NULL;
}
@@ -547,10 +547,10 @@ void *MEM_guarded_callocN(size_t len, const char *str)
#endif
return (++memh);
}
print_error("Calloc returns null: len=" SIZET_FORMAT " in %s, total %u\n",
print_error("Calloc returns null: len=" SIZET_FORMAT " in %s, total " SIZET_FORMAT "\n",
SIZET_ARG(len),
str,
(uint)mem_in_use);
mem_in_use);
return NULL;
}
@@ -560,11 +560,11 @@ void *MEM_guarded_calloc_arrayN(size_t len, size_t size, const char *str)
if (UNLIKELY(!MEM_size_safe_multiply(len, size, &total_size))) {
print_error(
"Calloc array aborted due to integer overflow: "
"len=" SIZET_FORMAT "x" SIZET_FORMAT " in %s, total %u\n",
"len=" SIZET_FORMAT "x" SIZET_FORMAT " in %s, total " SIZET_FORMAT "\n",
SIZET_ARG(len),
SIZET_ARG(size),
str,
(uint)mem_in_use);
mem_in_use);
abort();
return NULL;
}

View File

@@ -213,10 +213,10 @@ void *MEM_lockfree_callocN(size_t len, const char *str)
return PTR_FROM_MEMHEAD(memh);
}
print_error("Calloc returns null: len=" SIZET_FORMAT " in %s, total %u\n",
print_error("Calloc returns null: len=" SIZET_FORMAT " in %s, total " SIZET_FORMAT "\n",
SIZET_ARG(len),
str,
(uint)memory_usage_current());
memory_usage_current());
return NULL;
}
@@ -226,11 +226,11 @@ void *MEM_lockfree_calloc_arrayN(size_t len, size_t size, const char *str)
if (UNLIKELY(!MEM_size_safe_multiply(len, size, &total_size))) {
print_error(
"Calloc array aborted due to integer overflow: "
"len=" SIZET_FORMAT "x" SIZET_FORMAT " in %s, total %u\n",
"len=" SIZET_FORMAT "x" SIZET_FORMAT " in %s, total " SIZET_FORMAT "\n",
SIZET_ARG(len),
SIZET_ARG(size),
str,
(unsigned int)memory_usage_current());
memory_usage_current());
abort();
return NULL;
}
@@ -256,10 +256,10 @@ void *MEM_lockfree_mallocN(size_t len, const char *str)
return PTR_FROM_MEMHEAD(memh);
}
print_error("Malloc returns null: len=" SIZET_FORMAT " in %s, total %u\n",
print_error("Malloc returns null: len=" SIZET_FORMAT " in %s, total " SIZET_FORMAT "\n",
SIZET_ARG(len),
str,
(uint)memory_usage_current());
memory_usage_current());
return NULL;
}
@@ -269,11 +269,11 @@ void *MEM_lockfree_malloc_arrayN(size_t len, size_t size, const char *str)
if (UNLIKELY(!MEM_size_safe_multiply(len, size, &total_size))) {
print_error(
"Malloc array aborted due to integer overflow: "
"len=" SIZET_FORMAT "x" SIZET_FORMAT " in %s, total %u\n",
"len=" SIZET_FORMAT "x" SIZET_FORMAT " in %s, total " SIZET_FORMAT "\n",
SIZET_ARG(len),
SIZET_ARG(size),
str,
(uint)memory_usage_current());
memory_usage_current());
abort();
return NULL;
}
@@ -325,10 +325,10 @@ void *MEM_lockfree_mallocN_aligned(size_t len, size_t alignment, const char *str
return PTR_FROM_MEMHEAD(memh);
}
print_error("Malloc returns null: len=" SIZET_FORMAT " in %s, total %u\n",
print_error("Malloc returns null: len=" SIZET_FORMAT " in %s, total " SIZET_FORMAT "\n",
SIZET_ARG(len),
str,
(uint)memory_usage_current());
memory_usage_current());
return NULL;
}

View File

@@ -0,0 +1,17 @@
# SPDX-License-Identifier: GPL-2.0-or-later
set(INC
include
../../extern/renderdoc/include
)
set(INC_SYS
)
set(SRC
intern/renderdoc_api.cc
include/renderdoc_api.hh
)
blender_add_lib(bf_intern_renderdoc_dynload "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")

View File

@@ -0,0 +1,45 @@
#pragma once
/* SPDX-License-Identifier: GPL-2.0-or-later
* Copyright 2023 Blender Foundation. All rights reserved. */
#include "renderdoc_app.h"
namespace renderdoc::api {
class Renderdoc {
private:
enum class State {
/**
* Initial state of the API indicating that the API hasn't checked if it can find renderdoc.
*/
UNINITIALIZED,
/**
* API has looked for renderdoc, but couldn't find it. This indicates that renderdoc isn't
* available on the platform, or wasn't registered correctly.
*/
NOT_FOUND,
/**
* API has loaded the symbols of renderdoc.
*/
LOADED,
};
State state_ = State::UNINITIALIZED;
RENDERDOC_API_1_6_0 *renderdoc_api_ = nullptr;
public:
bool start_frame_capture(RENDERDOC_DevicePointer device_handle,
RENDERDOC_WindowHandle window_handle);
void end_frame_capture(RENDERDOC_DevicePointer device_handle,
RENDERDOC_WindowHandle window_handle);
private:
/**
* Check if renderdoc has been loaded.
*
* When not loaded it tries to load the API, but only tries to do it once.
*/
bool check_loaded();
void load();
};
} // namespace renderdoc::api

View File

@@ -0,0 +1,77 @@
/* SPDX-License-Identifier: GPL-2.0-or-later
* Copyright 2023 Blender Foundation. All rights reserved. */
#include "renderdoc_api.hh"
#ifdef _WIN32
# define WIN32_LEAN_AND_MEAN
# include <Windows.h>
#else
# include <dlfcn.h>
#endif
#include <iostream>
namespace renderdoc::api {
bool Renderdoc::start_frame_capture(RENDERDOC_DevicePointer device_handle,
RENDERDOC_WindowHandle window_handle)
{
if (!check_loaded()) {
return false;
}
renderdoc_api_->StartFrameCapture(device_handle, window_handle);
return true;
}
void Renderdoc::end_frame_capture(RENDERDOC_DevicePointer device_handle,
RENDERDOC_WindowHandle window_handle)
{
if (!check_loaded()) {
return;
}
renderdoc_api_->EndFrameCapture(device_handle, window_handle);
}
bool Renderdoc::check_loaded()
{
switch (state_) {
case State::UNINITIALIZED:
load();
return renderdoc_api_ != nullptr;
break;
case State::NOT_FOUND:
return false;
case State::LOADED:
return true;
}
return false;
}
void Renderdoc::load()
{
#ifdef _WIN32
if (HMODULE mod = GetModuleHandleA("renderdoc.dll")) {
pRENDERDOC_GetAPI RENDERDOC_GetAPI = (pRENDERDOC_GetAPI)GetProcAddress(mod,
"RENDERDOC_GetAPI");
RENDERDOC_GetAPI(eRENDERDOC_API_Version_1_1_2, (void **)&renderdoc_api_);
}
#else
if (void *mod = dlopen("librenderdoc.so", RTLD_NOW | RTLD_NOLOAD)) {
pRENDERDOC_GetAPI RENDERDOC_GetAPI = (pRENDERDOC_GetAPI)dlsym(mod, "RENDERDOC_GetAPI");
RENDERDOC_GetAPI(eRENDERDOC_API_Version_1_1_2, (void **)&renderdoc_api_);
}
#endif
if (renderdoc_api_ != nullptr) {
int major;
int minor;
int patch;
renderdoc_api_->GetAPIVersion(&major, &minor, &patch);
std::cout << "Found renderdoc API [" << major << "." << minor << "." << patch << "]";
}
else {
std::cerr << "Unable to load renderdoc API.\n";
}
}
} // namespace renderdoc::api

View File

@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"\"POT-Creation-Date: 2019-02-25 20:41:30\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: 2016-04-23 22:41+0300\n"
"Last-Translator: Yousef Harfoush <bat3a@msn.com>\n"
"Language-Team: Yousef Harfoush, Amine Moussaoui <bat3a@msn.com>\n"

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: \n"
"Last-Translator: Martin Tabačan <tabycz@gmail.com>\n"
"Language-Team: Taby <tabycz@gmail.com>\n"

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: \n"
"Last-Translator: Martin Reininger <martinreininger@gmx.net>\n"
"Language-Team: German translation team\n"

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Ainhize & Miriam <agoenaga006@ikasle.ehu.eus>\n"
"Language-Team: Euskara <agoenaga006@ikasle.ehu.eus>\n"

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: 2012-10-31 17:00-0800\n"
"Last-Translator: Amin Babaeipanah <translate@leomoon.com>\n"
"Language-Team: LeoMoon Studios <blender@leomoon.com>\n"

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: 2017-12-25 14:01+0100\n"
"Last-Translator: UMAR HARUNA ABDULLAHI <umarbrowser20@gmail.com>\n"
"Language-Team: BlenderNigeria <pyc0der@outlook.com>\n"

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: 2012-10-07 13:56+0300\n"
"Last-Translator: Barak Itkin <lightningismyname@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: 2015-03-03 16:21+0530\n"
"Last-Translator: Roshan Lal Gumasta <roshan@anisecrets.com>\n"
"Language-Team: Hindi <www.anisecrets.com>\n"

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: 2021-12-25 23:57-0800\n"
"Last-Translator: Adriel Tristanputra <ultimexport@gmail.com>\n"
"Language-Team: Indonesian <>\n"

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: 2022-01-21 16:08+0100\n"
"Last-Translator: MT\n"
"Language-Team: blend-it <https://developer.blender.org/T42765>\n"

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: 2016-10-13 03:05+0900\n"
"Last-Translator: \n"
"Language-Team: Japanese Translation Team (https://sites.google.com/site/blugjp/blender-translators)\n"
@@ -1145,6 +1145,14 @@ msgstr ""
"フィルタリングとアセット管理全般で使用されます"
msgid "Asset Representation"
msgstr "アセットの情報"
msgid "Information about an entity that makes it possible for the asset system to deal with the entity as asset"
msgstr "アセットシステムにてその要素がアセットとして処理できるようにする、要素についての情報"
msgid "Asset Tag"
msgstr "アセットタグ"
@@ -19400,7 +19408,7 @@ msgstr "伝播ステップ"
msgid "Distance where boundary edge automasking is going to protect vertices from the fully masked edge"
msgstr "完全にマスクされた辺の頂点を守るため、境界の辺の自動マスキングが行われる距離"
msgstr "境界の辺の自動マスクを行う場合に、完全にマスク済みの辺の頂点を保護するための距離"
msgid "Blur Steps"
@@ -28896,7 +28904,7 @@ msgstr "端の処理"
msgid "How the image is extrapolated past its original bounds"
msgstr "画像の範囲外の外挿方法"
msgstr "画像の範囲外の処理方法"
msgctxt "Image"
@@ -33975,6 +33983,10 @@ msgid "Active Point"
msgstr "アクティブポイント"
msgid "Active point of masking layer"
msgstr "マスキングレイヤーのアクティブポイント"
msgid "Grease Pencil Color"
msgstr "グリースペンシルカラー"
@@ -45182,6 +45194,10 @@ msgid "Is Face Planar"
msgstr "平面判定"
msgid "Retrieve whether all triangles in a face are on the same plane, i.e. whether they have the same normal"
msgstr "一つの面内の全三角形が同一平面上にあるかどうか(同じ法線かどうか)を取得します"
msgid "Face Neighbors"
msgstr "面情報"
@@ -48863,7 +48879,7 @@ msgstr "キーフレームをコピー"
msgid "Copy selected keyframes to the copy/paste buffer"
msgstr "キーフレームをコピー・ペーストバッファーにコピーします"
msgstr "キーフレームをコピー/貼り付けバッファーにコピーします"
msgctxt "Operator"
@@ -54460,6 +54476,16 @@ msgid "-Z Axis"
msgstr "-Z軸"
msgid "Prioritize Active Color"
msgstr "アクティブカラーを優先"
msgid "Make sure active color will be exported first. Could be important since some other software can discard other color attributes besides the first one"
msgstr ""
"アクティブカラーが最初にエクスポートされるようにします\n"
"(一部のソフトウェアでは最初のカラー属性以外は無視されるため)"
msgid "Secondary Bone Axis"
msgstr "セカンダリボーン軸"
@@ -57019,7 +57045,7 @@ msgstr "シーケンスを補間"
msgid "Generate 'in-betweens' to smoothly interpolate between Grease Pencil frames"
msgstr "複数の「インビトウィーン(中割」を生成し、グリースペンシルフレーム間をスムーズに補間します"
msgstr "複数の「中割」を生成し、グリースペンシルフレーム間をスムーズに補間します"
msgctxt "GPencil"
@@ -60572,7 +60598,7 @@ msgstr "フェザーウェイトのクリア"
msgid "Reset the feather weight to zero"
msgstr "フェザーウェイトを0にリセットします"
msgstr "フェザーウェイトをにリセットします"
msgctxt "Operator"
@@ -60580,11 +60606,19 @@ msgid "Clear Restrict View"
msgstr "ビューの制限を解除"
msgid "Reveal temporarily hidden mask layers"
msgstr "一時的に非表示にしたマスクレイヤーを再表示します"
msgctxt "Operator"
msgid "Set Restrict View"
msgstr "ビューの制限を設定"
msgid "Temporarily hide mask layers"
msgstr "一時的にマスクレイヤーを非表示にします"
msgctxt "Operator"
msgid "Move Layer"
msgstr "レイヤー移動"
@@ -66196,7 +66230,7 @@ msgstr "オブジェクトを隠す"
msgid "Temporarily hide objects from the viewport"
msgstr "一時的にビューポートからオブジェクトをします"
msgstr "一時的にビューポートオブジェクトを非表示にします"
msgid "Hide unselected rather than selected objects"
@@ -71032,7 +71066,7 @@ msgstr "同じ方向を維持しつつ、希望の回転にするためクォー
msgctxt "Operator"
msgid "Relax Pose to Breakdown"
msgstr "中割方向にポーズをリラックス"
msgstr "中割にポーズをリラックス"
msgid "Make the current pose more similar to its breakdown pose"
@@ -87876,6 +87910,14 @@ msgid "Mini Axes Type"
msgstr "ミニ軸のタイプ"
msgid "Show small rotating 3D axes in the top right corner of the 3D viewport"
msgstr "3Dビューポートの右上の隅に、回転する小さな3D座標軸を表示します"
msgid "Simple Axes"
msgstr "シンプルな軸"
msgid "Interactive Navigation"
msgstr "インタラクティブナビゲーション"
@@ -98935,35 +98977,35 @@ msgstr "選択中のキーフレーム境界の色"
msgid "Breakdown Keyframe"
msgstr "中割キーフレーム"
msgstr "ブレイクダウンキーフレーム"
msgid "Color of breakdown keyframe"
msgstr "中割タグのキーフレームの色"
msgstr "ブレイクダウンタグのキーフレームの色"
msgid "Breakdown Keyframe Selected"
msgstr "選択中の中割キーフレーム"
msgstr "選択中のブレイクダウンキーフレーム"
msgid "Color of selected breakdown keyframe"
msgstr "選択中の中割キーフレームの色"
msgstr "選択中のブレイクダウンキーフレームの色"
msgid "Extreme Keyframe"
msgstr "極端キーフレーム"
msgstr "エクストリームキーフレーム"
msgid "Color of extreme keyframe"
msgstr "極端タグのキーフレームの色"
msgstr "エクストリームタグのキーフレームの色"
msgid "Extreme Keyframe Selected"
msgstr "選択中の極端キーフレーム"
msgstr "選択中のエクストリームキーフレーム"
msgid "Color of selected extreme keyframe"
msgstr "選択中の極端キーフレームの色"
msgstr "選択中のエクストリームキーフレームの色"
msgid "Jitter Keyframe"
@@ -111110,7 +111152,7 @@ msgstr "IDデータ"
msgctxt "Operator"
msgid "Paste Data-Blocks"
msgstr "データブロックをペースト"
msgstr "データブロックを貼り付け"
msgid "All View Layers"
@@ -112394,6 +112436,10 @@ msgid "Playback Frame Rate (FPS)"
msgstr "再生フレームレートFPS"
msgid "3D Viewport Axes"
msgstr "3Dビューポートの軸"
msgid "Smooth Wires"
msgstr "スムーズワイヤ"
@@ -117229,7 +117275,7 @@ msgstr "カスタム補間カーブがありません"
msgid "Expected current frame to be a breakdown"
msgstr "現在のフレームを中割フレームにしてください"
msgstr "現在のフレームをブレイクダウンにしてください"
msgid "Nothing to merge"
@@ -120733,7 +120779,7 @@ msgstr "アクション「%s」は保存されません。残すならフェイ
msgid "No keyframes copied to keyframes copy/paste buffer"
msgstr "コピー・ペーストバッファーにコピーするキーフレームがありません"
msgstr "コピー/貼り付けバッファーにコピーするキーフレームがありません"
msgid "Keyframe pasting is not available for mask mode"

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Tamar Mebonia <tammebonia@gmail.com>, 2023\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: 2020-01-04 05:04+0900\n"
"Last-Translator: Geuntak Jeong <beroberos@gmail.com>\n"
"Language-Team: Korean (http://www.transifex.com/lxlalexlxl/blender/language/ko/)\n"

View File

@@ -1,10 +1,10 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"(b'0000000000000000000000000000000000000000')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: 2013-11-05 13:47+0600\n"
"Last-Translator: Chyngyz Dzhumaliev <kyrgyzl10n@gmail.com>\n"
"Language-Team: Kirghiz <kyrgyzl10n@gmail.com>\n"

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: 2021-12-05 20:05+0100\n"
"Language: nl\n"
"MIME-Version: 1.0\n"

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: 2017-08-26 11:13+0200\n"
"Last-Translator: Mikołaj Juda <mikolaj.juda@gmail.com>\n"
"Language: pl\n"

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: Ivan Paulos Tomé <ivan.paulos.tome@yandex.com>\n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: 2017-09-08 21:24-0300\n"
"Last-Translator: Ivan Paulos Tomé <greylica@gmail.com>\n"
"Language-Team: Ivan Paulos Tomé, Inês Almeida, João Brandão (ULISBOA), Paulo Martins <ivan.paulos.tome@yandex.com>\n"

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: Leandro Paganelli <leandrobp@fastmail.com>\n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: 2022-03-21 19:03-0300\n"
"Last-Translator: Leandro Paganelli <leandrobp@fastmail.com>\n"
"Language-Team: Leandro Paganelli, Ivan Paulos Tomé, Dalai Felinto, Bruno Gonçalves Pirajá, Samuel Arataca, Daniel Tavares, Moraes Junior <ivan.paulos.tome@yandex.com>\n"

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: 2018-01-03 14:47+0000\n"
"Last-Translator: Lockal <lockalsash@gmail.com>, 2023\n"
"Language-Team: Russian (https://www.transifex.com/translateblender/teams/82039/ru/)\n"

View File

@@ -1,10 +1,10 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"PO-Revision-Date: 2023-03-08 07:56+0100\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: 2023-03-23 08:09+0100\n"
"Last-Translator: Jozef Matta <jozef.m923@gmail.com>\n"
"Language-Team: Jozef Matta\n"
"Language: sk_SK\n"
@@ -1112,6 +1112,10 @@ msgid "Copyright"
msgstr "Autorské práva"
msgid "Copyright notice for this asset. An empty copyright notice does not necessarily indicate that this is copyright-free. Contact the author if any clarification is needed"
msgstr "Upozornenie o autorských právach na toto aktívum. Prázdne upozornenie o autorských právach nemusí nevyhnutne znamenať, že je bez autorských práv. Ak je potrebné akékoľvek objasnenie, obráťte sa na autora"
msgid "Description"
msgstr "Popis"
@@ -1120,6 +1124,14 @@ msgid "A description of the asset to be displayed for the user"
msgstr "Popis aktív na zobrazenie pre užívateľa"
msgid "License"
msgstr "Licencia"
msgid "The type of license this asset is distributed under. An empty license name does not necessarily indicate that this is free of licensing terms. Contact the author if any clarification is needed"
msgstr "Typ licencie, pod ktorou je toto aktívum distribuované. Prázdny názov licencie nemusí nutne znamenať, že je bez licenčných podmienok. Ak je potrebné akékoľvek objasnenie, obráťte sa na autora"
msgid "Tags"
msgstr "Príznaky"
@@ -1128,6 +1140,14 @@ msgid "Custom tags (name tokens) for the asset, used for filtering and general a
msgstr "Vlastné príznaky (tokeny názvov) pre aktíva, ktoré sa používajú na filtrovanie a všeobecnú správu aktív"
msgid "Asset Representation"
msgstr "Zastúpenie aktív"
msgid "Information about an entity that makes it possible for the asset system to deal with the entity as asset"
msgstr "Informácie o entite, ktoré umožňujú systému aktív pracovať s entitou ako s aktívom"
msgid "Asset Tag"
msgstr "Príznak aktív"
@@ -13703,6 +13723,11 @@ msgid "Minimum number of particles per cell (ensures that each cell has at least
msgstr "Minimálny počet častíc na bunku (zabezpečuje, aby každá bunka obsahovala aspoň toto množstvo častíc)"
msgctxt "Amount"
msgid "Number"
msgstr "Počet"
msgid "Particle number factor (higher value results in more particles)"
msgstr "Faktor počtu častíc (vyššia hodnota vedie k početnejším časticiam)"
@@ -19544,6 +19569,61 @@ msgid "Editable falloff curve"
msgstr "Upravovateľné dopady krivky"
msgctxt "Curves"
msgid "Curve Preset"
msgstr "Predvoľba krivky"
msgctxt "Curves"
msgid "Custom"
msgstr "Vlastná"
msgctxt "Curves"
msgid "Smooth"
msgstr "Vyhladená"
msgctxt "Curves"
msgid "Smoother"
msgstr "Vyhladenejšia"
msgctxt "Curves"
msgid "Sphere"
msgstr "Guľa"
msgctxt "Curves"
msgid "Root"
msgstr "Koreňová"
msgctxt "Curves"
msgid "Sharp"
msgstr "Ostrá"
msgctxt "Curves"
msgid "Linear"
msgstr "Lineárna"
msgctxt "Curves"
msgid "Sharper"
msgstr "Ostrejšia"
msgctxt "Curves"
msgid "Inverse Square"
msgstr "Inverzný štvorec"
msgctxt "Curves"
msgid "Constant"
msgstr "Konštantná"
msgid "Curves Sculpt Settings"
msgstr "Nastavenia tvarovania kriviek"
@@ -20988,10 +21068,25 @@ msgid "Name of the Alembic attribute used for generating motion blur data"
msgstr "Názov atribútu Alembic, ktorý sa používa na generovanie údajov o rozostrení pohybom"
msgctxt "Unit"
msgid "Velocity Unit"
msgstr "Jednotka rýchlosti"
msgid "Define how the velocity vectors are interpreted with regard to time, 'frame' means the delta time is 1 frame, 'second' means the delta time is 1 / FPS"
msgstr "Definuje, ako sa majú vektory rýchlosti interpretovať s ohľadom na čas, „snímka“ znamená, že delta čas je 1 snímka, „druhé“ znamená, že delta čas je 1 / sním/s"
msgctxt "Unit"
msgid "Second"
msgstr "Sekúnd"
msgctxt "Unit"
msgid "Frame"
msgstr "Snímka"
msgid "Camera data-block for storing camera settings"
msgstr "Blok údajov kamery na uloženie nastavení kamery"
@@ -28014,6 +28109,11 @@ msgid "Text file on disk is different than the one in memory"
msgstr "Textový súbor na disku je iný ako ten v pamäti"
msgctxt "Text"
msgid "Lines"
msgstr "Riadky"
msgid "Lines of text"
msgstr "Riadky textu"
@@ -33513,6 +33613,10 @@ msgid "Active Point"
msgstr "Aktívny bod"
msgid "Active point of masking layer"
msgstr "Aktívny bod vrstvy maskovania"
msgid "Grease Pencil Color"
msgstr "Farba pastelky"
@@ -34050,6 +34154,11 @@ msgid "Write"
msgstr "Zápis"
msgctxt "NodeTree"
msgid "Constant"
msgstr "Konštantný"
msgid "Instances"
msgstr "Inštancie"
@@ -44664,6 +44773,10 @@ msgid "Is Face Planar"
msgstr "Je plôška rovinná"
msgid "Retrieve whether all triangles in a face are on the same plane, i.e. whether they have the same normal"
msgstr "Zisťuje, či sú všetky trojuholníky na plôške v tej istej rovine, t. j. či majú rovnaký normál"
msgid "Face Neighbors"
msgstr "Susedné plôšky"
@@ -53867,6 +53980,14 @@ msgid "-Z Axis"
msgstr "Os -Z"
msgid "Prioritize Active Color"
msgstr "Uprednostniť aktívne farby"
msgid "Make sure active color will be exported first. Could be important since some other software can discard other color attributes besides the first one"
msgstr "Najprv sa uistite, že sa bude exportovať aktívna farba. Mohlo by to byť dôležité, pretože niektoré iné programy môžu okrem prvého vyradiť aj iné atribúty farby"
msgid "Secondary Bone Axis"
msgstr "Sekundárne osi kosti"
@@ -59919,9 +60040,17 @@ msgid "Clear Restrict View"
msgstr "Zmazať obmedzené zobrazenie"
msgid "Reveal temporarily hidden mask layers"
msgstr "Odhalí dočasne skryté vrstvy masiek"
msgctxt "Operator"
msgid "Set Restrict View"
msgstr "Nastaviť obmedzenie zobrazenia"
msgstr "Nastaviť obmedzené zobrazenie"
msgid "Temporarily hide mask layers"
msgstr "Dočasne skryje vrstvy masky"
msgctxt "Operator"
@@ -80880,7 +81009,7 @@ msgstr "Priečinok textúr"
msgid "Path to the directory where imported textures will be copied"
msgstr "Cesta k priečinku, do ktorého sa budú kopírovať importované textúry "
msgstr "Cesta k priečinku, do ktorého sa budú kopírovať importované textúry"
msgid "Import Textures"
@@ -87040,6 +87169,14 @@ msgid "Mini Axes Type"
msgstr "Typ mini osí"
msgid "Show small rotating 3D axes in the top right corner of the 3D viewport"
msgstr "Zobrazí malé rotujúce 3D osi v pravom hornom rohu 3D záberu"
msgid "Simple Axes"
msgstr "Jednoduché osi"
msgid "Interactive Navigation"
msgstr "Interaktívna navigácia"
@@ -90045,10 +90182,25 @@ msgid "Additional subdivision along the curves"
msgstr "Dodatočné delenie pozdĺž kriviek"
msgctxt "Curves"
msgid "Curves Shape Type"
msgstr "Typ tvaru krivky"
msgid "Curves shape type"
msgstr "Typ tvaru krivky"
msgctxt "Curves"
msgid "Strand"
msgstr "Vlákno"
msgctxt "Curves"
msgid "Strip"
msgstr "Pás"
msgid "Multiple Engines"
msgstr "Viacnásobný mechanizmus"
@@ -96907,7 +97059,7 @@ msgstr "Zobraziť kresbu textúry UV"
msgid "Display overlay of texture paint UV layer"
msgstr "Zobrazí prekrytie kresbou textúry UV vrstvy."
msgstr "Zobrazí prekrytie kresbou textúry UV vrstvy"
msgid "Tile Grid Shape"
@@ -106332,6 +106484,10 @@ msgid "Previews clear process failed for file '%s'!"
msgstr "Proces vyčistenia náhľadov zlyhal pre súbor '%s'!"
msgid "No active camera in the scene"
msgstr "Na scéne nie je žiadna aktívna kamera"
msgid "Unexpected modifier type: "
msgstr "Neočakávaný typ modifikátora: "
@@ -111408,6 +111564,10 @@ msgid "Playback Frame Rate (FPS)"
msgstr "Frekvencia prehrávania (sním/s)"
msgid "3D Viewport Axes"
msgstr "Osi 3D záberu"
msgid "Smooth Wires"
msgstr "Vyhladiť drôty"
@@ -116396,6 +116556,10 @@ msgid "Error evaluating number, see Info editor for details"
msgstr "Chyba pri vyhodnocovaní čísla, ďalšie informácie nájdete v editore informácií"
msgid "Press a key"
msgstr "Stlačiť klávesu"
msgid "Missing Panel: %s"
msgstr "Chýbajúci panel: %s"
@@ -123682,6 +123846,31 @@ msgid "UNDEFINED"
msgstr "NEDEFINOVANÉ"
msgctxt "NodeTree"
msgid "Functions"
msgstr "Funkcie"
msgctxt "NodeTree"
msgid "Comparison"
msgstr "Porovnanie"
msgctxt "NodeTree"
msgid "Rounding"
msgstr "Zaokrúhlenie"
msgctxt "NodeTree"
msgid "Trigonometric"
msgstr "Trigonometrický"
msgctxt "NodeTree"
msgid "Conversion"
msgstr "Konverzia"
msgid "Same input/output direction of sockets"
msgstr "Rovnaký smer vstupu/výstupu zásuviek"

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: 2012-09-07 22:32+0100\n"
"Last-Translator: Nikola Radovanovic <cobisimo@gmail.com>\n"
"Language-Team: Nikola Radovanovic\n"

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: 2012-09-07 22:32+0100\n"
"Last-Translator: Nikola Radovanovic <cobisimo@gmail.com>\n"
"Language-Team: Nikola Radovanovic\n"

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: \n"
"Last-Translator: Arvid Rudling <arvid.r@gmail.com>\n"
"Language-Team: \n"

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: 2019-12-08 17:40+0700\n"
"Last-Translator: gongpha <gongpha@gmail.com>\n"
"Language-Team: Thai Translation Team <gongpha@gmail.com>\n"

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: 2023-02-05 22:00+0300\n"
"Last-Translator: Emir SARI <emir_sari@îcloud.com>\n"
"Language-Team: Turkish <>\n"

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: 2021-03-01 19:15+0000\n"
"Last-Translator: lxlalexlxl <lxlalexlxl@ukr.net>\n"
"Language-Team: Ukrainian (Ukraine) (http://www.transifex.com/lxlalexlxl/blender/language/uk_UA/)\n"

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: 2022-08-19 12:33+0700\n"
"Last-Translator: HỒ NHỰT CHÂU <su_huynh@yahoo.com>\n"
"Language-Team: Tỉnh An Giang, Đình Bình Phú\n"

View File

@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Blender 3.5.0 Beta (b'3962d9b931f1')\n"
"Project-Id-Version: Blender 3.5.0 Release Candidate (b'14efe7000449')\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-20 13:37:56\n"
"POT-Creation-Date: 2023-03-27 16:38:19\n"
"PO-Revision-Date: \n"
"Last-Translator: DeathBlood\n"
"Language-Team: \n"

Some files were not shown because too many files have changed in this diff Show More