﻿<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=%E5%88%A9%E7%94%A8%E8%80%85%3AJwilkins%2FVFX%2FMisc%2FSafety</id>
	<title>利用者:Jwilkins/VFX/Misc/Safety - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=%E5%88%A9%E7%94%A8%E8%80%85%3AJwilkins%2FVFX%2FMisc%2FSafety"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Jwilkins/VFX/Misc/Safety&amp;action=history"/>
	<updated>2026-06-18T12:12:20Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Jwilkins/VFX/Misc/Safety&amp;diff=143753&amp;oldid=prev</id>
		<title>Yamyam: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Jwilkins/VFX/Misc/Safety&amp;diff=143753&amp;oldid=prev"/>
		<updated>2018-06-28T21:04:27Z</updated>

		<summary type="html">&lt;p&gt;1版 をインポートしました&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2018年6月28日 (木) 21:04時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ja&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(相違点なし)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Yamyam</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Jwilkins/VFX/Misc/Safety&amp;diff=143752&amp;oldid=prev</id>
		<title>wiki&gt;Jwilkins: Created page with &quot;= GPU API Safety Checks =  == WITH_GPU_SAFETY ==  Building ''Blender'' with the ''WITH_GPU_SAFETY'' option turned on  will enable a lot of extra checks which help to ensure that ...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Jwilkins/VFX/Misc/Safety&amp;diff=143752&amp;oldid=prev"/>
		<updated>2013-09-23T23:38:01Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= GPU API Safety Checks =  == WITH_GPU_SAFETY ==  Building &amp;#039;&amp;#039;Blender&amp;#039;&amp;#039; with the &amp;#039;&amp;#039;WITH_GPU_SAFETY&amp;#039;&amp;#039; option turned on  will enable a lot of extra checks which help to ensure that ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= GPU API Safety Checks =&lt;br /&gt;
&lt;br /&gt;
== WITH_GPU_SAFETY ==&lt;br /&gt;
&lt;br /&gt;
Building ''Blender'' with the ''WITH_GPU_SAFETY'' option turned on &lt;br /&gt;
will enable a lot of extra checks which help to ensure that the&lt;br /&gt;
graphics API is being used correctly.&lt;br /&gt;
&lt;br /&gt;
'''No ''GPU_SAFETY'' check should ever fail!'''&lt;br /&gt;
&lt;br /&gt;
For that reason it is preferable that the ''WITH_ASSERT_ABORT'' option&lt;br /&gt;
is also enabled.  Since this will trigger a break point and allow&lt;br /&gt;
the state of ''Blender'' to be preserved enough that the reason for&lt;br /&gt;
the failure can be determined.&lt;br /&gt;
&lt;br /&gt;
== Macros ==&lt;br /&gt;
&lt;br /&gt;
Header File: &amp;lt;tt&amp;gt;GPU_safety.h&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;GPU_SAFETY&amp;lt;/tt&amp;gt; macro is defined to either 0 or 1 depending on if WITH_GPU_SAFETY is defined.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;GPU_ASSERT(pred)&amp;lt;/tt&amp;gt; macro will abort the program if &amp;lt;tt&amp;gt;pred&amp;lt;/tt&amp;gt; is false.&lt;br /&gt;
The &amp;lt;tt&amp;gt;pred&amp;lt;/tt&amp;gt; will never be executed if &amp;lt;tt&amp;gt;WITH_GPU_SAFETY&amp;lt;/tt&amp;gt; is disabled so do not place code that always needs to execute inside of &amp;lt;tt&amp;gt;GPU_ASSERT&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;GPU_ABORT()&amp;lt;/tt&amp;gt; will unconditionally &amp;lt;tt&amp;gt;abort&amp;lt;/tt&amp;gt; ''Blender'' if execution reaches it and &amp;lt;tt&amp;gt;WITH_GPU_SAFETY&amp;lt;/tt&amp;gt; is enabled.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;GPU_CHECK_NO_ERROR()&amp;lt;/tt&amp;gt; is strategically placed throughout the code to make sure that there are no unchecked ''OpenGL'' errors.  &lt;br /&gt;
Code that directly calls ''OpenGL'' should have a &amp;lt;tt&amp;gt;GPU_CHECK_NO_ERROR()&amp;lt;/tt&amp;gt; before and after those calls.&lt;br /&gt;
However, there is no need to check every single ''OpenGL'' call (at that would be both tedious and make reading the code difficult).&lt;br /&gt;
The goal is that any misuse of the ''OpenGL'' API will be cause immediately and close to where the error occurred.  &lt;br /&gt;
''OpenGL'' errors are almost all caused by misuse of the API (akin to a syntax error) and not by runtime problems (such as an out of memory error).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;GPU_CHECK(expr)&amp;lt;/tt&amp;gt; is equivalent to putting &amp;lt;tt&amp;gt;GPU_CHECK_NO_ERROR()&amp;lt;/tt&amp;gt; before and after a function.&lt;br /&gt;
Unlike &amp;lt;tt&amp;gt;GPU_ASSERT()&amp;lt;/tt&amp;gt; the &amp;lt;tt&amp;gt;expr&amp;lt;/tt&amp;gt; will not disappear in non-debug builds.&lt;/div&gt;</summary>
		<author><name>wiki&gt;Jwilkins</name></author>
		
	</entry>
</feed>