mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Update test for descriptor names
This commit is contained in:
@@ -59,27 +59,33 @@ class D3D12_Descriptor_Indexing(rdtest.TestCase):
|
||||
bind_info = {
|
||||
(rd.DescriptorCategory.ReadOnlyResource, 0): {
|
||||
'loc': (0, 8),
|
||||
'elems': [0]
|
||||
'elems': [0],
|
||||
'names': {0: ''}
|
||||
},
|
||||
(rd.DescriptorCategory.ReadOnlyResource, 1): {
|
||||
'loc': (0, 12),
|
||||
'elems': [0]
|
||||
'elems': [0],
|
||||
'names': {0: 'smiley'}
|
||||
},
|
||||
(rd.DescriptorCategory.ReadOnlyResource, 2): {
|
||||
'loc': (1, 0),
|
||||
'elems': [19, 20, 21]
|
||||
'elems': [19, 20, 21],
|
||||
'names': {19: 'another_smiley', 20: 'more_smileys???', 21: ''}
|
||||
},
|
||||
(rd.DescriptorCategory.ReadOnlyResource, 3): {
|
||||
'loc': (1, 40),
|
||||
'elems': [9, 19, 20]
|
||||
'elems': [9, 19, 20],
|
||||
'names': {9: '', 19: '', 20: ''}
|
||||
},
|
||||
(rd.DescriptorCategory.ReadOnlyResource, 4): {
|
||||
'loc': (1, 80),
|
||||
'elems': [19, 23]
|
||||
'elems': [19, 23],
|
||||
'names': {19: '', 23: ''}
|
||||
},
|
||||
(rd.DescriptorCategory.Sampler, 1): {
|
||||
'loc': (1, 0),
|
||||
'elems': [19, 20, 21]
|
||||
'elems': [19, 20, 21],
|
||||
'names': {19: '', 20: '', 21: ''}
|
||||
},
|
||||
}
|
||||
|
||||
@@ -131,10 +137,17 @@ class D3D12_Descriptor_Indexing(rdtest.TestCase):
|
||||
raise rdtest.TestFailureException(
|
||||
"Location {} not expected for {} at space,reg {} array element {}".format(
|
||||
loc.fixedBindNumber, str(a.access.type), bind_info[idx]['loc'], a.access.arrayElement))
|
||||
if loc.logicalBindName != "{}[{}]".format(heapName, bind_info[idx]['loc'][1] + a.access.arrayElement):
|
||||
|
||||
expectedDescName = bind_info[idx]['names'][a.access.arrayElement]
|
||||
if expectedDescName == '':
|
||||
expectedDescName = heapName
|
||||
|
||||
expectedDescName = "{}[{}]".format(expectedDescName, bind_info[idx]['loc'][1] + a.access.arrayElement)
|
||||
|
||||
if loc.logicalBindName != expectedDescName:
|
||||
raise rdtest.TestFailureException(
|
||||
"Location {} not expected for space,reg {} array element {}".format(
|
||||
loc.logicalBindName, bind_info[idx]['loc'], a.access.arrayElement))
|
||||
"Location {} not the expected {} for space,reg {} array element {}".format(
|
||||
loc.logicalBindName, expectedDescName, bind_info[idx]['loc'], a.access.arrayElement))
|
||||
|
||||
bind_info[idx]['elems'].remove(a.access.arrayElement)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user