Texture usage flag `GPU_TEXTURE_USAGE_MIP_SWIZZLE_VIEW`
was originally implemented and used too conservatively for many
cases in which the underlying API flags were not required.
Renaming to `GPU_TEXTURE_USAGE_FORMAT_VIEW` to reflect
the only essential use case for when a texture view is initialized with
a different texture format to the source texture. Texture views can
still be created without this flag when mip range or base level is
adjusted,
This flag is still required by stencil views and internally by the Metal
backend for certain feature support such as SRGB render toggling.
Patch also includes some small changes to the Metal backend to
adapt to this new compatibility and correctly capture all texture view
use-cases.
Related to #115269
Authored by Apple: Michael Parkin-White
Pull Request: https://projects.blender.org/blender/blender/pulls/115300
Address regression in [0] which allowed wmKeyMapItem::properties to
remain set when a valid wmKeyMapItem::ptr can't be created because the
wmOperatorType isn't available (temporarily in the case of reloading).
Resolve by freeing wmKeyMapItem::properties when the `ptr` isn't set.
Also add null pointer check not to assume wmKeyMapItem::properties
implies an allocated wmKeyMapItem::ptr. Something which is already
accounted for everywhere else.
[0]: 08e5f94a70
Also add null pointer check not to assume wmKeyMapItem::properties
implies an allocated wmKeyMapItem::ptr. Something which is already
accounted for everywhere else.
Avoid awkward kludges with IMB_init/exit & IMB_ffmpeg_init calls.
The animation player was responsible for calling IMB_exit, not IMB_init,
this complicated drag & drop which needed to re-internalize IMB before
returning.
Delay initializing IMB since none of the other argument handlers
depend on it, make wm_main_playanim_intern responsible for calling
both initialization & exit calls for IMB.
Also expand code comments for ARG_PASS_SETTINGS.
This was fixed by [0] however that fix didn't account for IMB
sometimes freeing GPU resources created by color management
(resolved by [1] which effectively reverted [0]).
Resolve by re-initializing IMB in the case of drag & drop.
[0]: 51467b0611
[1]: 05c56603a9
This was initially added a long time ago[1] to help with certain exit
behavior while running under a debugger. However, this shouldn't be
necessary any longer.
More importantly, tests have started to use the `--debug` option[2].
Somehow the bots are fine, but anyone running the tests locally on
Windows will experience what looks like a hang; unless they press a key
to allow the tests to continue.
[1] 1cc19c6993
[2] The `blendfile_versioning` test
Pull Request: https://projects.blender.org/blender/blender/pulls/114605
Standalone animation player has inconsistent GPU context activation
paradigm compared with standard rendering paths. The Metal backend
utilises the context activation step to refresh target window swapchains
from within the GHOST module.
This PR adds activation and deactivation calls, and also aims to clean up
GPU_render_begin/end setup to ensure all paths are covered.
Also resolves a bug upon shutdown wherein GPU resources which may
be tied to a GPU context are released during IMB_exit(), which is called
after GPU context destruction.
Authored by Apple: Michael Parkin-White
Pull Request: https://projects.blender.org/blender/blender/pulls/114573
Root of the issue was that a1d7ec7139 (from !110109, new comptibility
handling) missed to update code of `handle_subversion_warning`, file
version numbers should be checked here now, not the minversion ones.
On top of that, this report has been changed to a `RPT_WARNING` instead
of a `RPT_ERROR`, and reports 'print level' for file reading was set to
`WARNING` level way too late to have any effect in existing code...
The last good commit was 8474716abb.
After this commits from main were pushed to blender-v4.0-release. These are
being reverted.
Commits a4880576dc from to b26f176d1a that happend afterwards were meant for
4.0, and their contents is preserved.
`WM_draw_region_free()` should manage region-draw data, and not change
region state. This should be done by normal region state management
functions. Especially for a flag like `ARegion::visible` which is just
the cached result of the region's visibility evaluation, not the proper
way to actualy manage the region visibility.
Don't log wm.operator operator properties when no properties
are stored/loaded, this was noisy, especially for the
INFO_OT_reports_display_update operator when runs from a timer.
Regression from [0] where the key-map was attempting to load preferences
for key-map items for add-on operators which were not yet defined.
Resolve by postponing keymap updating until after loading add-ons.
[0]: 6de294a191
Translation markers `N_()` were added to IDs' plural names in !113912.
I also renamed some of those because I thought there were only display
names.
This commit reverts the renaming, leaving only the addition of the
markers.
Pull Request: https://projects.blender.org/blender/blender/pulls/114030
The animation player used abbreviations in confusing ways:
`wait2` with no `wait1`, `indicator` without noting what was indicated,
`fstep` & `sstep` terms also weren't all that obvious.
Use clearer & more verbose names.
Alternate fix for [0], a crash when a texture fails to load since this
seems to cause animation playback to fail on WIN32, see #113849.
While I can't redo the error, the main change was setting up
`immVertexFormat` before calling `ocio_transform_ibuf`.
[0]: 34899ec13d.
This reverts commit 34899ec13d.
This causes issues on WIN32 which I'm unable to reproduce.
Resolving the error with textures failing to load can be done with
fewer changes.