mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-04 04:56:57 +00:00
Check for truncated flag presence or absence in cbuffer checks
This commit is contained in:
3 files changed
+14
-2
No files matched your search
@@ -35,8 +35,20 @@ class ShaderVariableCheck:
|
||||
|
||||
return self
|
||||
|
||||
def truncated(self):
|
||||
if not (self.var.flags & rd.ShaderVariableFlags.Truncated):
|
||||
raise TestFailureException(f"Variable {self.var.name} is not truncated")
|
||||
|
||||
count = self.var.columns
|
||||
if list(self.var.value.u32v[0:count]) != [0] * count:
|
||||
raise TestFailureException(f"Truncated variable {self.var.name} doesn't have 0 values")
|
||||
|
||||
def value(self, value_: List[float] | List[int]):
|
||||
count = len(value_)
|
||||
|
||||
if self.var.flags & rd.ShaderVariableFlags.Truncated:
|
||||
raise TestFailureException(f"Variable {self.var.name} is truncated but we're checking its value")
|
||||
|
||||
if isinstance(value_[0], float):
|
||||
vals = []
|
||||
if self.var.type == rd.VarType.Float:
|
||||
|
||||
@@ -31,7 +31,7 @@ class D3D11_Parameter_Zoo(rdtest.TestCase):
|
||||
pipe.GetShaderEntryPoint(stage), 0,
|
||||
cbuf.resource, cbuf.byteOffset, cbuf.byteSize))
|
||||
|
||||
var_check.check('cbuf_zero').rows(1).cols(4).value([0.0, 0.0, 0.0, 0.0])
|
||||
var_check.check('cbuf_zero').rows(1).cols(4).truncated()
|
||||
|
||||
tex = rd.TextureDisplay()
|
||||
tex.overlay = rd.DebugOverlay.Drawcall
|
||||
|
||||
@@ -89,7 +89,7 @@ class VK_Robustness2(rdtest.TestCase):
|
||||
cbuf.resource, cbuf.byteOffset, cbuf.byteSize))
|
||||
|
||||
if cb.bufferBacked:
|
||||
var_check.check('data').type(rd.VarType.Float).rows(1).cols(4).value([0.0, 0.0, 0.0, 0.0])
|
||||
var_check.check('data').type(rd.VarType.Float).rows(1).cols(4).truncated()
|
||||
else:
|
||||
val = [0, 0, 0, 0]
|
||||
if self.find_action('robustBufferAccess2') is not None:
|
||||
|
||||
Reference in new issue
Block a user