diff --git a/crates/metal2vulkan-conformance/recordings/function-facts-constants.json b/crates/metal2vulkan-conformance/recordings/function-facts-constants.json new file mode 100644 index 000000000..72bbf1440 --- /dev/null +++ b/crates/metal2vulkan-conformance/recordings/function-facts-constants.json @@ -0,0 +1,335 @@ +{ + "format": 1, + "case": "function-facts-constants", + "suite_version": 1, + "shaders": [ + { + "fixture": "function_constant_interface.ll", + "entry": "fc_vertex_gated_outputs", + "source_sha256": "5b11a08f3a82f7b6d2eba8a4b7721635ff7ebb5eb602957c8ebf57992321d13b" + }, + { + "fixture": "function_constant_interface.air.ll", + "entry": "fc_vertex_gated_outputs", + "source_sha256": "39087c31da0a65052f1c252df7bd6d395fed63f7153ea735993f1daa05bd6d53" + } + ], + "answers": [ + { + "key": { + "chip": "apple-m3-max", + "os_version": "27.0.1", + "os_build": "26A434", + "metal_level": "27.0.1" + }, + "provenance": "metal_run", + "device": "Apple M3 Max", + "runs": 3, + "outcomes": [ + { + "runs": 3, + "transcript": { + "root": { + "name": "case", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "inputs", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "air", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "5b11a08f3a82f7b6d2eba8a4b7721635ff7ebb5eb602957c8ebf57992321d13b" + } + } + }, + { + "name": "air-typed", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "39087c31da0a65052f1c252df7bd6d395fed63f7153ea735993f1daa05bd6d53" + } + } + }, + { + "name": "entry", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "cb36e3879045165174ffb8557d53b10e81fbcbf7e7dd1f471a4854e88aecdccf" + } + } + }, + { + "name": "constants", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + } + } + ] + }, + { + "name": "library", + "observed": { + "value": { + "variant": { + "name": "Ok", + "payload": "absent" + } + } + } + }, + { + "name": "facts", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "fc_vertex_gated_outputs" + ] + } + } + }, + { + "name": "function_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLFunctionTypeVertex" + ] + }, + "raw": { + "uint": 1 + } + } + } + } + }, + { + "name": "patch_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLPatchTypeNone" + ] + }, + "raw": { + "uint": 0 + } + } + } + } + }, + { + "name": "patch_control_point_count", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "options", + "observed": { + "value": { + "fields": { + "names": { + "set": [] + }, + "raw": { + "uint": 0 + } + } + } + } + }, + { + "name": "device", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "vertex_attributes", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "stage_input_attributes", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "function_constants", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "count", + "observed": { + "value": { + "uint": 2 + } + } + }, + { + "name": "constant/has_size", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "data_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeBool" + ] + }, + "raw": { + "uint": 53 + } + } + } + } + }, + { + "name": "index", + "observed": { + "value": { + "uint": 1 + } + } + }, + { + "name": "required", + "observed": { + "value": { + "bool": true + } + } + } + ] + }, + { + "name": "constant/has_tint", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "data_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeBool" + ] + }, + "raw": { + "uint": 53 + } + } + } + } + }, + { + "name": "index", + "observed": { + "value": { + "uint": 0 + } + } + }, + { + "name": "required", + "observed": { + "value": { + "bool": true + } + } + } + ] + } + ] + } + ] + }, + { + "name": "notices", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "set", + "observed": { + "value": { + "nothing": "announced_nothing" + } + } + }, + { + "name": "counts", + "observed": { + "value": { + "fields": {} + } + } + } + ] + } + ] + } + } + } + ], + "validated": "ran" + } + ] +} diff --git a/crates/metal2vulkan-conformance/recordings/function-facts-fragment.json b/crates/metal2vulkan-conformance/recordings/function-facts-fragment.json new file mode 100644 index 000000000..da2f80b7b --- /dev/null +++ b/crates/metal2vulkan-conformance/recordings/function-facts-fragment.json @@ -0,0 +1,253 @@ +{ + "format": 1, + "case": "function-facts-fragment", + "suite_version": 1, + "shaders": [ + { + "fixture": "rt6_resolves.ll", + "entry": "rt6_resolve_white", + "source_sha256": "826f30ea88e648ce64e04e26abdfaa51c2c81fdd933f41e0a5b621eb7c9d18e9" + }, + { + "fixture": "rt6_resolves.air.ll", + "entry": "rt6_resolve_white", + "source_sha256": "deacd509ddf64f7fe146057f3097edfb6582b0033fd623a9d2ec49db7596aec9" + } + ], + "answers": [ + { + "key": { + "chip": "apple-m3-max", + "os_version": "27.0.1", + "os_build": "26A434", + "metal_level": "27.0.1" + }, + "provenance": "metal_run", + "device": "Apple M3 Max", + "runs": 3, + "outcomes": [ + { + "runs": 3, + "transcript": { + "root": { + "name": "case", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "inputs", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "air", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "826f30ea88e648ce64e04e26abdfaa51c2c81fdd933f41e0a5b621eb7c9d18e9" + } + } + }, + { + "name": "air-typed", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "deacd509ddf64f7fe146057f3097edfb6582b0033fd623a9d2ec49db7596aec9" + } + } + }, + { + "name": "entry", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "0978087a4a7328b605b612633c49ddfbcc8d51b64eb1c1f8490b5494f61a5d8c" + } + } + }, + { + "name": "constants", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + } + } + ] + }, + { + "name": "library", + "observed": { + "value": { + "variant": { + "name": "Ok", + "payload": "absent" + } + } + } + }, + { + "name": "facts", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "rt6_resolve_white" + ] + } + } + }, + { + "name": "function_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLFunctionTypeFragment" + ] + }, + "raw": { + "uint": 2 + } + } + } + } + }, + { + "name": "patch_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLPatchTypeNone" + ] + }, + "raw": { + "uint": 0 + } + } + } + } + }, + { + "name": "patch_control_point_count", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "options", + "observed": { + "value": { + "fields": { + "names": { + "set": [] + }, + "raw": { + "uint": 0 + } + } + } + } + }, + { + "name": "device", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "vertex_attributes", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "stage_input_attributes", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "function_constants", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "count", + "observed": { + "value": { + "uint": 0 + } + } + } + ] + } + ] + }, + { + "name": "notices", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "set", + "observed": { + "value": { + "nothing": "announced_nothing" + } + } + }, + { + "name": "counts", + "observed": { + "value": { + "fields": {} + } + } + } + ] + } + ] + } + } + } + ], + "validated": "ran" + } + ] +} diff --git a/crates/metal2vulkan-conformance/recordings/function-facts-gated-attribute.json b/crates/metal2vulkan-conformance/recordings/function-facts-gated-attribute.json new file mode 100644 index 000000000..03fda48c5 --- /dev/null +++ b/crates/metal2vulkan-conformance/recordings/function-facts-gated-attribute.json @@ -0,0 +1,572 @@ +{ + "format": 1, + "case": "function-facts-gated-attribute", + "suite_version": 1, + "shaders": [ + { + "fixture": "function_constant_interface.ll", + "entry": "fc_vertex_input_to_output", + "source_sha256": "5b11a08f3a82f7b6d2eba8a4b7721635ff7ebb5eb602957c8ebf57992321d13b" + }, + { + "fixture": "function_constant_interface.air.ll", + "entry": "fc_vertex_input_to_output", + "source_sha256": "39087c31da0a65052f1c252df7bd6d395fed63f7153ea735993f1daa05bd6d53" + } + ], + "answers": [ + { + "key": { + "chip": "apple-m3-max", + "os_version": "27.0.1", + "os_build": "26A434", + "metal_level": "27.0.1" + }, + "provenance": "metal_run", + "device": "Apple M3 Max", + "runs": 3, + "outcomes": [ + { + "runs": 3, + "transcript": { + "root": { + "name": "case", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "inputs", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "air", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "5b11a08f3a82f7b6d2eba8a4b7721635ff7ebb5eb602957c8ebf57992321d13b" + } + } + }, + { + "name": "air-typed", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "39087c31da0a65052f1c252df7bd6d395fed63f7153ea735993f1daa05bd6d53" + } + } + }, + { + "name": "entry", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "95cf133f4e40bbafb8d63444a8cfdc8d70cebfbec29d7c5cce53e39009faed08" + } + } + }, + { + "name": "constants", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + } + } + ] + }, + { + "name": "library", + "observed": { + "value": { + "variant": { + "name": "Ok", + "payload": "absent" + } + } + } + }, + { + "name": "facts", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "fc_vertex_input_to_output" + ] + } + } + }, + { + "name": "function_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLFunctionTypeVertex" + ] + }, + "raw": { + "uint": 1 + } + } + } + } + }, + { + "name": "patch_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLPatchTypeNone" + ] + }, + "raw": { + "uint": 0 + } + } + } + } + }, + { + "name": "patch_control_point_count", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "options", + "observed": { + "value": { + "fields": { + "names": { + "set": [] + }, + "raw": { + "uint": 0 + } + } + } + } + }, + { + "name": "device", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "vertex_attributes", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "count", + "observed": { + "value": { + "uint": 2 + } + } + }, + { + "name": "attribute/0", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "position" + ] + } + } + }, + { + "name": "attribute_index", + "observed": { + "value": { + "uint": 0 + } + } + }, + { + "name": "attribute_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeFloat4" + ] + }, + "raw": { + "uint": 6 + } + } + } + } + }, + { + "name": "active", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_data", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "patch_control_point_data", + "observed": { + "value": { + "bool": false + } + } + } + ] + }, + { + "name": "attribute/1", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "uv" + ] + } + } + }, + { + "name": "attribute_index", + "observed": { + "value": { + "uint": 1 + } + } + }, + { + "name": "attribute_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeFloat2" + ] + }, + "raw": { + "uint": 4 + } + } + } + } + }, + { + "name": "active", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_data", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "patch_control_point_data", + "observed": { + "value": { + "bool": false + } + } + } + ] + } + ] + }, + { + "name": "stage_input_attributes", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "count", + "observed": { + "value": { + "uint": 2 + } + } + }, + { + "name": "attribute/0", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "position" + ] + } + } + }, + { + "name": "attribute_index", + "observed": { + "value": { + "uint": 0 + } + } + }, + { + "name": "attribute_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeFloat4" + ] + }, + "raw": { + "uint": 6 + } + } + } + } + }, + { + "name": "active", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_data", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "patch_control_point_data", + "observed": { + "value": { + "bool": false + } + } + } + ] + }, + { + "name": "attribute/1", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "uv" + ] + } + } + }, + { + "name": "attribute_index", + "observed": { + "value": { + "uint": 1 + } + } + }, + { + "name": "attribute_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeFloat2" + ] + }, + "raw": { + "uint": 4 + } + } + } + } + }, + { + "name": "active", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_data", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "patch_control_point_data", + "observed": { + "value": { + "bool": false + } + } + } + ] + } + ] + }, + { + "name": "function_constants", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "count", + "observed": { + "value": { + "uint": 1 + } + } + }, + { + "name": "constant/has_uv", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "data_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeBool" + ] + }, + "raw": { + "uint": 53 + } + } + } + } + }, + { + "name": "index", + "observed": { + "value": { + "uint": 5 + } + } + }, + { + "name": "required", + "observed": { + "value": { + "bool": true + } + } + } + ] + } + ] + } + ] + }, + { + "name": "notices", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "set", + "observed": { + "value": { + "nothing": "announced_nothing" + } + } + }, + { + "name": "counts", + "observed": { + "value": { + "fields": {} + } + } + } + ] + } + ] + } + } + } + ], + "validated": "ran" + } + ] +} diff --git a/crates/metal2vulkan-conformance/recordings/function-facts-kernel.json b/crates/metal2vulkan-conformance/recordings/function-facts-kernel.json new file mode 100644 index 000000000..7eb9320bd --- /dev/null +++ b/crates/metal2vulkan-conformance/recordings/function-facts-kernel.json @@ -0,0 +1,253 @@ +{ + "format": 1, + "case": "function-facts-kernel", + "suite_version": 1, + "shaders": [ + { + "fixture": "a27_ob1_threadgroup.ll", + "entry": "ob1_threadgroup", + "source_sha256": "0c98a096e60fd50b4a119ac1539c8907a7ca14df5c4c0ea9163bae96240c1235" + }, + { + "fixture": "a27_ob1_threadgroup.air.ll", + "entry": "ob1_threadgroup", + "source_sha256": "6e2d8bc010bac734195035dcb2466f5947642236e3ec187537ef47b6ff23815e" + } + ], + "answers": [ + { + "key": { + "chip": "apple-m3-max", + "os_version": "27.0.1", + "os_build": "26A434", + "metal_level": "27.0.1" + }, + "provenance": "metal_run", + "device": "Apple M3 Max", + "runs": 3, + "outcomes": [ + { + "runs": 3, + "transcript": { + "root": { + "name": "case", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "inputs", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "air", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "0c98a096e60fd50b4a119ac1539c8907a7ca14df5c4c0ea9163bae96240c1235" + } + } + }, + { + "name": "air-typed", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "6e2d8bc010bac734195035dcb2466f5947642236e3ec187537ef47b6ff23815e" + } + } + }, + { + "name": "entry", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "a42c4eb5d83dd0303ce05318114985e750ae0adc64778504160be62a196e30b8" + } + } + }, + { + "name": "constants", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + } + } + ] + }, + { + "name": "library", + "observed": { + "value": { + "variant": { + "name": "Ok", + "payload": "absent" + } + } + } + }, + { + "name": "facts", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "ob1_threadgroup" + ] + } + } + }, + { + "name": "function_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLFunctionTypeKernel" + ] + }, + "raw": { + "uint": 3 + } + } + } + } + }, + { + "name": "patch_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLPatchTypeNone" + ] + }, + "raw": { + "uint": 0 + } + } + } + } + }, + { + "name": "patch_control_point_count", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "options", + "observed": { + "value": { + "fields": { + "names": { + "set": [] + }, + "raw": { + "uint": 0 + } + } + } + } + }, + { + "name": "device", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "vertex_attributes", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "stage_input_attributes", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "function_constants", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "count", + "observed": { + "value": { + "uint": 0 + } + } + } + ] + } + ] + }, + { + "name": "notices", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "set", + "observed": { + "value": { + "nothing": "announced_nothing" + } + } + }, + { + "name": "counts", + "observed": { + "value": { + "fields": {} + } + } + } + ] + } + ] + } + } + } + ], + "validated": "ran" + } + ] +} diff --git a/crates/metal2vulkan-conformance/recordings/function-facts-optional-constant.json b/crates/metal2vulkan-conformance/recordings/function-facts-optional-constant.json new file mode 100644 index 000000000..5918eb3d2 --- /dev/null +++ b/crates/metal2vulkan-conformance/recordings/function-facts-optional-constant.json @@ -0,0 +1,294 @@ +{ + "format": 1, + "case": "function-facts-optional-constant", + "suite_version": 1, + "shaders": [ + { + "fixture": "function_constant_interface.ll", + "entry": "fc_fragment_unobserved_input", + "source_sha256": "5b11a08f3a82f7b6d2eba8a4b7721635ff7ebb5eb602957c8ebf57992321d13b" + }, + { + "fixture": "function_constant_interface.air.ll", + "entry": "fc_fragment_unobserved_input", + "source_sha256": "39087c31da0a65052f1c252df7bd6d395fed63f7153ea735993f1daa05bd6d53" + } + ], + "answers": [ + { + "key": { + "chip": "apple-m3-max", + "os_version": "27.0.1", + "os_build": "26A434", + "metal_level": "27.0.1" + }, + "provenance": "metal_run", + "device": "Apple M3 Max", + "runs": 3, + "outcomes": [ + { + "runs": 3, + "transcript": { + "root": { + "name": "case", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "inputs", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "air", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "5b11a08f3a82f7b6d2eba8a4b7721635ff7ebb5eb602957c8ebf57992321d13b" + } + } + }, + { + "name": "air-typed", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "39087c31da0a65052f1c252df7bd6d395fed63f7153ea735993f1daa05bd6d53" + } + } + }, + { + "name": "entry", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "ee61cb2292b428bdf2147b721bd01eaff6afd5e588ab858d21fc5a604d358b1e" + } + } + }, + { + "name": "constants", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + } + } + ] + }, + { + "name": "library", + "observed": { + "value": { + "variant": { + "name": "Ok", + "payload": "absent" + } + } + } + }, + { + "name": "facts", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "fc_fragment_unobserved_input" + ] + } + } + }, + { + "name": "function_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLFunctionTypeFragment" + ] + }, + "raw": { + "uint": 2 + } + } + } + } + }, + { + "name": "patch_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLPatchTypeNone" + ] + }, + "raw": { + "uint": 0 + } + } + } + } + }, + { + "name": "patch_control_point_count", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "options", + "observed": { + "value": { + "fields": { + "names": { + "set": [] + }, + "raw": { + "uint": 0 + } + } + } + } + }, + { + "name": "device", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "vertex_attributes", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "stage_input_attributes", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "function_constants", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "count", + "observed": { + "value": { + "uint": 1 + } + } + }, + { + "name": "constant/has_blend", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "data_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeBool" + ] + }, + "raw": { + "uint": 53 + } + } + } + } + }, + { + "name": "index", + "observed": { + "value": { + "uint": 4 + } + } + }, + { + "name": "required", + "observed": { + "value": { + "bool": false + } + } + } + ] + } + ] + } + ] + }, + { + "name": "notices", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "set", + "observed": { + "value": { + "nothing": "announced_nothing" + } + } + }, + { + "name": "counts", + "observed": { + "value": { + "fields": {} + } + } + } + ] + } + ] + } + } + } + ], + "validated": "ran" + } + ] +} diff --git a/crates/metal2vulkan-conformance/recordings/function-facts-patch-attributes.json b/crates/metal2vulkan-conformance/recordings/function-facts-patch-attributes.json new file mode 100644 index 000000000..d4aa353c4 --- /dev/null +++ b/crates/metal2vulkan-conformance/recordings/function-facts-patch-attributes.json @@ -0,0 +1,801 @@ +{ + "format": 1, + "case": "function-facts-patch-attributes", + "suite_version": 1, + "shaders": [ + { + "fixture": "tessellation.ll", + "entry": "tess_triangle_points", + "source_sha256": "6ef018757a5924dd35f70089f0509d0839023dba8dc1556741c0f63d1600bbfe" + }, + { + "fixture": "tessellation.air.ll", + "entry": "tess_triangle_points", + "source_sha256": "025dc6c6d4c08579a0929c9049c55f3c4926411f2f327527619ea13bf6674976" + } + ], + "answers": [ + { + "key": { + "chip": "apple-m3-max", + "os_version": "27.0.1", + "os_build": "26A434", + "metal_level": "27.0.1" + }, + "provenance": "metal_run", + "device": "Apple M3 Max", + "runs": 3, + "outcomes": [ + { + "runs": 3, + "transcript": { + "root": { + "name": "case", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "inputs", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "air", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "6ef018757a5924dd35f70089f0509d0839023dba8dc1556741c0f63d1600bbfe" + } + } + }, + { + "name": "air-typed", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "025dc6c6d4c08579a0929c9049c55f3c4926411f2f327527619ea13bf6674976" + } + } + }, + { + "name": "entry", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "6e6f5dbd875f4091661e4fa717d5cf6764fc50ffa071b5ab46d2020a92102cb6" + } + } + }, + { + "name": "constants", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + } + } + ] + }, + { + "name": "library", + "observed": { + "value": { + "variant": { + "name": "Ok", + "payload": "absent" + } + } + } + }, + { + "name": "facts", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "tess_triangle_points" + ] + } + } + }, + { + "name": "function_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLFunctionTypeVertex" + ] + }, + "raw": { + "uint": 1 + } + } + } + } + }, + { + "name": "patch_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLPatchTypeTriangle" + ] + }, + "raw": { + "uint": 1 + } + } + } + } + }, + { + "name": "patch_control_point_count", + "observed": { + "value": { + "variant": { + "name": "Some", + "payload": { + "uint": 3 + } + } + } + } + }, + { + "name": "options", + "observed": { + "value": { + "fields": { + "names": { + "set": [] + }, + "raw": { + "uint": 0 + } + } + } + } + }, + { + "name": "device", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "vertex_attributes", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "count", + "observed": { + "value": { + "uint": 4 + } + } + }, + { + "name": "attribute/0", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "position" + ] + } + } + }, + { + "name": "attribute_index", + "observed": { + "value": { + "uint": 0 + } + } + }, + { + "name": "attribute_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeFloat4" + ] + }, + "raw": { + "uint": 6 + } + } + } + } + }, + { + "name": "active", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_data", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "patch_control_point_data", + "observed": { + "value": { + "bool": true + } + } + } + ] + }, + { + "name": "attribute/1", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "uv" + ] + } + } + }, + { + "name": "attribute_index", + "observed": { + "value": { + "uint": 1 + } + } + }, + { + "name": "attribute_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeHalf2" + ] + }, + "raw": { + "uint": 17 + } + } + } + } + }, + { + "name": "active", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_data", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "patch_control_point_data", + "observed": { + "value": { + "bool": true + } + } + } + ] + }, + { + "name": "attribute/2", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "color" + ] + } + } + }, + { + "name": "attribute_index", + "observed": { + "value": { + "uint": 2 + } + } + }, + { + "name": "attribute_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeUChar4" + ] + }, + "raw": { + "uint": 52 + } + } + } + } + }, + { + "name": "active", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_data", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "patch_control_point_data", + "observed": { + "value": { + "bool": true + } + } + } + ] + }, + { + "name": "attribute/3", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "tint" + ] + } + } + }, + { + "name": "attribute_index", + "observed": { + "value": { + "uint": 5 + } + } + }, + { + "name": "attribute_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeFloat4" + ] + }, + "raw": { + "uint": 6 + } + } + } + } + }, + { + "name": "active", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_data", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_control_point_data", + "observed": { + "value": { + "bool": false + } + } + } + ] + } + ] + }, + { + "name": "stage_input_attributes", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "count", + "observed": { + "value": { + "uint": 4 + } + } + }, + { + "name": "attribute/0", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "position" + ] + } + } + }, + { + "name": "attribute_index", + "observed": { + "value": { + "uint": 0 + } + } + }, + { + "name": "attribute_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeFloat4" + ] + }, + "raw": { + "uint": 6 + } + } + } + } + }, + { + "name": "active", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_data", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "patch_control_point_data", + "observed": { + "value": { + "bool": true + } + } + } + ] + }, + { + "name": "attribute/1", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "uv" + ] + } + } + }, + { + "name": "attribute_index", + "observed": { + "value": { + "uint": 1 + } + } + }, + { + "name": "attribute_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeHalf2" + ] + }, + "raw": { + "uint": 17 + } + } + } + } + }, + { + "name": "active", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_data", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "patch_control_point_data", + "observed": { + "value": { + "bool": true + } + } + } + ] + }, + { + "name": "attribute/2", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "color" + ] + } + } + }, + { + "name": "attribute_index", + "observed": { + "value": { + "uint": 2 + } + } + }, + { + "name": "attribute_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeUChar4" + ] + }, + "raw": { + "uint": 52 + } + } + } + } + }, + { + "name": "active", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_data", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "patch_control_point_data", + "observed": { + "value": { + "bool": true + } + } + } + ] + }, + { + "name": "attribute/3", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "tint" + ] + } + } + }, + { + "name": "attribute_index", + "observed": { + "value": { + "uint": 5 + } + } + }, + { + "name": "attribute_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeFloat4" + ] + }, + "raw": { + "uint": 6 + } + } + } + } + }, + { + "name": "active", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_data", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_control_point_data", + "observed": { + "value": { + "bool": false + } + } + } + ] + } + ] + }, + { + "name": "function_constants", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "count", + "observed": { + "value": { + "uint": 0 + } + } + } + ] + } + ] + }, + { + "name": "notices", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "set", + "observed": { + "value": { + "nothing": "announced_nothing" + } + } + }, + { + "name": "counts", + "observed": { + "value": { + "fields": {} + } + } + } + ] + } + ] + } + } + } + ], + "validated": "ran" + } + ] +} diff --git a/crates/metal2vulkan-conformance/recordings/function-facts-specialized-by-index.json b/crates/metal2vulkan-conformance/recordings/function-facts-specialized-by-index.json new file mode 100644 index 000000000..882d8f65f --- /dev/null +++ b/crates/metal2vulkan-conformance/recordings/function-facts-specialized-by-index.json @@ -0,0 +1,531 @@ +{ + "format": 1, + "case": "function-facts-specialized-by-index", + "suite_version": 1, + "shaders": [ + { + "fixture": "function_constant_interface.ll", + "entry": "fc_vertex_input_to_output", + "source_sha256": "5b11a08f3a82f7b6d2eba8a4b7721635ff7ebb5eb602957c8ebf57992321d13b" + }, + { + "fixture": "function_constant_interface.air.ll", + "entry": "fc_vertex_input_to_output", + "source_sha256": "39087c31da0a65052f1c252df7bd6d395fed63f7153ea735993f1daa05bd6d53" + } + ], + "answers": [ + { + "key": { + "chip": "apple-m3-max", + "os_version": "27.0.1", + "os_build": "26A434", + "metal_level": "27.0.1" + }, + "provenance": "metal_run", + "device": "Apple M3 Max", + "runs": 3, + "outcomes": [ + { + "runs": 3, + "transcript": { + "root": { + "name": "case", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "inputs", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "air", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "5b11a08f3a82f7b6d2eba8a4b7721635ff7ebb5eb602957c8ebf57992321d13b" + } + } + }, + { + "name": "air-typed", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "39087c31da0a65052f1c252df7bd6d395fed63f7153ea735993f1daa05bd6d53" + } + } + }, + { + "name": "entry", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "95cf133f4e40bbafb8d63444a8cfdc8d70cebfbec29d7c5cce53e39009faed08" + } + } + }, + { + "name": "constants", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "e367a323589838ba3029cde6fee70a25cf0bdd3070c961ba8ba4d301cf7c45ca" + } + } + } + ] + }, + { + "name": "library", + "observed": { + "value": { + "variant": { + "name": "Ok", + "payload": "absent" + } + } + } + }, + { + "name": "facts", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "fc_vertex_input_to_output" + ] + } + } + }, + { + "name": "function_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLFunctionTypeVertex" + ] + }, + "raw": { + "uint": 1 + } + } + } + } + }, + { + "name": "patch_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLPatchTypeNone" + ] + }, + "raw": { + "uint": 0 + } + } + } + } + }, + { + "name": "patch_control_point_count", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "options", + "observed": { + "value": { + "fields": { + "names": { + "set": [] + }, + "raw": { + "uint": 0 + } + } + } + } + }, + { + "name": "device", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "vertex_attributes", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "count", + "observed": { + "value": { + "uint": 2 + } + } + }, + { + "name": "attribute/0", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "position" + ] + } + } + }, + { + "name": "attribute_index", + "observed": { + "value": { + "uint": 0 + } + } + }, + { + "name": "attribute_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeFloat4" + ] + }, + "raw": { + "uint": 6 + } + } + } + } + }, + { + "name": "active", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_data", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "patch_control_point_data", + "observed": { + "value": { + "bool": false + } + } + } + ] + }, + { + "name": "attribute/1", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "uv" + ] + } + } + }, + { + "name": "attribute_index", + "observed": { + "value": { + "uint": 1 + } + } + }, + { + "name": "attribute_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeFloat2" + ] + }, + "raw": { + "uint": 4 + } + } + } + } + }, + { + "name": "active", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_data", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "patch_control_point_data", + "observed": { + "value": { + "bool": false + } + } + } + ] + } + ] + }, + { + "name": "stage_input_attributes", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "count", + "observed": { + "value": { + "uint": 2 + } + } + }, + { + "name": "attribute/0", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "position" + ] + } + } + }, + { + "name": "attribute_index", + "observed": { + "value": { + "uint": 0 + } + } + }, + { + "name": "attribute_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeFloat4" + ] + }, + "raw": { + "uint": 6 + } + } + } + } + }, + { + "name": "active", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_data", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "patch_control_point_data", + "observed": { + "value": { + "bool": false + } + } + } + ] + }, + { + "name": "attribute/1", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "uv" + ] + } + } + }, + { + "name": "attribute_index", + "observed": { + "value": { + "uint": 1 + } + } + }, + { + "name": "attribute_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeFloat2" + ] + }, + "raw": { + "uint": 4 + } + } + } + } + }, + { + "name": "active", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_data", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "patch_control_point_data", + "observed": { + "value": { + "bool": false + } + } + } + ] + } + ] + }, + { + "name": "function_constants", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "count", + "observed": { + "value": { + "uint": 0 + } + } + } + ] + } + ] + }, + { + "name": "notices", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "set", + "observed": { + "value": { + "nothing": "announced_nothing" + } + } + }, + { + "name": "counts", + "observed": { + "value": { + "fields": {} + } + } + } + ] + } + ] + } + } + } + ], + "validated": "ran" + } + ] +} diff --git a/crates/metal2vulkan-conformance/recordings/function-facts-specialized-by-name.json b/crates/metal2vulkan-conformance/recordings/function-facts-specialized-by-name.json new file mode 100644 index 000000000..a8228bb9f --- /dev/null +++ b/crates/metal2vulkan-conformance/recordings/function-facts-specialized-by-name.json @@ -0,0 +1,531 @@ +{ + "format": 1, + "case": "function-facts-specialized-by-name", + "suite_version": 1, + "shaders": [ + { + "fixture": "function_constant_interface.ll", + "entry": "fc_vertex_input_to_output", + "source_sha256": "5b11a08f3a82f7b6d2eba8a4b7721635ff7ebb5eb602957c8ebf57992321d13b" + }, + { + "fixture": "function_constant_interface.air.ll", + "entry": "fc_vertex_input_to_output", + "source_sha256": "39087c31da0a65052f1c252df7bd6d395fed63f7153ea735993f1daa05bd6d53" + } + ], + "answers": [ + { + "key": { + "chip": "apple-m3-max", + "os_version": "27.0.1", + "os_build": "26A434", + "metal_level": "27.0.1" + }, + "provenance": "metal_run", + "device": "Apple M3 Max", + "runs": 3, + "outcomes": [ + { + "runs": 3, + "transcript": { + "root": { + "name": "case", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "inputs", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "air", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "5b11a08f3a82f7b6d2eba8a4b7721635ff7ebb5eb602957c8ebf57992321d13b" + } + } + }, + { + "name": "air-typed", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "39087c31da0a65052f1c252df7bd6d395fed63f7153ea735993f1daa05bd6d53" + } + } + }, + { + "name": "entry", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "95cf133f4e40bbafb8d63444a8cfdc8d70cebfbec29d7c5cce53e39009faed08" + } + } + }, + { + "name": "constants", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "6e301c963f0e4fb5f809d3f7c32207f61b63b151af4f8069baa9f30960c4e956" + } + } + } + ] + }, + { + "name": "library", + "observed": { + "value": { + "variant": { + "name": "Ok", + "payload": "absent" + } + } + } + }, + { + "name": "facts", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "fc_vertex_input_to_output" + ] + } + } + }, + { + "name": "function_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLFunctionTypeVertex" + ] + }, + "raw": { + "uint": 1 + } + } + } + } + }, + { + "name": "patch_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLPatchTypeNone" + ] + }, + "raw": { + "uint": 0 + } + } + } + } + }, + { + "name": "patch_control_point_count", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "options", + "observed": { + "value": { + "fields": { + "names": { + "set": [] + }, + "raw": { + "uint": 0 + } + } + } + } + }, + { + "name": "device", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "vertex_attributes", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "count", + "observed": { + "value": { + "uint": 2 + } + } + }, + { + "name": "attribute/0", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "position" + ] + } + } + }, + { + "name": "attribute_index", + "observed": { + "value": { + "uint": 0 + } + } + }, + { + "name": "attribute_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeFloat4" + ] + }, + "raw": { + "uint": 6 + } + } + } + } + }, + { + "name": "active", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_data", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "patch_control_point_data", + "observed": { + "value": { + "bool": false + } + } + } + ] + }, + { + "name": "attribute/1", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "uv" + ] + } + } + }, + { + "name": "attribute_index", + "observed": { + "value": { + "uint": 1 + } + } + }, + { + "name": "attribute_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeFloat2" + ] + }, + "raw": { + "uint": 4 + } + } + } + } + }, + { + "name": "active", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_data", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "patch_control_point_data", + "observed": { + "value": { + "bool": false + } + } + } + ] + } + ] + }, + { + "name": "stage_input_attributes", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "count", + "observed": { + "value": { + "uint": 2 + } + } + }, + { + "name": "attribute/0", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "position" + ] + } + } + }, + { + "name": "attribute_index", + "observed": { + "value": { + "uint": 0 + } + } + }, + { + "name": "attribute_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeFloat4" + ] + }, + "raw": { + "uint": 6 + } + } + } + } + }, + { + "name": "active", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_data", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "patch_control_point_data", + "observed": { + "value": { + "bool": false + } + } + } + ] + }, + { + "name": "attribute/1", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "uv" + ] + } + } + }, + { + "name": "attribute_index", + "observed": { + "value": { + "uint": 1 + } + } + }, + { + "name": "attribute_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeFloat2" + ] + }, + "raw": { + "uint": 4 + } + } + } + } + }, + { + "name": "active", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_data", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "patch_control_point_data", + "observed": { + "value": { + "bool": false + } + } + } + ] + } + ] + }, + { + "name": "function_constants", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "count", + "observed": { + "value": { + "uint": 0 + } + } + } + ] + } + ] + }, + { + "name": "notices", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "set", + "observed": { + "value": { + "nothing": "announced_nothing" + } + } + }, + { + "name": "counts", + "observed": { + "value": { + "fields": {} + } + } + } + ] + } + ] + } + } + } + ], + "validated": "ran" + } + ] +} diff --git a/crates/metal2vulkan-conformance/recordings/function-facts-specialized-by-range.json b/crates/metal2vulkan-conformance/recordings/function-facts-specialized-by-range.json new file mode 100644 index 000000000..c35997574 --- /dev/null +++ b/crates/metal2vulkan-conformance/recordings/function-facts-specialized-by-range.json @@ -0,0 +1,253 @@ +{ + "format": 1, + "case": "function-facts-specialized-by-range", + "suite_version": 1, + "shaders": [ + { + "fixture": "function_constant_interface.ll", + "entry": "fc_vertex_gated_outputs", + "source_sha256": "5b11a08f3a82f7b6d2eba8a4b7721635ff7ebb5eb602957c8ebf57992321d13b" + }, + { + "fixture": "function_constant_interface.air.ll", + "entry": "fc_vertex_gated_outputs", + "source_sha256": "39087c31da0a65052f1c252df7bd6d395fed63f7153ea735993f1daa05bd6d53" + } + ], + "answers": [ + { + "key": { + "chip": "apple-m3-max", + "os_version": "27.0.1", + "os_build": "26A434", + "metal_level": "27.0.1" + }, + "provenance": "metal_run", + "device": "Apple M3 Max", + "runs": 3, + "outcomes": [ + { + "runs": 3, + "transcript": { + "root": { + "name": "case", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "inputs", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "air", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "5b11a08f3a82f7b6d2eba8a4b7721635ff7ebb5eb602957c8ebf57992321d13b" + } + } + }, + { + "name": "air-typed", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "39087c31da0a65052f1c252df7bd6d395fed63f7153ea735993f1daa05bd6d53" + } + } + }, + { + "name": "entry", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "cb36e3879045165174ffb8557d53b10e81fbcbf7e7dd1f471a4854e88aecdccf" + } + } + }, + { + "name": "constants", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "c5c312c390aefeaf441aa6492bdc213cccf0ba81c49f09d16cf3781b73347789" + } + } + } + ] + }, + { + "name": "library", + "observed": { + "value": { + "variant": { + "name": "Ok", + "payload": "absent" + } + } + } + }, + { + "name": "facts", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "fc_vertex_gated_outputs" + ] + } + } + }, + { + "name": "function_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLFunctionTypeVertex" + ] + }, + "raw": { + "uint": 1 + } + } + } + } + }, + { + "name": "patch_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLPatchTypeNone" + ] + }, + "raw": { + "uint": 0 + } + } + } + } + }, + { + "name": "patch_control_point_count", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "options", + "observed": { + "value": { + "fields": { + "names": { + "set": [] + }, + "raw": { + "uint": 0 + } + } + } + } + }, + { + "name": "device", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "vertex_attributes", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "stage_input_attributes", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "function_constants", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "count", + "observed": { + "value": { + "uint": 0 + } + } + } + ] + } + ] + }, + { + "name": "notices", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "set", + "observed": { + "value": { + "nothing": "announced_nothing" + } + } + }, + { + "name": "counts", + "observed": { + "value": { + "fields": {} + } + } + } + ] + } + ] + } + } + } + ], + "validated": "ran" + } + ] +} diff --git a/crates/metal2vulkan-conformance/recordings/function-facts-stage-in-kernel.json b/crates/metal2vulkan-conformance/recordings/function-facts-stage-in-kernel.json new file mode 100644 index 000000000..fb49a1e15 --- /dev/null +++ b/crates/metal2vulkan-conformance/recordings/function-facts-stage-in-kernel.json @@ -0,0 +1,325 @@ +{ + "format": 1, + "case": "function-facts-stage-in-kernel", + "suite_version": 1, + "shaders": [ + { + "fixture": "ob3_stage_input.ll", + "entry": "ob3_stage_input", + "source_sha256": "23717599aaf05460d1d234e3271fbf73b6c15bbe1d72b1f76826c2d24b65ea42" + }, + { + "fixture": "ob3_stage_input.air.ll", + "entry": "ob3_stage_input", + "source_sha256": "f34ca28bef4308796debcbb10211162557791f03088ebe1b3d5185ad42e4b7ab" + } + ], + "answers": [ + { + "key": { + "chip": "apple-m3-max", + "os_version": "27.0.1", + "os_build": "26A434", + "metal_level": "27.0.1" + }, + "provenance": "metal_run", + "device": "Apple M3 Max", + "runs": 3, + "outcomes": [ + { + "runs": 3, + "transcript": { + "root": { + "name": "case", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "inputs", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "air", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "23717599aaf05460d1d234e3271fbf73b6c15bbe1d72b1f76826c2d24b65ea42" + } + } + }, + { + "name": "air-typed", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "f34ca28bef4308796debcbb10211162557791f03088ebe1b3d5185ad42e4b7ab" + } + } + }, + { + "name": "entry", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "dc667ec3f1d67d1f01ea093d17dde37cffccfe433ffc3783e2dd5c91b227de61" + } + } + }, + { + "name": "constants", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + } + } + ] + }, + { + "name": "library", + "observed": { + "value": { + "variant": { + "name": "Ok", + "payload": "absent" + } + } + } + }, + { + "name": "facts", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "ob3_stage_input" + ] + } + } + }, + { + "name": "function_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLFunctionTypeKernel" + ] + }, + "raw": { + "uint": 3 + } + } + } + } + }, + { + "name": "patch_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLPatchTypeNone" + ] + }, + "raw": { + "uint": 0 + } + } + } + } + }, + { + "name": "patch_control_point_count", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "options", + "observed": { + "value": { + "fields": { + "names": { + "set": [] + }, + "raw": { + "uint": 0 + } + } + } + } + }, + { + "name": "device", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "vertex_attributes", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "stage_input_attributes", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "count", + "observed": { + "value": { + "uint": 1 + } + } + }, + { + "name": "attribute/0", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "v" + ] + } + } + }, + { + "name": "attribute_index", + "observed": { + "value": { + "uint": 0 + } + } + }, + { + "name": "attribute_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeUInt" + ] + }, + "raw": { + "uint": 33 + } + } + } + } + }, + { + "name": "active", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_data", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "patch_control_point_data", + "observed": { + "value": { + "bool": false + } + } + } + ] + } + ] + }, + { + "name": "function_constants", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "count", + "observed": { + "value": { + "uint": 0 + } + } + } + ] + } + ] + }, + { + "name": "notices", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "set", + "observed": { + "value": { + "nothing": "announced_nothing" + } + } + }, + { + "name": "counts", + "observed": { + "value": { + "fields": {} + } + } + } + ] + } + ] + } + } + } + ], + "validated": "ran" + } + ] +} diff --git a/crates/metal2vulkan-conformance/recordings/function-facts-vertex-attributes.json b/crates/metal2vulkan-conformance/recordings/function-facts-vertex-attributes.json new file mode 100644 index 000000000..3ecafac4f --- /dev/null +++ b/crates/metal2vulkan-conformance/recordings/function-facts-vertex-attributes.json @@ -0,0 +1,397 @@ +{ + "format": 1, + "case": "function-facts-vertex-attributes", + "suite_version": 1, + "shaders": [ + { + "fixture": "ob3_vertex_input.ll", + "entry": "ob3_vertex_input", + "source_sha256": "0da28d3895817b16e37587755640357693835f37aff209a5d9317251a04a61bf" + }, + { + "fixture": "ob3_vertex_input.air.ll", + "entry": "ob3_vertex_input", + "source_sha256": "50f342eae6a89f6a6243cbc36918fd4e7409fd12fd0b702e188c887b96720ecb" + } + ], + "answers": [ + { + "key": { + "chip": "apple-m3-max", + "os_version": "27.0.1", + "os_build": "26A434", + "metal_level": "27.0.1" + }, + "provenance": "metal_run", + "device": "Apple M3 Max", + "runs": 3, + "outcomes": [ + { + "runs": 3, + "transcript": { + "root": { + "name": "case", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "inputs", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "air", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "0da28d3895817b16e37587755640357693835f37aff209a5d9317251a04a61bf" + } + } + }, + { + "name": "air-typed", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "50f342eae6a89f6a6243cbc36918fd4e7409fd12fd0b702e188c887b96720ecb" + } + } + }, + { + "name": "entry", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "fc33edf9ee3ad2b3aa9cd10cc098120053c3203adc682ecad021e028e2fdd828" + } + } + }, + { + "name": "constants", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + } + } + ] + }, + { + "name": "library", + "observed": { + "value": { + "variant": { + "name": "Ok", + "payload": "absent" + } + } + } + }, + { + "name": "facts", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "ob3_vertex_input" + ] + } + } + }, + { + "name": "function_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLFunctionTypeVertex" + ] + }, + "raw": { + "uint": 1 + } + } + } + } + }, + { + "name": "patch_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLPatchTypeNone" + ] + }, + "raw": { + "uint": 0 + } + } + } + } + }, + { + "name": "patch_control_point_count", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "options", + "observed": { + "value": { + "fields": { + "names": { + "set": [] + }, + "raw": { + "uint": 0 + } + } + } + } + }, + { + "name": "device", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "vertex_attributes", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "count", + "observed": { + "value": { + "uint": 1 + } + } + }, + { + "name": "attribute/0", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "v" + ] + } + } + }, + { + "name": "attribute_index", + "observed": { + "value": { + "uint": 0 + } + } + }, + { + "name": "attribute_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeUInt" + ] + }, + "raw": { + "uint": 33 + } + } + } + } + }, + { + "name": "active", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_data", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "patch_control_point_data", + "observed": { + "value": { + "bool": false + } + } + } + ] + } + ] + }, + { + "name": "stage_input_attributes", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "count", + "observed": { + "value": { + "uint": 1 + } + } + }, + { + "name": "attribute/0", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "v" + ] + } + } + }, + { + "name": "attribute_index", + "observed": { + "value": { + "uint": 0 + } + } + }, + { + "name": "attribute_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLDataTypeUInt" + ] + }, + "raw": { + "uint": 33 + } + } + } + } + }, + { + "name": "active", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "patch_data", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "patch_control_point_data", + "observed": { + "value": { + "bool": false + } + } + } + ] + } + ] + }, + { + "name": "function_constants", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "count", + "observed": { + "value": { + "uint": 0 + } + } + } + ] + } + ] + }, + { + "name": "notices", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "set", + "observed": { + "value": { + "nothing": "announced_nothing" + } + } + }, + { + "name": "counts", + "observed": { + "value": { + "fields": {} + } + } + } + ] + } + ] + } + } + } + ], + "validated": "ran" + } + ] +} diff --git a/crates/metal2vulkan-conformance/recordings/function-facts-vertex.json b/crates/metal2vulkan-conformance/recordings/function-facts-vertex.json new file mode 100644 index 000000000..8f8258345 --- /dev/null +++ b/crates/metal2vulkan-conformance/recordings/function-facts-vertex.json @@ -0,0 +1,253 @@ +{ + "format": 1, + "case": "function-facts-vertex", + "suite_version": 1, + "shaders": [ + { + "fixture": "rt6_resolves.ll", + "entry": "rt6_resolve_full", + "source_sha256": "826f30ea88e648ce64e04e26abdfaa51c2c81fdd933f41e0a5b621eb7c9d18e9" + }, + { + "fixture": "rt6_resolves.air.ll", + "entry": "rt6_resolve_full", + "source_sha256": "deacd509ddf64f7fe146057f3097edfb6582b0033fd623a9d2ec49db7596aec9" + } + ], + "answers": [ + { + "key": { + "chip": "apple-m3-max", + "os_version": "27.0.1", + "os_build": "26A434", + "metal_level": "27.0.1" + }, + "provenance": "metal_run", + "device": "Apple M3 Max", + "runs": 3, + "outcomes": [ + { + "runs": 3, + "transcript": { + "root": { + "name": "case", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "inputs", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "air", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "826f30ea88e648ce64e04e26abdfaa51c2c81fdd933f41e0a5b621eb7c9d18e9" + } + } + }, + { + "name": "air-typed", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "deacd509ddf64f7fe146057f3097edfb6582b0033fd623a9d2ec49db7596aec9" + } + } + }, + { + "name": "entry", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "2f95ba120953e8e58166d3ef848f9096363dfe22cbfe17836689e64a1a79b50e" + } + } + }, + { + "name": "constants", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + } + } + } + ] + }, + { + "name": "library", + "observed": { + "value": { + "variant": { + "name": "Ok", + "payload": "absent" + } + } + } + }, + { + "name": "facts", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "name", + "observed": { + "value": { + "lines": [ + "rt6_resolve_full" + ] + } + } + }, + { + "name": "function_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLFunctionTypeVertex" + ] + }, + "raw": { + "uint": 1 + } + } + } + } + }, + { + "name": "patch_type", + "observed": { + "value": { + "fields": { + "name": { + "lines": [ + "MTLPatchTypeNone" + ] + }, + "raw": { + "uint": 0 + } + } + } + } + }, + { + "name": "patch_control_point_count", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "options", + "observed": { + "value": { + "fields": { + "names": { + "set": [] + }, + "raw": { + "uint": 0 + } + } + } + } + }, + { + "name": "device", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "vertex_attributes", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "stage_input_attributes", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "function_constants", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "count", + "observed": { + "value": { + "uint": 0 + } + } + } + ] + } + ] + }, + { + "name": "notices", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "set", + "observed": { + "value": { + "nothing": "announced_nothing" + } + } + }, + { + "name": "counts", + "observed": { + "value": { + "fields": {} + } + } + } + ] + } + ] + } + } + } + ], + "validated": "ran" + } + ] +} diff --git a/crates/metal2vulkan-conformance/recordings/pipeline-facts-compute-described.json b/crates/metal2vulkan-conformance/recordings/pipeline-facts-compute-described.json new file mode 100644 index 000000000..80bfef131 --- /dev/null +++ b/crates/metal2vulkan-conformance/recordings/pipeline-facts-compute-described.json @@ -0,0 +1,213 @@ +{ + "format": 1, + "case": "pipeline-facts-compute-described", + "suite_version": 1, + "shaders": [ + { + "fixture": "a27_ob1_threadgroup.ll", + "entry": "ob1_threadgroup", + "source_sha256": "0c98a096e60fd50b4a119ac1539c8907a7ca14df5c4c0ea9163bae96240c1235" + }, + { + "fixture": "a27_ob1_threadgroup.air.ll", + "entry": "ob1_threadgroup", + "source_sha256": "6e2d8bc010bac734195035dcb2466f5947642236e3ec187537ef47b6ff23815e" + } + ], + "answers": [ + { + "key": { + "chip": "apple-m3-max", + "os_version": "27.0.1", + "os_build": "26A434", + "metal_level": "27.0.1" + }, + "provenance": "metal_run", + "device": "Apple M3 Max", + "runs": 3, + "outcomes": [ + { + "runs": 3, + "transcript": { + "root": { + "name": "case", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "inputs", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "air", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "0c98a096e60fd50b4a119ac1539c8907a7ca14df5c4c0ea9163bae96240c1235" + } + } + }, + { + "name": "air-typed", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "6e2d8bc010bac734195035dcb2466f5947642236e3ec187537ef47b6ff23815e" + } + } + }, + { + "name": "descriptor", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "b866df9dc1362027eef078d35bd963d9116cdd22bc08c88d1cfb3951aaad83a8" + } + } + }, + { + "name": "imageblock", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "b0853f6af25f29697838d03f243c9bf1bf6e861fdcb1ec7eb2c51e3446fe4e3f" + } + } + } + ] + }, + { + "name": "library", + "observed": { + "value": { + "variant": { + "name": "Ok", + "payload": "absent" + } + } + } + }, + { + "name": "state", + "observed": { + "value": { + "variant": { + "name": "Ok", + "payload": "absent" + } + } + } + }, + { + "name": "facts", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "label", + "observed": { + "value": { + "variant": { + "name": "Some", + "payload": { + "lines": [ + "conformance-compute-state" + ] + } + } + } + } + }, + { + "name": "device", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "static_threadgroup_memory_length", + "observed": { + "value": { + "uint": 0 + } + } + }, + { + "name": "support_indirect_command_buffers", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "imageblock_memory_length", + "observed": { + "value": { + "uint": 0 + } + } + }, + { + "name": "required_threads_per_threadgroup", + "observed": { + "value": { + "fields": { + "depth": { + "uint": 1 + }, + "height": { + "uint": 2 + }, + "width": { + "uint": 4 + } + } + } + } + } + ] + }, + { + "name": "notices", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "set", + "observed": { + "value": { + "nothing": "announced_nothing" + } + } + }, + { + "name": "counts", + "observed": { + "value": { + "fields": {} + } + } + } + ] + } + ] + } + } + } + ], + "validated": "ran" + } + ] +} diff --git a/crates/metal2vulkan-conformance/recordings/pipeline-facts-compute-imageblock.json b/crates/metal2vulkan-conformance/recordings/pipeline-facts-compute-imageblock.json new file mode 100644 index 000000000..a190f8d9e --- /dev/null +++ b/crates/metal2vulkan-conformance/recordings/pipeline-facts-compute-imageblock.json @@ -0,0 +1,213 @@ +{ + "format": 1, + "case": "pipeline-facts-compute-imageblock", + "suite_version": 1, + "shaders": [ + { + "fixture": "a4_imageblock_extent.ll", + "entry": "a4_imageblock_extent", + "source_sha256": "3fcc4207683f034a6804df88e121bfbe1db99610b2301b1042f9e3b3a631c1a2" + }, + { + "fixture": "a4_imageblock_extent.air.ll", + "entry": "a4_imageblock_extent", + "source_sha256": "155c77190cf60e4b001104fbe169e8dd1c74fd800cb7806ece9da9d086e30f1f" + } + ], + "answers": [ + { + "key": { + "chip": "apple-m3-max", + "os_version": "27.0.1", + "os_build": "26A434", + "metal_level": "27.0.1" + }, + "provenance": "metal_run", + "device": "Apple M3 Max", + "runs": 3, + "outcomes": [ + { + "runs": 3, + "transcript": { + "root": { + "name": "case", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "inputs", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "air", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "3fcc4207683f034a6804df88e121bfbe1db99610b2301b1042f9e3b3a631c1a2" + } + } + }, + { + "name": "air-typed", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "155c77190cf60e4b001104fbe169e8dd1c74fd800cb7806ece9da9d086e30f1f" + } + } + }, + { + "name": "descriptor", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "c1b4ab1e5d2d67468d6d5b77ce8e50d987e454c5a13691cac437237e56d010d9" + } + } + }, + { + "name": "imageblock", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "b0853f6af25f29697838d03f243c9bf1bf6e861fdcb1ec7eb2c51e3446fe4e3f" + } + } + } + ] + }, + { + "name": "library", + "observed": { + "value": { + "variant": { + "name": "Ok", + "payload": "absent" + } + } + } + }, + { + "name": "state", + "observed": { + "value": { + "variant": { + "name": "Ok", + "payload": "absent" + } + } + } + }, + { + "name": "facts", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "label", + "observed": { + "value": { + "variant": { + "name": "Some", + "payload": { + "lines": [ + "conformance-imageblock-state" + ] + } + } + } + } + }, + { + "name": "device", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "static_threadgroup_memory_length", + "observed": { + "value": { + "uint": 0 + } + } + }, + { + "name": "support_indirect_command_buffers", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "imageblock_memory_length", + "observed": { + "value": { + "uint": 256 + } + } + }, + { + "name": "required_threads_per_threadgroup", + "observed": { + "value": { + "fields": { + "depth": { + "uint": 0 + }, + "height": { + "uint": 0 + }, + "width": { + "uint": 0 + } + } + } + } + } + ] + }, + { + "name": "notices", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "set", + "observed": { + "value": { + "nothing": "announced_nothing" + } + } + }, + { + "name": "counts", + "observed": { + "value": { + "fields": {} + } + } + } + ] + } + ] + } + } + } + ], + "validated": "ran" + } + ] +} diff --git a/crates/metal2vulkan-conformance/recordings/pipeline-facts-compute-plain.json b/crates/metal2vulkan-conformance/recordings/pipeline-facts-compute-plain.json new file mode 100644 index 000000000..9652d280d --- /dev/null +++ b/crates/metal2vulkan-conformance/recordings/pipeline-facts-compute-plain.json @@ -0,0 +1,209 @@ +{ + "format": 1, + "case": "pipeline-facts-compute-plain", + "suite_version": 1, + "shaders": [ + { + "fixture": "a27_ob1_threadgroup.ll", + "entry": "ob1_threadgroup", + "source_sha256": "0c98a096e60fd50b4a119ac1539c8907a7ca14df5c4c0ea9163bae96240c1235" + }, + { + "fixture": "a27_ob1_threadgroup.air.ll", + "entry": "ob1_threadgroup", + "source_sha256": "6e2d8bc010bac734195035dcb2466f5947642236e3ec187537ef47b6ff23815e" + } + ], + "answers": [ + { + "key": { + "chip": "apple-m3-max", + "os_version": "27.0.1", + "os_build": "26A434", + "metal_level": "27.0.1" + }, + "provenance": "metal_run", + "device": "Apple M3 Max", + "runs": 3, + "outcomes": [ + { + "runs": 3, + "transcript": { + "root": { + "name": "case", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "inputs", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "air", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "0c98a096e60fd50b4a119ac1539c8907a7ca14df5c4c0ea9163bae96240c1235" + } + } + }, + { + "name": "air-typed", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "6e2d8bc010bac734195035dcb2466f5947642236e3ec187537ef47b6ff23815e" + } + } + }, + { + "name": "descriptor", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "4385784c97b9f4fb666c8937a730ae893d379241687f79f10886b83d5baf8f0b" + } + } + }, + { + "name": "imageblock", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "b0853f6af25f29697838d03f243c9bf1bf6e861fdcb1ec7eb2c51e3446fe4e3f" + } + } + } + ] + }, + { + "name": "library", + "observed": { + "value": { + "variant": { + "name": "Ok", + "payload": "absent" + } + } + } + }, + { + "name": "state", + "observed": { + "value": { + "variant": { + "name": "Ok", + "payload": "absent" + } + } + } + }, + { + "name": "facts", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "label", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "device", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "static_threadgroup_memory_length", + "observed": { + "value": { + "uint": 0 + } + } + }, + { + "name": "support_indirect_command_buffers", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "imageblock_memory_length", + "observed": { + "value": { + "uint": 0 + } + } + }, + { + "name": "required_threads_per_threadgroup", + "observed": { + "value": { + "fields": { + "depth": { + "uint": 0 + }, + "height": { + "uint": 0 + }, + "width": { + "uint": 0 + } + } + } + } + } + ] + }, + { + "name": "notices", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "set", + "observed": { + "value": { + "nothing": "announced_nothing" + } + } + }, + { + "name": "counts", + "observed": { + "value": { + "fields": {} + } + } + } + ] + } + ] + } + } + } + ], + "validated": "ran" + } + ] +} diff --git a/crates/metal2vulkan-conformance/recordings/pipeline-facts-render-multisampled.json b/crates/metal2vulkan-conformance/recordings/pipeline-facts-render-multisampled.json new file mode 100644 index 000000000..2345ace4e --- /dev/null +++ b/crates/metal2vulkan-conformance/recordings/pipeline-facts-render-multisampled.json @@ -0,0 +1,239 @@ +{ + "format": 1, + "case": "pipeline-facts-render-multisampled", + "suite_version": 1, + "shaders": [ + { + "fixture": "rt6_resolves.ll", + "entry": "rt6_resolve_full", + "source_sha256": "826f30ea88e648ce64e04e26abdfaa51c2c81fdd933f41e0a5b621eb7c9d18e9" + }, + { + "fixture": "rt6_resolves.air.ll", + "entry": "rt6_resolve_full", + "source_sha256": "deacd509ddf64f7fe146057f3097edfb6582b0033fd623a9d2ec49db7596aec9" + } + ], + "answers": [ + { + "key": { + "chip": "apple-m3-max", + "os_version": "27.0.1", + "os_build": "26A434", + "metal_level": "27.0.1" + }, + "provenance": "metal_run", + "device": "Apple M3 Max", + "runs": 3, + "outcomes": [ + { + "runs": 3, + "transcript": { + "root": { + "name": "case", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "inputs", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "air", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "826f30ea88e648ce64e04e26abdfaa51c2c81fdd933f41e0a5b621eb7c9d18e9" + } + } + }, + { + "name": "air-typed", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "deacd509ddf64f7fe146057f3097edfb6582b0033fd623a9d2ec49db7596aec9" + } + } + }, + { + "name": "descriptor", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "737450ae02dde064bb54d08049b79f9f2600318273eddb6f27571e312e10a5a3" + } + } + }, + { + "name": "imageblock", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "b0853f6af25f29697838d03f243c9bf1bf6e861fdcb1ec7eb2c51e3446fe4e3f" + } + } + } + ] + }, + { + "name": "library", + "observed": { + "value": { + "variant": { + "name": "Ok", + "payload": "absent" + } + } + } + }, + { + "name": "state", + "observed": { + "value": { + "variant": { + "name": "Ok", + "payload": "absent" + } + } + } + }, + { + "name": "facts", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "label", + "observed": { + "value": { + "variant": { + "name": "Some", + "payload": { + "lines": [ + "conformance-render-state" + ] + } + } + } + } + }, + { + "name": "device", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "max_total_threads_per_threadgroup", + "observed": { + "value": { + "uint": 0 + } + } + }, + { + "name": "threadgroup_size_matches_tile_size", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "imageblock_sample_length", + "observed": { + "value": { + "variant": { + "name": "Some", + "payload": { + "uint": 12 + } + } + } + } + }, + { + "name": "imageblock_memory_length", + "observed": { + "value": { + "variant": { + "name": "Some", + "payload": { + "uint": 1536 + } + } + } + } + }, + { + "name": "support_indirect_command_buffers", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "required_threads_per_tile_threadgroup", + "observed": { + "value": { + "fields": { + "depth": { + "uint": 0 + }, + "height": { + "uint": 0 + }, + "width": { + "uint": 0 + } + } + } + } + } + ] + }, + { + "name": "notices", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "set", + "observed": { + "value": { + "nothing": "announced_nothing" + } + } + }, + { + "name": "counts", + "observed": { + "value": { + "fields": {} + } + } + } + ] + } + ] + } + } + } + ], + "validated": "ran" + } + ] +} diff --git a/crates/metal2vulkan-conformance/recordings/pipeline-facts-render-plain.json b/crates/metal2vulkan-conformance/recordings/pipeline-facts-render-plain.json new file mode 100644 index 000000000..f27d2ea4d --- /dev/null +++ b/crates/metal2vulkan-conformance/recordings/pipeline-facts-render-plain.json @@ -0,0 +1,235 @@ +{ + "format": 1, + "case": "pipeline-facts-render-plain", + "suite_version": 1, + "shaders": [ + { + "fixture": "rt6_resolves.ll", + "entry": "rt6_resolve_full", + "source_sha256": "826f30ea88e648ce64e04e26abdfaa51c2c81fdd933f41e0a5b621eb7c9d18e9" + }, + { + "fixture": "rt6_resolves.air.ll", + "entry": "rt6_resolve_full", + "source_sha256": "deacd509ddf64f7fe146057f3097edfb6582b0033fd623a9d2ec49db7596aec9" + } + ], + "answers": [ + { + "key": { + "chip": "apple-m3-max", + "os_version": "27.0.1", + "os_build": "26A434", + "metal_level": "27.0.1" + }, + "provenance": "metal_run", + "device": "Apple M3 Max", + "runs": 3, + "outcomes": [ + { + "runs": 3, + "transcript": { + "root": { + "name": "case", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "inputs", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "air", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "826f30ea88e648ce64e04e26abdfaa51c2c81fdd933f41e0a5b621eb7c9d18e9" + } + } + }, + { + "name": "air-typed", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "deacd509ddf64f7fe146057f3097edfb6582b0033fd623a9d2ec49db7596aec9" + } + } + }, + { + "name": "descriptor", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "58592c3b8077d36603a7e66fb9eae1d64abe504f0430d35c8f848297f81abb7d" + } + } + }, + { + "name": "imageblock", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "b0853f6af25f29697838d03f243c9bf1bf6e861fdcb1ec7eb2c51e3446fe4e3f" + } + } + } + ] + }, + { + "name": "library", + "observed": { + "value": { + "variant": { + "name": "Ok", + "payload": "absent" + } + } + } + }, + { + "name": "state", + "observed": { + "value": { + "variant": { + "name": "Ok", + "payload": "absent" + } + } + } + }, + { + "name": "facts", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "label", + "observed": { + "value": { + "variant": { + "name": "None", + "payload": "absent" + } + } + } + }, + { + "name": "device", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "max_total_threads_per_threadgroup", + "observed": { + "value": { + "uint": 0 + } + } + }, + { + "name": "threadgroup_size_matches_tile_size", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "imageblock_sample_length", + "observed": { + "value": { + "variant": { + "name": "Some", + "payload": { + "uint": 4 + } + } + } + } + }, + { + "name": "imageblock_memory_length", + "observed": { + "value": { + "variant": { + "name": "Some", + "payload": { + "uint": 128 + } + } + } + } + }, + { + "name": "support_indirect_command_buffers", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "required_threads_per_tile_threadgroup", + "observed": { + "value": { + "fields": { + "depth": { + "uint": 0 + }, + "height": { + "uint": 0 + }, + "width": { + "uint": 0 + } + } + } + } + } + ] + }, + { + "name": "notices", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "set", + "observed": { + "value": { + "nothing": "announced_nothing" + } + } + }, + { + "name": "counts", + "observed": { + "value": { + "fields": {} + } + } + } + ] + } + ] + } + } + } + ], + "validated": "ran" + } + ] +} diff --git a/crates/metal2vulkan-conformance/recordings/pipeline-facts-render-two-attachments.json b/crates/metal2vulkan-conformance/recordings/pipeline-facts-render-two-attachments.json new file mode 100644 index 000000000..31af49fca --- /dev/null +++ b/crates/metal2vulkan-conformance/recordings/pipeline-facts-render-two-attachments.json @@ -0,0 +1,239 @@ +{ + "format": 1, + "case": "pipeline-facts-render-two-attachments", + "suite_version": 1, + "shaders": [ + { + "fixture": "rt6_resolves.ll", + "entry": "rt6_resolve_full", + "source_sha256": "826f30ea88e648ce64e04e26abdfaa51c2c81fdd933f41e0a5b621eb7c9d18e9" + }, + { + "fixture": "rt6_resolves.air.ll", + "entry": "rt6_resolve_full", + "source_sha256": "deacd509ddf64f7fe146057f3097edfb6582b0033fd623a9d2ec49db7596aec9" + } + ], + "answers": [ + { + "key": { + "chip": "apple-m3-max", + "os_version": "27.0.1", + "os_build": "26A434", + "metal_level": "27.0.1" + }, + "provenance": "metal_run", + "device": "Apple M3 Max", + "runs": 3, + "outcomes": [ + { + "runs": 3, + "transcript": { + "root": { + "name": "case", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "inputs", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "air", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "826f30ea88e648ce64e04e26abdfaa51c2c81fdd933f41e0a5b621eb7c9d18e9" + } + } + }, + { + "name": "air-typed", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "deacd509ddf64f7fe146057f3097edfb6582b0033fd623a9d2ec49db7596aec9" + } + } + }, + { + "name": "descriptor", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "7418ab002a23515f74976b4e58c7cd75a57977a82575a3f638448e2f5c50086e" + } + } + }, + { + "name": "imageblock", + "observed": { + "value": "absent", + "digest": { + "kind": "sha256", + "hex": "b0853f6af25f29697838d03f243c9bf1bf6e861fdcb1ec7eb2c51e3446fe4e3f" + } + } + } + ] + }, + { + "name": "library", + "observed": { + "value": { + "variant": { + "name": "Ok", + "payload": "absent" + } + } + } + }, + { + "name": "state", + "observed": { + "value": { + "variant": { + "name": "Ok", + "payload": "absent" + } + } + } + }, + { + "name": "facts", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "label", + "observed": { + "value": { + "variant": { + "name": "Some", + "payload": { + "lines": [ + "conformance-render-state" + ] + } + } + } + } + }, + { + "name": "device", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "max_total_threads_per_threadgroup", + "observed": { + "value": { + "uint": 0 + } + } + }, + { + "name": "threadgroup_size_matches_tile_size", + "observed": { + "value": { + "bool": false + } + } + }, + { + "name": "imageblock_sample_length", + "observed": { + "value": { + "variant": { + "name": "Some", + "payload": { + "uint": 12 + } + } + } + } + }, + { + "name": "imageblock_memory_length", + "observed": { + "value": { + "variant": { + "name": "Some", + "payload": { + "uint": 384 + } + } + } + } + }, + { + "name": "support_indirect_command_buffers", + "observed": { + "value": { + "bool": true + } + } + }, + { + "name": "required_threads_per_tile_threadgroup", + "observed": { + "value": { + "fields": { + "depth": { + "uint": 0 + }, + "height": { + "uint": 0 + }, + "width": { + "uint": 0 + } + } + } + } + } + ] + }, + { + "name": "notices", + "observed": { + "value": "absent" + }, + "children": [ + { + "name": "set", + "observed": { + "value": { + "nothing": "announced_nothing" + } + } + }, + { + "name": "counts", + "observed": { + "value": { + "fields": {} + } + } + } + ] + } + ] + } + } + } + ], + "validated": "ran" + } + ] +} diff --git a/crates/metal2vulkan-conformance/src/case.rs b/crates/metal2vulkan-conformance/src/case.rs index 550eda9cb..909c4e267 100644 --- a/crates/metal2vulkan-conformance/src/case.rs +++ b/crates/metal2vulkan-conformance/src/case.rs @@ -750,6 +750,78 @@ pub trait Side { Err(Failure::unavailable("compute_pipeline_bindings")) } + /// `newComputePipelineStateWithDescriptor:options:reflection:error:` of the descriptor + /// `spec` describes whole ([`ComputeStateSpec`](crate::pipeline_facts::ComputeStateSpec)). + /// + /// The state joins the same handle space as [`Side::compute_pipeline`]: one Metal object kind + /// made from a function or from a descriptor. + fn compute_pipeline_with_descriptor( + &mut self, + library: Handle, + spec: &crate::pipeline_facts::ComputeStateSpec<'_>, + ) -> Answer { + let _ = (library, spec); + Err(Failure::unavailable("compute_pipeline_with_descriptor")) + } + + /// What a compute pipeline state answers of itself + /// ([`ComputeStateFacts`](crate::pipeline_facts::ComputeStateFacts)), with + /// `imageblockMemoryLengthForDimensions:` asked for `imageblock`. + /// + /// The dimensions are the case's own rather than fixed, because the answer is a function of + /// them: a case states the extent whose length it means. + fn compute_pipeline_facts( + &mut self, + state: Handle, + imageblock: [u32; 3], + ) -> Answer { + let _ = (state, imageblock); + Err(Failure::unavailable("compute_pipeline_facts")) + } + + /// What a render pipeline state answers of itself + /// ([`RenderStateFacts`](crate::pipeline_facts::RenderStateFacts)), with + /// `imageblockMemoryLengthForDimensions:` asked for `imageblock`. + /// + /// [`Side::tile_facts`] is three of these getters read off a **tile** state, which is the + /// other descriptor the same Metal object is made from. This is the drawing state's whole + /// portable surface, and the two are kept apart because what each answers is decided by which + /// descriptor made it. + fn render_pipeline_facts( + &mut self, + state: Handle, + imageblock: [u32; 3], + ) -> Answer { + let _ = (state, imageblock); + Err(Failure::unavailable("render_pipeline_facts")) + } + + /// `newFunctionWithName:` of `entry`, or `newFunctionWithName:constantValues:error:` where + /// `constants` holds a value, and what the function then answers about **itself** + /// ([`crate::function_facts::FunctionFacts`]). + /// + /// One call, because what it observes is a **tree** whose shape one getter decides: which of + /// `vertexAttributes` and `stageInputAttributes` answers an array at all is a fact about the + /// function type, and each element is an object with six getters of its own. A case cannot + /// state that as independent calls. + /// + /// The function is made and read inside the call rather than kept in a pool of its own: every + /// fact here is the function's, no case holds one past reading it, and the two sides then need + /// no handle space for an object whose identity nothing compares. + /// + /// `constants` is the whole of `MTLFunctionConstantValues`' own surface, as three setters + /// ([`ConstantAt`](crate::function_facts::ConstantAt)). A side whose constant values have no + /// range form expands the range into one value an index, which is what the range setter means. + fn function_facts( + &mut self, + library: Handle, + entry: &str, + constants: &[crate::function_facts::ConstantValue], + ) -> Answer { + let _ = (library, entry, constants); + Err(Failure::unavailable("function_facts")) + } + /// Where `constantDataAtIndex:` of `index` points, as a byte offset inside the encoder's /// arguments. /// diff --git a/crates/metal2vulkan-conformance/src/cases.rs b/crates/metal2vulkan-conformance/src/cases.rs index 1094884ad..3b8170eb3 100644 --- a/crates/metal2vulkan-conformance/src/cases.rs +++ b/crates/metal2vulkan-conformance/src/cases.rs @@ -77,6 +77,7 @@ pub mod format_copies; pub mod frame_chains; pub mod fresh_contents; pub mod function_bindings; +pub mod function_facts; pub mod half_output_blends; pub mod half_read_nans; pub mod half_storage_writes; @@ -94,6 +95,7 @@ pub mod mesh_draws; pub mod nearest_positions; pub mod norm_storage_writes; pub mod pass_bytes; +pub mod pipeline_facts; pub mod pixel_downscales; pub mod pixel_samplers; pub mod pvrtc_cpu_order; @@ -159,6 +161,12 @@ pub fn all() -> Vec> { for case in function_bindings::all() { cases.push(Box::new(case)); } + for case in function_facts::all() { + cases.push(Box::new(case)); + } + for case in pipeline_facts::all() { + cases.push(Box::new(case)); + } for case in compressed_blits::all() { cases.push(Box::new(case)); } diff --git a/crates/metal2vulkan-conformance/src/cases/function_facts.rs b/crates/metal2vulkan-conformance/src/cases/function_facts.rs new file mode 100644 index 000000000..49ffed8ae --- /dev/null +++ b/crates/metal2vulkan-conformance/src/cases/function_facts.rs @@ -0,0 +1,287 @@ +//! What a function says about **itself**: `MTLFunction`'s own getters, and the attributes and +//! function constants two of them answer with. +//! +//! [`crate::cases::function_bindings`] compares what a function's reflection says its arguments +//! are. This is the other side of the same object, and four containers the suite reached almost +//! nowhere: `MTLFunction` at one item of twelve — the argument encoder a function makes — and +//! `MTLAttribute`, `MTLVertexAttribute` and `MTLFunctionConstant` at none of theirs. +//! +//! The facts are not decoration. `functionType` is what Metal refuses a mismatched pipeline +//! descriptor on; `patchType` and `patchControlPointCount` are what a tessellated draw's control +//! points are grouped by; the stage-input attributes are the contract a vertex descriptor is +//! written against; and a function constant's `index` and `required` are what a specialization has +//! to supply. Our side answers every one of them from the AIR, by rules +//! [`metal2vulkan::reflection::FunctionProperties`] states were measured on an Apple M4 over the +//! validation crate's reflection fixtures. This family is what holds those rules to Metal on the +//! oracle, case by case, through the same recording path as every other case. +//! +//! **One flag has one value throughout, and that is a hole rather than coverage.** `isActive` +//! reads true for every attribute of every case here, the control-point field no instruction of +//! `tess_triangle_points` reads included (measured on the oracle while recording). So these cases +//! compare the getter and pin nothing about when it is false; the case that would needs a fixture +//! whose stage input holds an attribute Metal reports inactive, and nobody has one. +//! +//! # The shapes, and why each is here +//! +//! A function's two attribute lists and its constants dictionary answer differently for each kind +//! of entry point, so one case cannot say much. Between them these do: +//! +//! - **a kernel with nothing** (`ob1_threadgroup`): both lists nil, no constant, the floor every +//! other case is read against; +//! - **a vertex and a fragment function without a stage input** (`rt6_resolve_full`, +//! `rt6_resolve_white`): the two function types a pipeline pairs, both answering nil; +//! - **a vertex function with a stage input** (`ob3_vertex_input`): the one shape where +//! `vertexAttributes` **and** `stageInputAttributes` both answer, which is how +//! `MTLVertexAttribute` is reached at all; +//! - **a kernel with a stage input** (`ob3_stage_input`): `stageInputAttributes` alone, which is +//! the fact that `vertexAttributes` is a vertex function's and not every function's; +//! - **a post-tessellation vertex function** (`tess_triangle_points`): a triangle patch of three +//! control points, whose attributes are three control-point fields of three different data types +//! and one per-patch input at index 5. The only shape that reaches `patchType`, +//! `patchControlPointCount`, `isPatchData` and `isPatchControlPointData` with anything but their +//! defaults, and the only one where the two flags disagree between two attributes of one +//! function; +//! - **two constants a function reads** (`fc_vertex_gated_outputs`): `MTLFunctionConstant`'s four +//! facts, at two indices; +//! - **a constant asked about rather than read** (`fc_fragment_unobserved_input`): `required` is +//! false exactly there, so the flag is a question with two answers in this family rather than a +//! field that reads true everywhere; +//! - **a gated attribute, unspecialized and specialized** (`fc_vertex_input_to_output`): the +//! constant is in the dictionary without a value and the dictionary is **empty** once a value is +//! supplied, which is what Metal answers for a specialized function. Measured on the oracle +//! while recording: the gated attribute is in both attribute lists either way, so what the pair +//! pins is the dictionary rather than the attribute — a gate turned on does not add an +//! attribute Metal was already listing. +//! +//! # `MTLFunctionConstantValues`, all three setters +//! +//! The specializing cases reach that class's whole surface, one case a setter, because a value +//! that arrives by name and a value that arrives by index are two Metal calls and the suite had +//! neither: `setConstantValue:type:atIndex:`, `setConstantValue:type:withName:` and +//! `setConstantValues:type:withRange:`. Each case sets the **same** constant through its own +//! setter over the same function, so the three answers are directly comparable and a setter wired +//! to the wrong index shows up as a different attribute list rather than as nothing. +//! +//! # Why this family is safe +//! +//! Each case makes one library and one function and reads its getters. Nothing is compiled into a +//! pipeline, nothing is allocated for the device, no command buffer is made and nothing is +//! dispatched, so no case here can fault the device or trip its watchdog. +//! +//! # Exactness +//! +//! Every field is a number, an enumeration, a name or a bool, and the family declares no +//! tolerance and announces nothing: no case touches a texture, a sampler or a float. An +//! enumeration is recorded as its Metal enumerator name beside its ordinal, so a difference reads +//! `MTLDataTypeFloat4` against `MTLDataTypeHalf2` rather than 6 against 54. + +use crate::case::{Abort, Case, Failure, Input, MetalSource, Side}; +use crate::fixture::{Fixture, METAL_TEXT, RUNTIME_TEXT}; +use crate::function_facts::ConstantValue; +use crate::recording::ShaderRef; +use crate::transcript::{Digest, Node, Observed, Sites}; + +/// The site the library's make sits at. +const LIBRARY: &str = "library"; + +/// The site the function's own answers sit at. +const FACTS: &str = "facts"; + +/// A case over one function's own facts. +pub struct FunctionFactsCase { + name: &'static str, + /// The fixture and the entry point whose getters the case reads. + fixture: &'static str, + entry: &'static str, + /// The constant values the function is made with; empty makes it by name alone. + constants: fn() -> Vec, +} + +/// No constant value: `newFunctionWithName:`. +fn plain() -> Vec { + Vec::new() +} + +/// Every case of the family. +pub fn all() -> Vec { + vec![ + // The floor: a kernel with no stage input and no constant. Both attribute lists are nil + // and the dictionary is empty, which is what every other case's answer is read against. + FunctionFactsCase { + name: "function-facts-kernel", + fixture: "a27_ob1_threadgroup", + entry: "ob1_threadgroup", + constants: plain, + }, + // A vertex function that computes its own position from `[[vertex_id]]`: the function type + // a pipeline's vertex stage takes, with nothing to fetch. + FunctionFactsCase { + name: "function-facts-vertex", + fixture: "rt6_resolves", + entry: "rt6_resolve_full", + constants: plain, + }, + // A fragment function, which is the other half of that pipeline and answers nil for both + // lists however its vertex stage answers. + FunctionFactsCase { + name: "function-facts-fragment", + fixture: "rt6_resolves", + entry: "rt6_resolve_white", + constants: plain, + }, + // A vertex function with one `[[stage_in]]` attribute: the one shape where both lists + // answer, and so the only way to `MTLVertexAttribute`'s own getters. + FunctionFactsCase { + name: "function-facts-vertex-attributes", + fixture: "ob3_vertex_input", + entry: "ob3_vertex_input", + constants: plain, + }, + // A kernel with one `[[stage_in]]` attribute: `stageInputAttributes` answers and + // `vertexAttributes` is nil, which is the fact that the one is a vertex function's. + FunctionFactsCase { + name: "function-facts-stage-in-kernel", + fixture: "ob3_stage_input", + entry: "ob3_stage_input", + constants: plain, + }, + // A post-tessellation vertex function of a triangle patch of three control points: three + // control-point fields of three different data types, one of them read by no instruction, + // and one per-patch attribute at index 5. + FunctionFactsCase { + name: "function-facts-patch-attributes", + fixture: "tessellation", + entry: "tess_triangle_points", + constants: plain, + }, + // Two function constants the vertex function reads, at two indices: `MTLFunctionConstant` + // stating a name, a type, an index and `required`. + FunctionFactsCase { + name: "function-facts-constants", + fixture: "function_constant_interface", + entry: "fc_vertex_gated_outputs", + constants: plain, + }, + // A constant the function asks `is_function_constant_defined` about rather than reads, + // which is the one shape whose `required` is false. + FunctionFactsCase { + name: "function-facts-optional-constant", + fixture: "function_constant_interface", + entry: "fc_fragment_unobserved_input", + constants: plain, + }, + // A gated attribute with no value supplied: the attribute leaves both lists and the + // constant that gates it is in the dictionary. + FunctionFactsCase { + name: "function-facts-gated-attribute", + fixture: "function_constant_interface", + entry: "fc_vertex_input_to_output", + constants: plain, + }, + // The same function specialized through `setConstantValue:type:atIndex:`: the gated + // attribute is present and the dictionary is empty, as Metal answers for a specialized + // function. + FunctionFactsCase { + name: "function-facts-specialized-by-index", + fixture: "function_constant_interface", + entry: "fc_vertex_input_to_output", + // `has_uv` is `[[function_constant(5)]]`, which gates the `uv` attribute at index 1. + constants: || vec![ConstantValue::bool_at(5, true)], + }, + // The same constant of the same function through `setConstantValue:type:withName:`, so + // the by-name setter's answer is directly comparable with the by-index one's. + FunctionFactsCase { + name: "function-facts-specialized-by-name", + fixture: "function_constant_interface", + entry: "fc_vertex_input_to_output", + constants: || vec![ConstantValue::bool_named("has_uv", true)], + }, + // `setConstantValues:type:withRange:` over the two constants of the gated-output vertex + // function, which is the one setter that supplies several at once: both gated outputs are + // turned on by one call. + FunctionFactsCase { + name: "function-facts-specialized-by-range", + fixture: "function_constant_interface", + entry: "fc_vertex_gated_outputs", + constants: || vec![ConstantValue::bools_from(0, &[true, true])], + }, + ] +} + +impl FunctionFactsCase { + fn loaded(&self) -> Fixture { + Fixture { + name: self.fixture, + entry: self.entry, + } + } +} + +impl Case for FunctionFactsCase { + fn name(&self) -> &'static str { + self.name + } + + fn metal_source(&self) -> MetalSource { + MetalSource::Run + } + + fn shaders(&self) -> Result, String> { + let fixture = self.loaded(); + [RUNTIME_TEXT, METAL_TEXT] + .into_iter() + .map(|extension| { + Ok(ShaderRef { + fixture: format!("{}{extension}", self.fixture), + entry: self.entry.to_owned(), + source_sha256: crate::sha256_hex(fixture.text(extension)?.as_bytes()), + }) + }) + .collect() + } + + fn inputs(&self) -> Result, String> { + let fixture = self.loaded(); + let mut constants = Vec::new(); + for value in (self.constants)() { + constants.extend(value.words()); + } + Ok(vec![ + Input { + name: "air".to_owned(), + digest: Digest::sha256(fixture.text(RUNTIME_TEXT)?.as_bytes()), + }, + Input { + name: "air-typed".to_owned(), + digest: Digest::sha256(fixture.text(METAL_TEXT)?.as_bytes()), + }, + // The entry point and the constant values are the whole of the rest of what the case + // feeds: every fact it reads is a fact about one function of the library, made with + // these values and no others. + Input::bytes("entry", self.entry.as_bytes()), + Input::bytes("constants", &constants), + ]) + } + + fn run(&self, side: &mut dyn Side, sites: &mut Sites) -> Result<(), Abort> { + let stop = |at: &str, why: String| Abort { + at: at.to_owned(), + failure: Failure::named("FixtureNotRead", why), + }; + let loaded = self.loaded().loaded().map_err(|why| stop(LIBRARY, why))?; + let library = crate::case::made(sites, LIBRARY, side.library(&loaded.source()))?; + match side.function_facts(library, self.entry, &(self.constants)()) { + Ok(facts) => { + sites.push(facts.node(FACTS)); + Ok(()) + } + Err(failure) => { + sites.push(Node::leaf(FACTS, Observed::value(failure.recorded()))); + Err(Abort { + at: FACTS.to_owned(), + failure, + }) + } + } + } +} diff --git a/crates/metal2vulkan-conformance/src/cases/pipeline_facts.rs b/crates/metal2vulkan-conformance/src/cases/pipeline_facts.rs new file mode 100644 index 000000000..c2cbc16ad --- /dev/null +++ b/crates/metal2vulkan-conformance/src/cases/pipeline_facts.rs @@ -0,0 +1,297 @@ +//! What a pipeline **state** says about itself, compute and render. +//! +//! `MTLRenderPipelineState` was exercised at none of its fifteen items and +//! `MTLComputePipelineState` at one of fifteen, while the suite made hundreds of pipeline states: +//! every case set one and drew or dispatched with it, and no case asked one what it was. Three +//! `MTLRenderPipelineState` getters were compared — on a **tile** state, through +//! [`Side::tile_facts`] — and nothing on a drawing state at all. +//! +//! The getters are not all worth the same, and [`crate::pipeline_facts`] says which is which: a +//! `label` and a `supportIndirectCommandBuffers` are round trips through the descriptor, while +//! `staticThreadgroupMemoryLength`, `imageblockSampleLength` and +//! `imageblockMemoryLengthForDimensions:` are computed by our side from the function and the +//! attachment formats, by rules the runtime's own documentation says were measured on an Apple +//! M3 Max and an M4. This family is what holds those rules to Metal through a recording. +//! +//! [`Side::tile_facts`]: crate::case::Side::tile_facts +//! +//! # The shapes, and why each is here +//! +//! - **a compute state with nothing set** (`ob1_threadgroup`): the floor, and the one case that +//! says a nil label comes back nil rather than empty; +//! - **a compute state with a label, indirect-command support and a required threadgroup size**: +//! the three descriptor fields the state echoes, each a value distinct from its default, so one +//! wired to another's would read wrong rather than pass; +//! - **a compute state whose kernel declares an explicit imageblock** +//! (`a4_imageblock_extent`): the only shape whose +//! `imageblockMemoryLengthForDimensions:` is anything but zero, asked at an extent whose three +//! axes differ so a width read as a height is a different number; +//! - **a drawing state over one attachment**: `imageblockSampleLength` is that attachment's +//! texel, `maxTotalThreadsPerThreadgroup` is 0 and `threadgroupSizeMatchesTileSize` is false, +//! which is a drawing state's whole answer and not the device's limits; +//! - **a drawing state over two attachments of different formats, with a label and +//! indirect-command support**: the sample length is the two texels packed, so a case where the +//! packing rule has something to get wrong; +//! - **the same pipeline at four samples**: the memory length is the sample length times the +//! extent times the raster sample count, and the sample count is the factor only this case +//! moves. +//! +//! # Why this family is safe +//! +//! Each case makes one library and one pipeline state and reads its getters. Nothing is +//! allocated for the device, no command buffer is made and nothing is drawn or dispatched, so no +//! case here can fault the device or trip its watchdog. The pipeline creation is the one-time +//! translation cost the project's ceilings already cover. +//! +//! # Exactness +//! +//! Every field is a number, a bool or a name, and the family declares no tolerance and announces +//! nothing: no case touches a texture, a sampler or a float. The two getters that answer the +//! **device's** limits for a kernel are deliberately not read at all, for the reason +//! [`crate::pipeline_facts`] states. + +use crate::case::{Abort, Case, Failure, Input, MetalSource, Side}; +use crate::fixture::{Fixture, METAL_TEXT, RUNTIME_TEXT}; +use crate::pipeline_facts::ComputeStateSpec; +use crate::recording::ShaderRef; +use crate::render::{ColorState, RenderPipelineSpec}; +use crate::transcript::{Digest, Node, Observed, Sites}; +use metal2vulkan::metal::PixelFormat; + +/// The site the library's make sits at. +const LIBRARY: &str = "library"; + +/// The site the state's make sits at. +const STATE: &str = "state"; + +/// The site the state's own answers sit at. +const FACTS: &str = "facts"; + +/// The imageblock extent every case asks `imageblockMemoryLengthForDimensions:` about. +/// +/// Three different axes, so a side that read the width where the height belongs answers a +/// different number. The depth is 3 and Metal ignores it, which is part of the answer: a side that +/// multiplied by it would be off by three. +const IMAGEBLOCK: [u32; 3] = [8, 4, 3]; + +/// The fixture whose kernel takes a `threadgroup uint *`, so its +/// `staticThreadgroupMemoryLength` is a number rather than zero. `function_bindings`' kernel. +const THREADGROUP_FIXTURE: &str = "a27_ob1_threadgroup"; +const THREADGROUP_ENTRY: &str = "ob1_threadgroup"; + +/// The fixture whose kernel declares an explicit imageblock of a `float` and a `ushort2`, which is +/// the one shape whose imageblock memory length is not zero. +const IMAGEBLOCK_FIXTURE: &str = "a4_imageblock_extent"; + +/// The fixture whose vertex function is Metal's fullscreen triangle and whose fragment function +/// returns white: `color_write_masks`' own, so this family needs no fixture of its own. Its +/// `rt6_resolve_masked` writes two colour attachments, which is what the two-attachment case +/// takes. +const RENDER_FIXTURE: &str = "rt6_resolves"; +const VERTEX: &str = "rt6_resolve_full"; +const FRAGMENT: &str = "rt6_resolve_white"; +const TWO_TARGETS: &str = "rt6_resolve_masked"; + +/// One colour attachment of `RGBA8Unorm`, whose texel is four bytes. +const ONE_COLOR: &[Option] = &[Some(ColorState::new(PixelFormat::RGBA8Unorm))]; + +/// Two colour attachments of **different** texel sizes — four bytes and eight — so the packed +/// sample length is a number neither format gives on its own. +const TWO_COLORS: &[Option] = &[ + Some(ColorState::new(PixelFormat::RGBA8Unorm)), + Some(ColorState::new(PixelFormat::RGBA16Float)), +]; + +/// What one case makes and reads. +enum Subject { + /// A compute pipeline state from a whole descriptor. + Compute(ComputeStateSpec<'static>), + /// A drawing render pipeline state from a whole descriptor. + Render(RenderPipelineSpec<'static>), +} + +/// A case over one pipeline state's own facts. +pub struct PipelineFactsCase { + name: &'static str, + fixture: &'static str, + /// The entry point the case's input fingerprint names, which for a render case is its vertex + /// function. + entry: &'static str, + subject: Subject, +} + +/// Every case of the family. +pub fn all() -> Vec { + vec![ + // The floor: a kernel compiled from a descriptor with Metal's defaults. Its label is nil, + // it supports no indirect command, it requires no threadgroup size, and its imageblock + // memory length is zero because it declares no imageblock. + PipelineFactsCase { + name: "pipeline-facts-compute-plain", + fixture: THREADGROUP_FIXTURE, + entry: THREADGROUP_ENTRY, + subject: Subject::Compute(ComputeStateSpec::new(THREADGROUP_ENTRY)), + }, + // The three descriptor fields the state echoes, each away from its default: a label, the + // indirect-command support, and a required threadgroup size whose three axes differ. + PipelineFactsCase { + name: "pipeline-facts-compute-described", + fixture: THREADGROUP_FIXTURE, + entry: THREADGROUP_ENTRY, + subject: Subject::Compute( + ComputeStateSpec::new(THREADGROUP_ENTRY) + .labelled("conformance-compute-state") + .for_indirect_commands() + .requiring([4, 2, 1]), + ), + }, + // The one kernel whose imageblock memory length is not zero. + PipelineFactsCase { + name: "pipeline-facts-compute-imageblock", + fixture: IMAGEBLOCK_FIXTURE, + entry: IMAGEBLOCK_FIXTURE, + subject: Subject::Compute( + ComputeStateSpec::new(IMAGEBLOCK_FIXTURE).labelled("conformance-imageblock-state"), + ), + }, + // A drawing state over one attachment, with Metal's defaults for the rest: the shape that + // says what a drawing state answers for the three getters a tile state answers + // differently. + PipelineFactsCase { + name: "pipeline-facts-render-plain", + fixture: RENDER_FIXTURE, + entry: VERTEX, + subject: Subject::Render(RenderPipelineSpec::new(VERTEX, FRAGMENT, ONE_COLOR)), + }, + // Two attachments of different texel sizes, with a label and indirect-command support: the + // sample length is the two packed, which neither format gives alone. + PipelineFactsCase { + name: "pipeline-facts-render-two-attachments", + fixture: RENDER_FIXTURE, + entry: VERTEX, + subject: Subject::Render( + RenderPipelineSpec::new(VERTEX, TWO_TARGETS, TWO_COLORS) + .labelled("conformance-render-state") + .for_indirect_commands(), + ), + }, + // The same pipeline at four samples: the raster sample count is the factor the memory + // length carries and the sample length does not, and this is the case that moves it. + PipelineFactsCase { + name: "pipeline-facts-render-multisampled", + fixture: RENDER_FIXTURE, + entry: VERTEX, + subject: Subject::Render( + RenderPipelineSpec::new(VERTEX, TWO_TARGETS, TWO_COLORS) + .labelled("conformance-render-state") + .for_indirect_commands() + .multisampled(4), + ), + }, + ] +} + +impl PipelineFactsCase { + fn loaded(&self) -> Fixture { + Fixture { + name: self.fixture, + entry: self.entry, + } + } +} + +impl Case for PipelineFactsCase { + fn name(&self) -> &'static str { + self.name + } + + fn metal_source(&self) -> MetalSource { + MetalSource::Run + } + + fn shaders(&self) -> Result, String> { + let fixture = self.loaded(); + [RUNTIME_TEXT, METAL_TEXT] + .into_iter() + .map(|extension| { + Ok(ShaderRef { + fixture: format!("{}{extension}", self.fixture), + entry: self.entry.to_owned(), + source_sha256: crate::sha256_hex(fixture.text(extension)?.as_bytes()), + }) + }) + .collect() + } + + fn inputs(&self) -> Result, String> { + let fixture = self.loaded(); + let descriptor = match &self.subject { + Subject::Compute(spec) => spec.words(), + Subject::Render(spec) => spec.words(), + }; + Ok(vec![ + Input { + name: "air".to_owned(), + digest: Digest::sha256(fixture.text(RUNTIME_TEXT)?.as_bytes()), + }, + Input { + name: "air-typed".to_owned(), + digest: Digest::sha256(fixture.text(METAL_TEXT)?.as_bytes()), + }, + // The descriptor is the whole of the rest of what the case feeds: every fact it reads + // is a fact about the state this descriptor made. + Input::bytes("descriptor", &descriptor), + Input::bytes( + "imageblock", + &IMAGEBLOCK + .iter() + .flat_map(|axis| axis.to_le_bytes()) + .collect::>(), + ), + ]) + } + + fn run(&self, side: &mut dyn Side, sites: &mut Sites) -> Result<(), Abort> { + let stop = |at: &str, why: String| Abort { + at: at.to_owned(), + failure: Failure::named("FixtureNotRead", why), + }; + let loaded = self.loaded().loaded().map_err(|why| stop(LIBRARY, why))?; + let library = crate::case::made(sites, LIBRARY, side.library(&loaded.source()))?; + // One `match` for the two kinds, each emitting its own facts under the same site name: + // what a case means is "the state this descriptor made says this about itself", and the + // two kinds of state answer different getters, so the two nodes hold different children + // and a recording of one is never read against the other. + match &self.subject { + Subject::Compute(spec) => { + let state = crate::case::made( + sites, + STATE, + side.compute_pipeline_with_descriptor(library, spec), + )?; + match side.compute_pipeline_facts(state, IMAGEBLOCK) { + Ok(facts) => sites.push(facts.node(FACTS)), + Err(failure) => return Err(refused(sites, failure)), + } + } + Subject::Render(spec) => { + let state = crate::case::made(sites, STATE, side.render_pipeline(library, spec))?; + match side.render_pipeline_facts(state, IMAGEBLOCK) { + Ok(facts) => sites.push(facts.node(FACTS)), + Err(failure) => return Err(refused(sites, failure)), + } + } + } + Ok(()) + } +} + +/// The abort a refused facts call is, with the typed error recorded at the facts site so it +/// compares as a refusal rather than as a missing site. +fn refused(sites: &mut Sites, failure: Failure) -> Abort { + sites.push(Node::leaf(FACTS, Observed::value(failure.recorded()))); + Abort { + at: FACTS.to_owned(), + failure, + } +} diff --git a/crates/metal2vulkan-conformance/src/function_facts.rs b/crates/metal2vulkan-conformance/src/function_facts.rs new file mode 100644 index 000000000..4625fe292 --- /dev/null +++ b/crates/metal2vulkan-conformance/src/function_facts.rs @@ -0,0 +1,327 @@ +//! What a function says about **itself**: `MTLFunction`'s own getters, and the two objects they +//! answer with — `MTLVertexAttribute`, `MTLAttribute` and `MTLFunctionConstant`. +//! +//! [`crate::function_bindings`] compares what a function's reflection says its **arguments** are. +//! This is the other side of the same object: the kind of entry point it is, the patch it +//! evaluates, the stage-input attributes it declares, and the function constants it reads. Four +//! containers that the suite reached nowhere — `MTLFunction` at one item of twelve, and +//! `MTLAttribute`, `MTLVertexAttribute` and `MTLFunctionConstant` at none of theirs. +//! +//! Every field here is a number, an enumeration or a name, so the whole tree compares exactly and +//! nothing in it is the host's own. The one fact that is not portable is the `device` object +//! itself, and what the case asks of it is the one portable question the getter answers: did the +//! function come from the case's own device ([`FunctionFacts::device_is_the_cases`]), the shape +//! [`crate::argument_encoders::EncoderFacts`] already uses. +//! +//! # Order +//! +//! `vertexAttributes` and `stageInputAttributes` answer **declaration order**, which both sides +//! state, so an attribute's site is named by its position and the position is part of the answer. +//! `functionConstantsDictionary` answers a dictionary, which has no order at all, so a constant's +//! site is named by its own name — unique among a dictionary's keys by construction, which is what +//! keeps two sibling sites from sharing a name. +//! +//! # A specialized function +//! +//! A function made with constant values (`newFunctionWithName:constantValues:error:`) is the +//! function specialized: it leaves out an attribute its constants gate off, keeps the others, and +//! answers **no** function constants. That is the only way to reach `MTLFunctionConstantValues`, +//! whose three setters a case states as [`ConstantValue`]s. + +use crate::transcript::{Node, NodeName, Observed, Value}; +use metal2vulkan::metal::{DataType, FunctionOptions, FunctionType, PatchType}; + +/// What one function answers of itself: every `MTLFunction` getter whose answer is portable. +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct FunctionFacts { + /// `name`. + pub name: String, + /// `functionType`. + pub function_type: FunctionType, + /// `patchType`. + pub patch_type: PatchType, + /// `patchControlPointCount`: `None` where Metal answers -1 (no patch, or a patch that states + /// no count). + pub patch_control_point_count: Option, + /// `vertexAttributes`, in declaration order; `None` is Metal's nil. + pub vertex_attributes: Option>, + /// `stageInputAttributes`, in declaration order; `None` is Metal's nil. + pub stage_input_attributes: Option>, + /// `functionConstantsDictionary`, by the constant's own name. A dictionary has no order, so + /// the sites are named by the key rather than by a position neither side promises. + pub constants: Vec, + /// `options`: the `MTLFunctionOptions` bits the function was made with. + pub options: FunctionOptions, + /// Whether `device` is the device the case's other objects were made on. + /// + /// The device object itself is not comparable — its name and its identity are the host's — so + /// what the case asks is the one portable question the getter answers. + pub device_is_the_cases: bool, +} + +/// One stage-input attribute: `MTLVertexAttribute` and `MTLAttribute`, which state the same six +/// facts and are the two types `vertexAttributes` and `stageInputAttributes` answer with. +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct AttributeFacts { + /// `name`. + pub name: String, + /// `attributeIndex`: its `[[attribute(n)]]`. + pub attribute_index: u32, + /// `attributeType`. + pub attribute_type: DataType, + /// `isActive`: whether the function reads the attribute. + pub active: bool, + /// `isPatchData`: a post-tessellation vertex function's per-patch input. + pub patch_data: bool, + /// `isPatchControlPointData`: a field of a post-tessellation vertex function's control points. + pub patch_control_point_data: bool, +} + +/// One function constant: `MTLFunctionConstant`. +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct ConstantFacts { + /// The dictionary's key, which is the constant's name. + pub name: String, + /// `type`. + pub data_type: DataType, + /// `index`: its `[[function_constant(n)]]`. + pub index: u32, + /// `required`: whether a function made from it needs a value for the constant. + pub required: bool, +} + +/// One value a case supplies for a function constant: where it goes, its Metal data type and its +/// bytes, exactly as `MTLFunctionConstantValues` takes them. +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct ConstantValue { + /// Which `MTLFunctionConstantValues` setter the value goes through. + pub at: ConstantAt, + /// The `MTLDataType` the setter is given. + pub data_type: DataType, + /// The bytes, one value's for [`ConstantAt::Index`] and [`ConstantAt::Name`] and `count` + /// values' for [`ConstantAt::Range`]. + pub bytes: Vec, +} + +impl ConstantValue { + /// A `bool` constant at `index`, set through `setConstantValue:type:atIndex:`. + pub fn bool_at(index: u32, value: bool) -> Self { + Self { + at: ConstantAt::Index(index), + data_type: DataType::Bool, + bytes: vec![u8::from(value)], + } + } + + /// A `bool` constant named `name`, set through `setConstantValue:type:withName:`. + pub fn bool_named(name: &str, value: bool) -> Self { + Self { + at: ConstantAt::Name(name.to_owned()), + data_type: DataType::Bool, + bytes: vec![u8::from(value)], + } + } + + /// `count` `bool` constants from `first`, set through `setConstantValues:type:withRange:`. + pub fn bools_from(first: u32, values: &[bool]) -> Self { + Self { + at: ConstantAt::Range { + first, + count: values.len() as u32, + }, + data_type: DataType::Bool, + bytes: values.iter().map(|value| u8::from(*value)).collect(), + } + } + + /// The words a case's input fingerprint covers: the setter, where it writes, the type and the + /// bytes. + pub fn words(&self) -> Vec { + let mut out = Vec::new(); + match &self.at { + ConstantAt::Index(index) => { + out.extend(b"index"); + out.extend(index.to_le_bytes()); + } + ConstantAt::Range { first, count } => { + out.extend(b"range"); + out.extend(first.to_le_bytes()); + out.extend(count.to_le_bytes()); + } + ConstantAt::Name(name) => { + out.extend(b"name"); + out.extend(name.as_bytes()); + } + } + out.extend(self.data_type.as_raw().to_le_bytes()); + out.extend(&self.bytes); + out + } +} + +/// Which `MTLFunctionConstantValues` setter a [`ConstantValue`] goes through, which is the whole +/// of that class's own surface. +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum ConstantAt { + /// `setConstantValue:type:atIndex:`. + Index(u32), + /// `setConstantValues:type:withRange:`: `count` values from `first`. + Range { first: u32, count: u32 }, + /// `setConstantValue:type:withName:`. + Name(String), +} + +/// An enumeration as a site records it: its Metal enumerator name beside its ordinal, so a diff +/// reads `MTLFunctionTypeVertex` rather than 1 and a value neither side has a name for is still +/// readable. The shape [`crate::function_bindings`] records an enumeration in. +fn named(name: &'static str, raw: u32) -> Value { + Value::fields([ + ("name", Value::Lines(vec![name.to_owned()])), + ("raw", Value::Uint(u64::from(raw))), + ]) +} + +/// An `Option` as a site records it. +fn optional(value: Option) -> Value { + match value { + Some(value) => Value::Variant { + name: "Some".to_owned(), + payload: Box::new(Value::Uint(u64::from(value))), + }, + None => Value::unit_variant("None"), + } +} + +impl FunctionFacts { + /// The facts as the sites a case emits under one node, so both sides emit one shape. + pub fn node(&self, name: impl Into) -> Node { + let mut node = Node::branch(name, Vec::new()) + .with(Node::leaf( + "name", + Observed::value(Value::Lines(vec![self.name.clone()])), + )) + .with(Node::leaf( + "function_type", + Observed::value(named( + self.function_type.name(), + self.function_type.as_raw(), + )), + )) + .with(Node::leaf( + "patch_type", + Observed::value(named(self.patch_type.name(), self.patch_type.as_raw())), + )) + .with(Node::leaf( + "patch_control_point_count", + Observed::value(optional(self.patch_control_point_count)), + )) + .with(Node::leaf( + "options", + Observed::value(options(self.options)), + )) + .with(Node::leaf( + "device", + Observed::value(Value::Bool(self.device_is_the_cases)), + )); + node = node.with(attributes("vertex_attributes", &self.vertex_attributes)); + node = node.with(attributes( + "stage_input_attributes", + &self.stage_input_attributes, + )); + let mut dictionary = Node::branch("function_constants", Vec::new()).with(Node::leaf( + "count", + Observed::value(Value::Uint(self.constants.len() as u64)), + )); + for constant in &self.constants { + dictionary = dictionary.with(constant.node(format!("constant/{}", constant.name))); + } + node.with(dictionary) + } +} + +/// `MTLFunctionOptions` as a site records it: the names of the bits set, and the raw value beside +/// them so a bit no name declares is still readable. +fn options(options: FunctionOptions) -> Value { + let names = FunctionOptions::KNOWN + .iter() + .filter(|(bit, _)| !bit.is_empty() && options.contains(*bit)) + .map(|(_, name)| *name); + Value::fields([ + ("names", Value::set(names)), + ("raw", Value::Uint(u64::from(options.as_raw()))), + ]) +} + +/// One of the two attribute lists as a site records it: Metal's nil as a leaf, a list as a branch +/// of its length and one child a position. +/// +/// A list of none and nil are two different answers and compare as two different shapes, which is +/// what the two forms buy: a side that answered an empty array where the other answered nil is a +/// readable difference rather than an equal one. +fn attributes(name: &'static str, held: &Option>) -> Node { + let Some(held) = held else { + return Node::leaf(name, Observed::value(Value::unit_variant("None"))); + }; + let mut node = Node::branch(name, Vec::new()).with(Node::leaf( + "count", + Observed::value(Value::Uint(held.len() as u64)), + )); + for (at, attribute) in held.iter().enumerate() { + node = node.with(attribute.node(format!("attribute/{at}"))); + } + node +} + +impl AttributeFacts { + /// The attribute's six facts under one node. + fn node(&self, name: impl Into) -> Node { + Node::branch(name, Vec::new()) + .with(Node::leaf( + "name", + Observed::value(Value::Lines(vec![self.name.clone()])), + )) + .with(Node::leaf( + "attribute_index", + Observed::value(Value::Uint(u64::from(self.attribute_index))), + )) + .with(Node::leaf( + "attribute_type", + Observed::value(named( + self.attribute_type.name(), + self.attribute_type.as_raw(), + )), + )) + .with(Node::leaf( + "active", + Observed::value(Value::Bool(self.active)), + )) + .with(Node::leaf( + "patch_data", + Observed::value(Value::Bool(self.patch_data)), + )) + .with(Node::leaf( + "patch_control_point_data", + Observed::value(Value::Bool(self.patch_control_point_data)), + )) + } +} + +impl ConstantFacts { + /// The constant's facts under one node. Its name is the dictionary's key, and the site is + /// named by it, so the name is in the site rather than repeated as a child. + fn node(&self, name: impl Into) -> Node { + Node::branch(name, Vec::new()) + .with(Node::leaf( + "data_type", + Observed::value(named(self.data_type.name(), self.data_type.as_raw())), + )) + .with(Node::leaf( + "index", + Observed::value(Value::Uint(u64::from(self.index))), + )) + .with(Node::leaf( + "required", + Observed::value(Value::Bool(self.required)), + )) + } +} diff --git a/crates/metal2vulkan-conformance/src/lib.rs b/crates/metal2vulkan-conformance/src/lib.rs index 6ff559a63..c835c8e13 100644 --- a/crates/metal2vulkan-conformance/src/lib.rs +++ b/crates/metal2vulkan-conformance/src/lib.rs @@ -57,9 +57,11 @@ pub mod diff; pub mod event_orders; pub mod fixture; pub mod function_bindings; +pub mod function_facts; pub mod handler_waits; pub mod known_gaps; pub mod measured; +pub mod pipeline_facts; pub mod queue_slots; pub mod record; pub mod recording; diff --git a/crates/metal2vulkan-conformance/src/metal_side.rs b/crates/metal2vulkan-conformance/src/metal_side.rs index 8c5c1573d..b4b366849 100644 --- a/crates/metal2vulkan-conformance/src/metal_side.rs +++ b/crates/metal2vulkan-conformance/src/metal_side.rs @@ -26,6 +26,10 @@ use crate::function_bindings::{ ArrayFacts, BindingFacts, BufferFacts, MemberFacts, PointerFacts, ReferenceFacts, StructFacts, TextureFacts, ThreadgroupFacts, TypeFacts, }; +use crate::function_facts::{ + AttributeFacts, ConstantAt, ConstantFacts, ConstantValue, FunctionFacts, +}; +use crate::pipeline_facts::{ComputeStateFacts, ComputeStateSpec, RenderStateFacts}; use crate::queue_slots::QueueSlots; use crate::render::{ Dispatch, RenderPass, RenderPipelineSpec, RenderStep, RenderWork, StageFunction, TargetSpec, @@ -37,21 +41,24 @@ use crate::sparse_query::{ use crate::texture_query::{HeapTextureQuery, SizeAndAlign, Storage}; use crate::transcript::Value; use metal2vulkan::metal::state::{DepthStencilDescriptor, StencilDescriptor}; -use metal2vulkan::metal::{BindingAccess, BindingType, PixelFormat, RenderStages}; +use metal2vulkan::metal::{ + BindingAccess, BindingType, FunctionOptions, FunctionType, PatchType, PixelFormat, RenderStages, +}; use metal2vulkan_runtime::SparsePageSize; use objc2::rc::Retained; use objc2::runtime::ProtocolObject; use objc2::AnyThread; -use objc2_foundation::{NSArray, NSObjectProtocol, NSRange, NSString, NSURL}; +use objc2_foundation::{NSArray, NSDictionary, NSObjectProtocol, NSRange, NSString, NSURL}; use objc2_metal::{ - MTLArgumentDescriptor, MTLArgumentEncoder, MTLArrayType, MTLAttributeFormat, MTLBarrierScope, - MTLBinding, MTLBindingAccess, MTLBindingType, MTLBlendFactor, MTLBlendOperation, - MTLBlitCommandEncoder, MTLBuffer, MTLBufferBinding, MTLClearColor, MTLColorWriteMask, - MTLCommandBuffer, MTLCommandBufferHandler, MTLCommandBufferStatus, MTLCommandEncoder, - MTLCommandQueue, MTLCompareFunction, MTLComputeCommandEncoder, MTLComputePipelineDescriptor, - MTLComputePipelineReflection, MTLComputePipelineState, MTLCreateSystemDefaultDevice, - MTLDataType, MTLDepthStencilDescriptor, MTLDepthStencilState, MTLDevice, MTLDispatchType, - MTLEvent, MTLFunction, MTLHeap, MTLHeapDescriptor, MTLHeapType, MTLIndexType, + MTLArgumentDescriptor, MTLArgumentEncoder, MTLArrayType, MTLAttribute, MTLAttributeFormat, + MTLBarrierScope, MTLBinding, MTLBindingAccess, MTLBindingType, MTLBlendFactor, + MTLBlendOperation, MTLBlitCommandEncoder, MTLBuffer, MTLBufferBinding, MTLClearColor, + MTLColorWriteMask, MTLCommandBuffer, MTLCommandBufferHandler, MTLCommandBufferStatus, + MTLCommandEncoder, MTLCommandQueue, MTLCompareFunction, MTLComputeCommandEncoder, + MTLComputePipelineDescriptor, MTLComputePipelineReflection, MTLComputePipelineState, + MTLCreateSystemDefaultDevice, MTLDataType, MTLDepthStencilDescriptor, MTLDepthStencilState, + MTLDevice, MTLDispatchType, MTLEvent, MTLFunction, MTLFunctionConstant, + MTLFunctionConstantValues, MTLHeap, MTLHeapDescriptor, MTLHeapType, MTLIndexType, MTLIndirectCommandBuffer, MTLIndirectCommandBufferDescriptor, MTLIndirectCommandType, MTLIndirectRenderCommand, MTLLibrary, MTLLoadAction, MTLMeshRenderPipelineDescriptor, MTLMultisampleDepthResolveFilter, MTLMultisampleStencilResolveFilter, MTLOrigin, @@ -66,7 +73,7 @@ use objc2_metal::{ MTLStoreActionOptions, MTLStructMember, MTLStructType, MTLTexture, MTLTextureBinding, MTLTextureDescriptor, MTLTextureReferenceType, MTLTextureSwizzle, MTLTextureSwizzleChannels, MTLTextureType, MTLTextureUsage, MTLThreadgroupBinding, MTLTileRenderPipelineDescriptor, - MTLVertexDescriptor, MTLVertexFormat, MTLVertexStepFunction, MTLViewport, + MTLVertexAttribute, MTLVertexDescriptor, MTLVertexFormat, MTLVertexStepFunction, MTLViewport, MTLVisibilityResultMode, MTLVisibleFunctionTable, }; @@ -253,6 +260,116 @@ fn our_data_type(raw: usize) -> Answer { .map_err(|_| Failure::named("UnknownDataType", format!("MTLDataType({raw})"))) } +/// The translator's `MTLFunctionType` for a raw Metal ordinal. +fn our_function_type(raw: usize) -> Answer { + FunctionType::try_from(raw as u32) + .map_err(|_| Failure::named("UnknownFunctionType", format!("MTLFunctionType({raw})"))) +} + +/// The translator's `MTLPatchType` for a raw Metal ordinal. +fn our_patch_type(raw: usize) -> Answer { + PatchType::try_from(raw as u32) + .map_err(|_| Failure::named("UnknownPatchType", format!("MTLPatchType({raw})"))) +} + +/// One `MTLVertexAttribute`'s six facts, in the vocabulary both sides answer in. +/// +/// # Why this and [`stage_input_attribute_facts`] are two functions, each taking its own class +/// +/// `MTLVertexAttribute` and `MTLAttribute` are two Objective-C classes that state the same six +/// facts and share no protocol, so there is nothing to be generic over, and one `macro_rules!` over +/// the six getters would read better than two near-identical bodies. It would also hide them: the +/// coverage derivation reads the leg's calls out of `fn` bodies, and a call written inside a macro +/// sits in no function at all, so both classes would be exercised by a case and credited to +/// nothing. +/// +/// And the attribute arrives as a **parameter** rather than as a `for` loop's variable, which is +/// the shape [`metal_binding`] already uses for the same reason: the derivation types a receiver +/// from a `let`, a parameter or a closure's parameter, and a loop variable types as nothing, so +/// six getters read straight off one would resolve to no item either. +fn vertex_attribute_facts(attribute: &MTLVertexAttribute) -> Answer { + Ok(AttributeFacts { + name: attribute.name().to_string(), + attribute_index: attribute.attributeIndex() as u32, + attribute_type: our_data_type(attribute.attributeType().0)?, + active: attribute.isActive(), + patch_data: attribute.isPatchData(), + patch_control_point_data: attribute.isPatchControlPointData(), + }) +} + +/// One `MTLAttribute`'s six facts. [`vertex_attribute_facts`] says why the two are not one. +fn stage_input_attribute_facts(attribute: &MTLAttribute) -> Answer { + Ok(AttributeFacts { + name: attribute.name().to_string(), + attribute_index: attribute.attributeIndex() as u32, + attribute_type: our_data_type(attribute.attributeType().0)?, + active: attribute.isActive(), + patch_data: attribute.isPatchData(), + patch_control_point_data: attribute.isPatchControlPointData(), + }) +} + +/// `vertexAttributes`' list in the vocabulary both sides answer in; `None` is Metal's nil. +fn our_vertex_attributes( + list: Option<&NSArray>, +) -> Answer>> { + let Some(list) = list else { return Ok(None) }; + let mut found = Vec::new(); + for attribute in list { + found.push(vertex_attribute_facts(&attribute)?); + } + Ok(Some(found)) +} + +/// `stageInputAttributes`' list in the vocabulary both sides answer in; `None` is Metal's nil. +fn our_stage_input_attributes( + list: Option<&NSArray>, +) -> Answer>> { + let Some(list) = list else { return Ok(None) }; + let mut found = Vec::new(); + for attribute in list { + found.push(stage_input_attribute_facts(&attribute)?); + } + Ok(Some(found)) +} + +/// The `MTLFunctionConstantValues` the case's values build, each through the setter its +/// [`ConstantAt`] names. +fn constant_values(values: &[ConstantValue]) -> Retained { + let built = MTLFunctionConstantValues::new(); + for value in values { + let bytes = std::ptr::NonNull::from(value.bytes.as_slice()).cast::(); + let data_type = MTLDataType(value.data_type.as_raw() as usize); + // SAFETY: each pointer is to `value.bytes`, which outlives the call, and each holds the + // bytes the case states for the type and the count it states. The index, the range and + // the name are the case's own; Metal checks them against the function's own constants + // when the pipeline state compiles, and a value naming no constant is ignored. + unsafe { + match &value.at { + ConstantAt::Index(index) => { + built.setConstantValue_type_atIndex(bytes, data_type, *index as usize); + } + ConstantAt::Range { first, count } => { + built.setConstantValues_type_withRange( + bytes, + data_type, + NSRange::new(*first as usize, *count as usize), + ); + } + ConstantAt::Name(name) => { + built.setConstantValue_type_withName( + bytes, + data_type, + &NSString::from_str(name), + ); + } + } + } + } + built +} + /// The translator's `MTLBindingAccess` for a raw Metal ordinal. fn our_access(raw: usize) -> Answer { BindingAccess::try_from(raw as u32) @@ -1741,6 +1858,179 @@ impl Side for MetalSide { Ok(found) } + fn compute_pipeline_with_descriptor( + &mut self, + library: Handle, + spec: &ComputeStateSpec<'_>, + ) -> Answer { + let library = self + .libraries + .get(library.0 as usize) + .ok_or_else(|| Failure::named("NoSuchHandle", format!("library {}", library.0)))?; + let function = library + .newFunctionWithName(&NSString::from_str(spec.entry)) + .ok_or_else(|| Failure::named("NoSuchFunction", spec.entry.to_owned()))?; + let descriptor = MTLComputePipelineDescriptor::new(); + descriptor.setComputeFunction(Some(&function)); + // Set only where the case states one. `setLabel:nil` on a pipeline descriptor fails an + // assertion inside Metal and ends the process ("label must not be nil", measured on this + // M3 Max while recording this family), and Metal's own default is already nil, so a case + // that means a nil label is a case that makes this call not at all. + if let Some(label) = spec.label { + descriptor.setLabel(Some(&NSString::from_str(label))); + } + descriptor.setSupportIndirectCommandBuffers(spec.support_indirect_command_buffers); + if let Some(threads) = spec.required_threads_per_threadgroup { + descriptor.setRequiredThreadsPerThreadgroup(size(threads)); + } + let state = self + .device + .newComputePipelineStateWithDescriptor_options_reflection_error( + &descriptor, + MTLPipelineOption::None, + None, + ) + .map_err(|error| { + Failure::named( + "NewComputePipelineState", + error.localizedDescription().to_string(), + ) + })?; + Ok(keep(&mut self.pipelines, state)) + } + + fn compute_pipeline_facts( + &mut self, + state: Handle, + imageblock: [u32; 3], + ) -> Answer { + let registry = self.device.registryID(); + // Declared, so the coverage derivation types the receiver: the pool's own element type is + // this side's `Vec`, which names no Metal type the walk can read off a field. + let state: &Retained> = self + .pipelines + .get(state.0 as usize) + .ok_or_else(|| Failure::named("NoSuchHandle", format!("pipeline {}", state.0)))?; + let required = state.requiredThreadsPerThreadgroup(); + Ok(ComputeStateFacts { + label: state.label().map(|label| label.to_string()), + // The registry ID is each host's own number, so only the **comparison** is portable. + device_is_the_cases: state.device().registryID() == registry, + static_threadgroup_memory_length: state.staticThreadgroupMemoryLength() as u64, + support_indirect_command_buffers: state.supportIndirectCommandBuffers(), + // SAFETY: the dimensions are the case's own three positive extents, which the call + // multiplies by the kernel's imageblock cell size and nothing else. + imageblock_memory_length: unsafe { + state.imageblockMemoryLengthForDimensions(size(imageblock)) + } as u64, + required_threads_per_threadgroup: [ + required.width as u64, + required.height as u64, + required.depth as u64, + ], + }) + } + + fn render_pipeline_facts( + &mut self, + state: Handle, + imageblock: [u32; 3], + ) -> Answer { + let registry = self.device.registryID(); + let state: &Retained> = &self + .render_pipelines + .get(state.0 as usize) + .ok_or_else(|| Failure::named("NoSuchHandle", format!("pipeline {}", state.0)))? + .state; + let required = state.requiredThreadsPerTileThreadgroup(); + Ok(RenderStateFacts { + label: state.label().map(|label| label.to_string()), + device_is_the_cases: state.device().registryID() == registry, + max_total_threads_per_threadgroup: state.maxTotalThreadsPerThreadgroup() as u64, + threadgroup_size_matches_tile_size: state.threadgroupSizeMatchesTileSize(), + imageblock_sample_length: Some(state.imageblockSampleLength() as u64), + imageblock_memory_length: Some( + state.imageblockMemoryLengthForDimensions(size(imageblock)) as u64, + ), + support_indirect_command_buffers: state.supportIndirectCommandBuffers(), + required_threads_per_tile_threadgroup: [ + required.width as u64, + required.height as u64, + required.depth as u64, + ], + }) + } + + fn function_facts( + &mut self, + library: Handle, + entry: &str, + constants: &[ConstantValue], + ) -> Answer { + let registry = self.device.registryID(); + let library: &Retained> = self + .libraries + .get(library.0 as usize) + .ok_or_else(|| Failure::named("NoSuchHandle", format!("library {}", library.0)))?; + let name = NSString::from_str(entry); + let function: Retained> = match constants.is_empty() { + true => library + .newFunctionWithName(&name) + .ok_or_else(|| Failure::named("NoSuchFunction", entry.to_owned()))?, + false => { + let values = constant_values(constants); + library + .newFunctionWithName_constantValues_error(&name, &values) + .map_err(|error| { + Failure::named( + "NewFunctionWithConstantValues", + error.localizedDescription().to_string(), + ) + })? + } + }; + // Each list bound to a local of its declared type, as the bindings walk does: the + // coverage derivation types a receiver from what bound it, so a call made inside a `for` + // header or on an `Option`'s contents names no type at all. + let vertex: Option>> = function.vertexAttributes(); + let stage_in: Option>> = function.stageInputAttributes(); + let dictionary: Retained> = + function.functionConstantsDictionary(); + let mut found = Vec::new(); + for key in dictionary.allKeys() { + let constant: Retained = dictionary + .objectForKey(&key) + .ok_or_else(|| Failure::named("NoSuchConstant", key.to_string()))?; + found.push(ConstantFacts { + name: constant.name().to_string(), + data_type: our_data_type(constant.r#type().0)?, + index: constant.index() as u32, + required: constant.required(), + }); + } + // A dictionary has no order, so the facts are sorted here and the comparison is of two + // sorted lists: `allKeys` is free to answer in any order and a case still compares the + // same constant against the same constant. + found.sort_by(|left, right| left.name.cmp(&right.name)); + let count = function.patchControlPointCount(); + Ok(FunctionFacts { + name: function.name().to_string(), + function_type: our_function_type(function.functionType().0)?, + patch_type: our_patch_type(function.patchType().0)?, + // Metal answers -1 where there is no count, which the vocabulary spells `None`. + patch_control_point_count: u32::try_from(count).ok(), + vertex_attributes: our_vertex_attributes(vertex.as_deref())?, + stage_input_attributes: our_stage_input_attributes(stage_in.as_deref())?, + constants: found, + options: FunctionOptions::try_from(function.options().0 as u32) + .map_err(|error| Failure::named("UnknownFunctionOptions", error.to_string()))?, + // The registry ID is each host's own number, so only the **comparison** is portable: + // the two sides agree that the function came from the case's device, never on the + // number that says so. + device_is_the_cases: function.device().registryID() == registry, + }) + } + fn constant_data_offset(&mut self, encoder: Handle, index: u32) -> Answer { let (buffer, arguments) = self .argument_encoders @@ -2459,7 +2749,10 @@ impl Side for MetalSide { } fn tile_facts(&mut self, state: Handle) -> Answer { - let state = &self + // Declared, so the coverage derivation types the receiver: the pool's element is this + // side's own struct, which names no Metal type the walk can read off a field, and these + // three getters were therefore attributed to no item while being compared exactly. + let state: &Retained> = &self .render_pipelines .get(state.0 as usize) .ok_or_else(|| Failure::named("NoSuchHandle", format!("tile pipeline {}", state.0)))? @@ -2613,6 +2906,12 @@ impl Side for MetalSide { if let Some(fragment) = &spec.fragment { descriptor.setFragmentFunction(Some(&*function(fragment)?)); } + // Set only where the case states one: `setLabel:nil` ends Metal's process, as the + // compute descriptor's does. + if let Some(label) = spec.label { + descriptor.setLabel(Some(&NSString::from_str(label))); + } + descriptor.setSupportIndirectCommandBuffers(spec.support_indirect_command_buffers); descriptor.setRasterSampleCount(spec.samples as usize); descriptor.setRasterizationEnabled(spec.rasterization); if let Some(layout) = &spec.vertex_layout { diff --git a/crates/metal2vulkan-conformance/src/pipeline_facts.rs b/crates/metal2vulkan-conformance/src/pipeline_facts.rs new file mode 100644 index 000000000..4338b3bf6 --- /dev/null +++ b/crates/metal2vulkan-conformance/src/pipeline_facts.rs @@ -0,0 +1,238 @@ +//! What a pipeline **state** says about itself: `MTLComputePipelineState`'s and +//! `MTLRenderPipelineState`'s own getters, and the descriptor fields each one echoes back. +//! +//! A pipeline state is immutable, so everything it answers was decided by its descriptor or by the +//! function it compiled. That makes each getter one of two kinds of question, and the two are not +//! worth the same: +//! +//! - **a round trip** — `label` and `supportIndirectCommandBuffers` come straight from the +//! descriptor, `requiredThreadsPerThreadgroup` from a compute descriptor's, and comparing them +//! is comparing that we kept what the program handed us; +//! - **a fact about the compiled thing** — `staticThreadgroupMemoryLength`, +//! `imageblockSampleLength` and `imageblockMemoryLengthForDimensions:` are computed from the +//! function and the attachment formats, and our side computes them itself, by rules +//! `metal2vulkan-runtime`'s own documentation says were measured on an Apple M3 Max and an +//! M4. Those are the ones with something to get wrong. +//! +//! # What is left out, and why +//! +//! **A compute state's `maxTotalThreadsPerThreadgroup` and `threadExecutionWidth` are not here.** +//! They answer the **device's** limits for the kernel, which is the reason +//! [`Side::static_threadgroup_memory_length`] already states at its own site: a venue that answers +//! less is not diverging from Metal, it is a venue with a smaller device, and a transcript has no +//! way to say that of a number. Capping them from the descriptor does not fix it — the answer is +//! still the least of several limits, one of them the device's — so the two stay out and are a +//! named hole rather than a comparison that would fail honestly on a smaller venue. +//! +//! A **render** state's `maxTotalThreadsPerThreadgroup` is a different question and is here: a +//! drawing state answers 0, which is a constant and not a limit. +//! +//! **`gpuResourceID` is not here.** A resource ID is each host's own number, for exactly the +//! reason [`crate::argument_encoders`] gives for every word an encoder writes, and a recording +//! holds nothing host-specific. +//! +//! [`Side::static_threadgroup_memory_length`]: crate::case::Side::static_threadgroup_memory_length + +use crate::transcript::{Node, NodeName, Observed, Value}; + +/// A compute pipeline state a case makes from a whole descriptor: +/// `MTLComputePipelineDescriptor`'s fields whose answer the state itself gives back. +/// +/// Only those fields. A descriptor field nothing observes would be a call the coverage map counts +/// and no case checks, which is worth nothing to a reader; the fields that are here are each read +/// back at the matching getter of [`ComputeStateFacts`]. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct ComputeStateSpec<'a> { + /// The kernel's name in the library. + pub entry: &'a str, + /// `label`; `None` is Metal's nil, which the state answers as nil. + pub label: Option<&'a str>, + /// `supportIndirectCommandBuffers`. + pub support_indirect_command_buffers: bool, + /// `requiredThreadsPerThreadgroup`; `None` is Metal's zero size, no requirement. + pub required_threads_per_threadgroup: Option<[u32; 3]>, +} + +impl<'a> ComputeStateSpec<'a> { + /// The kernel `entry` with Metal's defaults for every other field. + pub const fn new(entry: &'a str) -> Self { + Self { + entry, + label: None, + support_indirect_command_buffers: false, + required_threads_per_threadgroup: None, + } + } + + /// The descriptor with `label`. + #[must_use] + pub const fn labelled(mut self, label: &'a str) -> Self { + self.label = Some(label); + self + } + + /// The descriptor with `supportIndirectCommandBuffers` set. + #[must_use] + pub const fn for_indirect_commands(mut self) -> Self { + self.support_indirect_command_buffers = true; + self + } + + /// The descriptor requiring every dispatch to have the threadgroup size `threads`. + #[must_use] + pub const fn requiring(mut self, threads: [u32; 3]) -> Self { + self.required_threads_per_threadgroup = Some(threads); + self + } + + /// The words a case's input fingerprint covers: every field, so a descriptor that moves is a + /// change to the case's inputs. + pub fn words(&self) -> Vec { + let mut out = self.entry.as_bytes().to_vec(); + out.extend(self.label.unwrap_or("").as_bytes()); + out.push(u8::from(self.label.is_some())); + out.push(u8::from(self.support_indirect_command_buffers)); + for axis in self.required_threads_per_threadgroup.unwrap_or([0, 0, 0]) { + out.extend(axis.to_le_bytes()); + } + out + } +} + +/// What a compute pipeline state answers of itself. Each field is a Metal getter's answer. +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct ComputeStateFacts { + /// `label`, which the state echoes from its descriptor; `None` is nil. + pub label: Option, + /// Whether `device` is the device the case's other objects were made on. The device object + /// itself is not comparable, so this is the one portable question the getter answers. + pub device_is_the_cases: bool, + /// `staticThreadgroupMemoryLength`: the bytes the kernel's own `threadgroup` arrays take. + pub static_threadgroup_memory_length: u64, + /// `supportIndirectCommandBuffers`, echoed from the descriptor. + pub support_indirect_command_buffers: bool, + /// `imageblockMemoryLengthForDimensions:` of the dimensions the case asked about. + pub imageblock_memory_length: u64, + /// `requiredThreadsPerThreadgroup`, as three axes; a zero size where the descriptor requires + /// none. + pub required_threads_per_threadgroup: [u64; 3], +} + +/// What a render pipeline state answers of itself. Each field is a Metal getter's answer. +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct RenderStateFacts { + /// `label`, which the state echoes from its descriptor; `None` is nil. + pub label: Option, + /// Whether `device` is the device the case's other objects were made on. + pub device_is_the_cases: bool, + /// `maxTotalThreadsPerThreadgroup`: 0 for a drawing state, which is a constant and not the + /// device's limit, so it compares exactly on every venue. + pub max_total_threads_per_threadgroup: u64, + /// `threadgroupSizeMatchesTileSize`: false for a drawing state. + pub threadgroup_size_matches_tile_size: bool, + /// `imageblockSampleLength`: the color attachments' texels packed. `None` where the side + /// answered a typed error for it rather than a length. + pub imageblock_sample_length: Option, + /// `imageblockMemoryLengthForDimensions:` of the dimensions the case asked about, which for a + /// drawing state is the sample length times the dimensions and the raster sample count. + pub imageblock_memory_length: Option, + /// `supportIndirectCommandBuffers`, echoed from the descriptor. + pub support_indirect_command_buffers: bool, + /// `requiredThreadsPerTileThreadgroup`, as three axes; a zero size for a drawing state. + pub required_threads_per_tile_threadgroup: [u64; 3], +} + +/// `label` as a site records it. +fn label(held: &Option) -> Value { + match held { + Some(held) => Value::Variant { + name: "Some".to_owned(), + payload: Box::new(Value::Lines(vec![held.clone()])), + }, + None => Value::unit_variant("None"), + } +} + +/// A `MTLSize` as a site records it, in the shape [`crate::case::RateMapFacts`] records one. +fn size(axes: &[u64; 3]) -> Value { + Value::fields([ + ("width", Value::Uint(axes[0])), + ("height", Value::Uint(axes[1])), + ("depth", Value::Uint(axes[2])), + ]) +} + +/// A `u64` a side may have answered a typed error for, as a site records it. +fn optional(held: Option) -> Value { + match held { + Some(held) => Value::Variant { + name: "Some".to_owned(), + payload: Box::new(Value::Uint(held)), + }, + None => Value::unit_variant("None"), + } +} + +impl ComputeStateFacts { + /// The facts as the sites a case emits under one node, so both sides emit one shape. + pub fn node(&self, name: impl Into) -> Node { + Node::branch(name, Vec::new()) + .with(Node::leaf("label", Observed::value(label(&self.label)))) + .with(Node::leaf( + "device", + Observed::value(Value::Bool(self.device_is_the_cases)), + )) + .with(Node::leaf( + "static_threadgroup_memory_length", + Observed::value(Value::Uint(self.static_threadgroup_memory_length)), + )) + .with(Node::leaf( + "support_indirect_command_buffers", + Observed::value(Value::Bool(self.support_indirect_command_buffers)), + )) + .with(Node::leaf( + "imageblock_memory_length", + Observed::value(Value::Uint(self.imageblock_memory_length)), + )) + .with(Node::leaf( + "required_threads_per_threadgroup", + Observed::value(size(&self.required_threads_per_threadgroup)), + )) + } +} + +impl RenderStateFacts { + /// The facts as the sites a case emits under one node, so both sides emit one shape. + pub fn node(&self, name: impl Into) -> Node { + Node::branch(name, Vec::new()) + .with(Node::leaf("label", Observed::value(label(&self.label)))) + .with(Node::leaf( + "device", + Observed::value(Value::Bool(self.device_is_the_cases)), + )) + .with(Node::leaf( + "max_total_threads_per_threadgroup", + Observed::value(Value::Uint(self.max_total_threads_per_threadgroup)), + )) + .with(Node::leaf( + "threadgroup_size_matches_tile_size", + Observed::value(Value::Bool(self.threadgroup_size_matches_tile_size)), + )) + .with(Node::leaf( + "imageblock_sample_length", + Observed::value(optional(self.imageblock_sample_length)), + )) + .with(Node::leaf( + "imageblock_memory_length", + Observed::value(optional(self.imageblock_memory_length)), + )) + .with(Node::leaf( + "support_indirect_command_buffers", + Observed::value(Value::Bool(self.support_indirect_command_buffers)), + )) + .with(Node::leaf( + "required_threads_per_tile_threadgroup", + Observed::value(size(&self.required_threads_per_tile_threadgroup)), + )) + } +} diff --git a/crates/metal2vulkan-conformance/src/render.rs b/crates/metal2vulkan-conformance/src/render.rs index 4aede7cbc..58937fac6 100644 --- a/crates/metal2vulkan-conformance/src/render.rs +++ b/crates/metal2vulkan-conformance/src/render.rs @@ -552,6 +552,11 @@ pub struct RenderPipelineSpec<'a> { /// `rasterizationEnabled`. A `vertex void` function has no position to rasterize, so its /// pipeline must disable it and must carry no fragment stage. pub rasterization: bool, + /// `label`, which the made state answers back as its own `label`; `None` is Metal's nil. + pub label: Option<&'a str>, + /// `supportIndirectCommandBuffers`: an indirect command buffer's render commands may set the + /// state, which the made state answers back. + pub support_indirect_command_buffers: bool, } impl<'a> RenderPipelineSpec<'a> { @@ -581,9 +586,25 @@ impl<'a> RenderPipelineSpec<'a> { samples: 1, vertex_layout: None, rasterization: true, + label: None, + support_indirect_command_buffers: false, } } + /// The pipeline whose descriptor carries `label`, which the made state answers back. + #[must_use] + pub const fn labelled(mut self, label: &'a str) -> Self { + self.label = Some(label); + self + } + + /// The pipeline whose descriptor sets `supportIndirectCommandBuffers`. + #[must_use] + pub const fn for_indirect_commands(mut self) -> Self { + self.support_indirect_command_buffers = true; + self + } + /// The pipeline of a `vertex void` function that writes its answer through a buffer: its stage /// input fetched under `layout`, rasterization disabled and no fragment stage, which is the /// one shape Metal accepts for such a function. @@ -616,7 +637,8 @@ impl<'a> RenderPipelineSpec<'a> { } /// The words a case's input fingerprint covers: the functions, every attachment, the depth and - /// stencil formats where the pipeline names them, and the sample count. + /// stencil formats where the pipeline names them, the sample count, and the label and the + /// indirect-command support where it states them. pub fn words(&self) -> Vec { let mut bytes = self.vertex.words(); match &self.fragment { @@ -645,6 +667,13 @@ impl<'a> RenderPipelineSpec<'a> { if let Some(layout) = &self.vertex_layout { bytes.extend(layout.words()); } + if let Some(label) = self.label { + bytes.push(0xfd); + bytes.extend(label.as_bytes()); + } + if self.support_indirect_command_buffers { + bytes.push(0xfc); + } bytes } } diff --git a/crates/metal2vulkan-conformance/src/runtime_side.rs b/crates/metal2vulkan-conformance/src/runtime_side.rs index 072369eea..83f68fbc4 100644 --- a/crates/metal2vulkan-conformance/src/runtime_side.rs +++ b/crates/metal2vulkan-conformance/src/runtime_side.rs @@ -21,6 +21,10 @@ use crate::function_bindings::{ ArrayFacts, BindingFacts, BufferFacts, MemberFacts, PointerFacts, ReferenceFacts, StructFacts, TextureFacts, ThreadgroupFacts, TypeFacts, DEPTH, }; +use crate::function_facts::{ + AttributeFacts, ConstantAt, ConstantFacts, ConstantValue, FunctionFacts, +}; +use crate::pipeline_facts::{ComputeStateFacts, ComputeStateSpec, RenderStateFacts}; use crate::queue_slots::QueueSlots; use crate::render::{ ColorState, RenderPass, RenderPipelineSpec, RenderStep, RenderWork, StageFunction, TargetSpec, @@ -422,6 +426,10 @@ pub(crate) struct PipelineFields { pub raster_sample_count: u32, pub rasterization_enabled: bool, pub vertex_descriptor: Option, + pub support_indirect_command_buffers: bool, + /// The label the creation's options carry, which is where the runtime takes + /// `MTLRenderPipelineDescriptor.label` from rather than from the descriptor itself. + pub label: Option, } /// [`PipelineFields`] of `spec`: `Err` where the spec names a colour attachment past the eight a @@ -442,6 +450,8 @@ pub(crate) fn pipeline_fields(spec: &RenderPipelineSpec<'_>) -> Answer, } +/// One stage-input attribute of ours, in the vocabulary both sides answer in. +fn our_attribute(attribute: &metal2vulkan::reflection::Attribute) -> AttributeFacts { + AttributeFacts { + name: attribute.name().to_owned(), + attribute_index: attribute.attribute_index(), + attribute_type: attribute.attribute_type(), + active: attribute.is_active(), + patch_data: attribute.is_patch_data(), + patch_control_point_data: attribute.is_patch_control_point_data(), + } +} + +/// The constant values the case states, as the runtime's `MTLFunctionConstantValues`. +/// +/// The runtime holds values by index and by name, which is the two single setters; a range is +/// **expanded** into one value an index from its first, which is what +/// `setConstantValues:type:withRange:` means. The bytes are split by the type's own size, so a +/// range of three `bool`s is three one-byte values at three indices. +fn our_constants(values: &[ConstantValue]) -> metal2vulkan::library::FunctionConstantValues { + let mut built = metal2vulkan::library::FunctionConstantValues::defaults(); + for value in values { + let one = |bytes: &[u8]| { + metal2vulkan::library::FunctionConstantValue::new(value.data_type, bytes.to_vec()) + }; + match &value.at { + ConstantAt::Index(index) => built = built.with_index(*index, one(&value.bytes)), + ConstantAt::Name(name) => built = built.with_name(name.clone(), one(&value.bytes)), + ConstantAt::Range { first, count } => { + let count = *count as usize; + let each = match count { + 0 => 0, + count => value.bytes.len() / count, + }; + for step in 0..count { + let at = step * each; + built = built.with_index( + first + step as u32, + one(&value.bytes[at..at.saturating_add(each).min(value.bytes.len())]), + ); + } + } + } + } + built +} + /// One reflected binding of ours, in the vocabulary both sides answer in. /// /// The kind-specific fields come from the subprotocol the binding conforms to, which the runtime @@ -1313,6 +1369,143 @@ impl Side for RuntimeSide<'_> { Ok(reflection.bindings().iter().map(our_binding).collect()) } + fn compute_pipeline_with_descriptor( + &mut self, + library: Handle, + spec: &ComputeStateSpec<'_>, + ) -> Answer { + let library = self + .libraries + .get(library.0 as usize) + .ok_or_else(|| Failure::named("NoSuchHandle", format!("library {}", library.0)))?; + let function = library + .new_function_with_name(spec.entry) + .map_err(|error| Failure::of(&error))?; + let mut descriptor = metal2vulkan::pipeline::ComputePipelineDescriptor::new( + StageSource::Function(function.function_descriptor()), + ); + descriptor.support_indirect_command_buffers = spec.support_indirect_command_buffers; + descriptor.required_threads_per_threadgroup = spec.required_threads_per_threadgroup; + // The label is the creation's option rather than the descriptor's field, which is where + // the runtime takes `MTLComputePipelineDescriptor.label` from. + let mut options = PipelineOptions::default(); + options.label = spec.label.map(str::to_owned); + let state = self + .device + .new_compute_pipeline_state(&descriptor, &options) + .map_err(|error| Failure::of(&error))?; + Ok(keep(&mut self.pipelines, state)) + } + + fn compute_pipeline_facts( + &mut self, + state: Handle, + imageblock: [u32; 3], + ) -> Answer { + let registry = self.device.registry_id(); + let state = self + .pipelines + .get(state.0 as usize) + .ok_or_else(|| Failure::named("NoSuchHandle", format!("pipeline {}", state.0)))?; + let required = state.required_threads_per_threadgroup(); + Ok(ComputeStateFacts { + label: state.label().map(str::to_owned), + // The registry ID is each host's own number, so only the **comparison** is portable. + device_is_the_cases: state.device().registry_id() == registry, + static_threadgroup_memory_length: u64::from(state.static_threadgroup_memory_length()), + support_indirect_command_buffers: state.support_indirect_command_buffers(), + imageblock_memory_length: state + .imageblock_memory_length_for_dimensions(size(imageblock)), + required_threads_per_threadgroup: [required.width, required.height, required.depth], + }) + } + + fn render_pipeline_facts( + &mut self, + state: Handle, + imageblock: [u32; 3], + ) -> Answer { + let registry = self.device.registry_id(); + let state = self + .render_pipelines + .get(state.0 as usize) + .ok_or_else(|| Failure::named("NoSuchHandle", format!("pipeline {}", state.0)))?; + let required = state.required_threads_per_tile_threadgroup(); + Ok(RenderStateFacts { + label: state.label().map(str::to_owned), + device_is_the_cases: state.device().registry_id() == registry, + max_total_threads_per_threadgroup: u64::from(state.max_total_threads_per_threadgroup()), + threadgroup_size_matches_tile_size: state.threadgroup_size_matches_tile_size(), + imageblock_sample_length: state.imageblock_sample_length().ok(), + imageblock_memory_length: state + .imageblock_memory_length_for_dimensions(size(imageblock)) + .ok(), + support_indirect_command_buffers: state.support_indirect_command_buffers(), + required_threads_per_tile_threadgroup: [ + required.width, + required.height, + required.depth, + ], + }) + } + + fn function_facts( + &mut self, + library: Handle, + entry: &str, + constants: &[ConstantValue], + ) -> Answer { + let registry = self.device.registry_id(); + let library = self + .libraries + .get(library.0 as usize) + .ok_or_else(|| Failure::named("NoSuchHandle", format!("library {}", library.0)))?; + let function = match constants.is_empty() { + true => library.new_function_with_name(entry), + false => { + library.new_function_with_name_constant_values(entry, &our_constants(constants)) + } + } + .map_err(|error| Failure::of(&error))?; + let dictionary = function + .function_constants_dictionary() + .map_err(|error| Failure::of(&error))?; + Ok(FunctionFacts { + name: function.name().to_owned(), + function_type: function + .function_type() + .map_err(|error| Failure::of(&error))?, + patch_type: function.patch_type().map_err(|error| Failure::of(&error))?, + patch_control_point_count: function + .patch_control_point_count() + .map_err(|error| Failure::of(&error))?, + vertex_attributes: function + .vertex_attributes() + .map_err(|error| Failure::of(&error))? + .map(|held| held.iter().map(our_attribute).collect()), + stage_input_attributes: function + .stage_input_attributes() + .map_err(|error| Failure::of(&error))? + .map(|held| held.iter().map(our_attribute).collect()), + // A `BTreeMap`, so the names are already in the order the Metal side sorts its own + // into: the comparison is of two sorted lists of a dictionary's entries. + constants: dictionary + .iter() + .map(|(name, constant)| ConstantFacts { + name: name.clone(), + data_type: constant.data_type(), + index: constant.index(), + required: constant.is_required(), + }) + .collect(), + options: function.options(), + // The registry ID is each host's own number, so only the **comparison** is portable: + // the two sides agree that the function came from the case's device, never on the + // number that says so. + device_is_the_cases: function.device().registry_id() == registry, + }) + } + fn constant_data_offset(&mut self, encoder: Handle, index: u32) -> Answer { let held = self.held_encoder(encoder)?; let (buffer, arguments) = held.target.ok_or_else(|| { @@ -2219,9 +2412,14 @@ impl Side for RuntimeSide<'_> { descriptor.raster_sample_count = apart.raster_sample_count; descriptor.rasterization_enabled = apart.rasterization_enabled; descriptor.vertex_descriptor = apart.vertex_descriptor; + descriptor.support_indirect_command_buffers = apart.support_indirect_command_buffers; + // The label is the creation's option rather than the descriptor's field, which is where + // the runtime takes `MTLRenderPipelineDescriptor.label` from. + let mut options = PipelineOptions::default(); + options.label = apart.label; let state = self .device - .new_render_pipeline_state(&descriptor, &PipelineOptions::default()) + .new_render_pipeline_state(&descriptor, &options) .map_err(Failure::from_error)?; Ok(keep(&mut self.render_pipelines, state)) } diff --git a/crates/metal2vulkan-conformance/src/tests.rs b/crates/metal2vulkan-conformance/src/tests.rs index bb6a61fc7..2b6f12f55 100644 --- a/crates/metal2vulkan-conformance/src/tests.rs +++ b/crates/metal2vulkan-conformance/src/tests.rs @@ -4530,6 +4530,8 @@ fn the_metal_side_mentions_every_pipeline_field() { "rasterization", "vertex_layout", "colors", + "label", + "support_indirect_command_buffers", ] { assert!( body.contains(field), @@ -4597,6 +4599,8 @@ fn the_runtime_side_forwards_every_field_of_a_pipeline_spec() { attributes: &attributes, layouts: &layouts, }); + spec.label = Some("a-pipeline-spec-label"); + spec.support_indirect_command_buffers = true; assert_ne!( spec.depth_format, spec.stencil_format, "the two formats must differ, or swapping them would pass" @@ -4615,6 +4619,15 @@ fn the_runtime_side_forwards_every_field_of_a_pipeline_spec() { ); assert_eq!(made.raster_sample_count, 4, "samples"); assert!(!made.rasterization_enabled, "rasterization"); + assert_eq!( + made.label.as_deref(), + Some("a-pipeline-spec-label"), + "label" + ); + assert!( + made.support_indirect_command_buffers, + "support_indirect_command_buffers" + ); let first = made.color_attachments[0].expect("color 0"); assert_eq!( diff --git a/crates/metal2vulkan-conformance/src/watch.rs b/crates/metal2vulkan-conformance/src/watch.rs index 978ef3baa..2cc9dfe57 100644 --- a/crates/metal2vulkan-conformance/src/watch.rs +++ b/crates/metal2vulkan-conformance/src/watch.rs @@ -232,6 +232,43 @@ impl Side for Watching { self.inner.encode_argument(encoder, write) } + fn compute_pipeline_with_descriptor( + &mut self, + library: Handle, + spec: &crate::pipeline_facts::ComputeStateSpec<'_>, + ) -> Answer { + let _span = self.watch("compute_pipeline_with_descriptor"); + self.inner.compute_pipeline_with_descriptor(library, spec) + } + + fn compute_pipeline_facts( + &mut self, + state: Handle, + imageblock: [u32; 3], + ) -> Answer { + let _span = self.watch("compute_pipeline_facts"); + self.inner.compute_pipeline_facts(state, imageblock) + } + + fn render_pipeline_facts( + &mut self, + state: Handle, + imageblock: [u32; 3], + ) -> Answer { + let _span = self.watch("render_pipeline_facts"); + self.inner.render_pipeline_facts(state, imageblock) + } + + fn function_facts( + &mut self, + library: Handle, + entry: &str, + constants: &[crate::function_facts::ConstantValue], + ) -> Answer { + let _span = self.watch("function_facts"); + self.inner.function_facts(library, entry, constants) + } + fn compute_pipeline_bindings( &mut self, library: Handle, diff --git a/docs/CONFORMANCE-COVERAGE.md b/docs/CONFORMANCE-COVERAGE.md index 1f2b79f69..84c60b61b 100644 --- a/docs/CONFORMANCE-COVERAGE.md +++ b/docs/CONFORMANCE-COVERAGE.md @@ -10,14 +10,11 @@ The suite reaches Metal through `objc2-metal`, whose Rust name for a binding is Its limits, measured rather than asserted: -- **617 of 723 call sites** in the Metal leg resolve to an item of the SDK. 33 of those resolve because only one type in `objc2-metal` binds the name at all, so no typing was needed. -- **106 call sites' receivers did not type.** They cost the count 6 selectors, which the suite calls and which this attributes to no item: +- **722 of 836 call sites** in the Metal leg resolve to an item of the SDK. 36 of those resolve because only one type in `objc2-metal` binds the name at all, so no typing was needed. +- **114 call sites' receivers did not type.** They cost the count 3 selectors, which the suite calls and which this attributes to no item: - `count`, bound by `MTL4CounterHeap`, `MTL4CounterHeapDescriptor` - `executeCommandsInBuffer:withRange:`, bound by `MTL4ComputeCommandEncoder`, `MTL4RenderCommandEncoder`, `MTLComputeCommandEncoder`, `MTLRenderCommandEncoder` - - `imageblockSampleLength`, bound by `MTL4RenderPassDescriptor`, `MTLRenderPassDescriptor`, `MTLRenderPipelineState` - - `maxTotalThreadsPerThreadgroup`, bound by `MTL4ComputePipelineDescriptor`, `MTL4TileRenderPipelineDescriptor`, `MTLCompileOptions`, `MTLComputePipelineDescriptor`, `MTLComputePipelineState`, `MTLRenderPipelineState`, `MTLTileRenderPipelineDescriptor` - `resourceOptions`, bound by `MTLHeap`, `MTLHeapDescriptor`, `MTLResource`, `MTLTensorDescriptor`, `MTLTextureDescriptor` - - `threadgroupSizeMatchesTileSize`, bound by `MTL4TileRenderPipelineDescriptor`, `MTLRenderPipelineState`, `MTLTileRenderPipelineDescriptor` So every per-item count below is a **floor** by exactly these, and by nothing else that is unmeasured. - **0 call sites typed to a receiver that does not bind the selector sent to it.** The generator fails rather than writing this document if any does, which is what keeps the typing from quietly counting the wrong item. - The unit a call is attributed to is the **case module**, not the case: a module's cases share one `run`, so which of them encodes which step is not a property of the text. Where a module holds one case the two are the same. @@ -28,14 +25,14 @@ Its limits, measured rather than asserted: | | | |---|---| | implemented Metal items | 958 | -| of those, exercised by the suite's Metal leg | 341 | -| of those, not exercised | 617 | -| share exercised | 36% | -| of those exercised, no case reaching it loosens anything | 224 | -| of those exercised, a case reaching it loosens some site | 117 | -| case modules | 88 | -| committed recordings | 739 | -| distinct SDK items the Metal leg calls | 352 | +| of those, exercised by the suite's Metal leg | 398 | +| of those, not exercised | 560 | +| share exercised | 42% | +| of those exercised, no case reaching it loosens anything | 271 | +| of those exercised, a case reaching it loosens some site | 127 | +| case modules | 90 | +| committed recordings | 757 | +| distinct SDK items the Metal leg calls | 403 | | ledger rows (a case whose gap is recorded) | 21 | A tolerance names a **site of a transcript**, not an item, so the last two rows are read as written: a case that loosens one site of its own transcript may compare every other field of it exactly, and this derivation cannot tell which of a case's fields came from which Metal call. Where the distinction matters, read the case. @@ -48,41 +45,36 @@ Every container with an implemented item, by how much of it the suite reaches. | container | implemented | exercised | unexercised | families | |---|---|---|---|---| -| `MTLRenderCommandEncoder` | 119 | 23 | 96 | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`… | -| `MTLDevice` | 63 | 26 | 37 | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`… | -| `MTLRenderPipelineDescriptor` | 35 | 8 | 27 | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`… | +| `MTLRenderCommandEncoder` | 119 | 27 | 92 | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`… | +| `MTLDevice` | 63 | 27 | 36 | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`… | +| `MTLRenderPipelineDescriptor` | 35 | 10 | 25 | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`… | | `MTLIndirectRenderCommand` | 23 | 0 | 23 | | | `MTLArgument` | 17 | 0 | 17 | | -| `MTLComputeCommandEncoder` | 36 | 20 | 16 | `compute_encoder_commands`, `compute_render_chains`, `extended_range_blends`, `extended_range_targets`… | -| `MTLRenderPipelineState` | 15 | 0 | 15 | | -| `MTLComputePipelineDescriptor` | 16 | 2 | 14 | `stage_in_regions` | -| `MTLComputePipelineState` | 15 | 1 | 14 | `compute_threadgroups` | +| `MTLComputeCommandEncoder` | 36 | 22 | 14 | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`… | | `MTLIndirectCommandBufferDescriptor` | 19 | 5 | 14 | `mesh_commands` | | `MTLMeshRenderPipelineDescriptor` | 18 | 5 | 13 | `mesh_barriers`, `mesh_commands`, `mesh_draws` | | the header's free functions | 12 | 0 | 12 | | | `MTLIndirectComputeCommand` | 12 | 0 | 12 | | -| `MTLFunction` | 12 | 1 | 11 | `argument_encoders` | +| `MTLComputePipelineDescriptor` | 16 | 5 | 11 | `pipeline_facts`, `stage_in_regions` | | `MTLHeap` | 17 | 6 | 11 | `compressed_moves`, `sparse_heaps`, `texture_fills`, `two_plane_copies`… | | `MTLTileRenderPipelineDescriptor` | 15 | 4 | 11 | `tile_threadgroups` | -| `MTLLibrary` | 11 | 1 | 10 | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`… | | `MTLRasterizationRateLayerDescriptor` | 10 | 0 | 10 | | -| `MTLTexture` | 29 | 19 | 10 | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`… | -| `MTLRenderPassDescriptor` | 17 | 8 | 9 | `buffer_depth_samples`, `buffer_target_clears`, `color_write_masks`, `compute_render_chains`… | +| `MTLComputePipelineState` | 15 | 6 | 9 | `compute_threadgroups`, `pipeline_facts` | +| `MTLLibrary` | 11 | 2 | 9 | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`… | | `MTLResource` | 12 | 3 | 9 | `buffer_textures` | | `MTLSamplerDescriptor` | 16 | 7 | 9 | `argument_encoders`, `border_swizzles`, `chroma_pairs`, `compute_encoder_commands`… | +| `MTLTexture` | 29 | 20 | 9 | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`… | | `MTLCommandBuffer` | 21 | 13 | 8 | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`… | | `MTLRasterizationRateMapDescriptor` | 10 | 2 | 8 | `rate_maps` | -| `MTLAttribute` | 7 | 0 | 7 | | | `MTLBinaryArchive` | 7 | 0 | 7 | | +| `MTLRenderPassDescriptor` | 17 | 10 | 7 | `buffer_depth_samples`, `buffer_target_clears`, `color_write_masks`, `compute_render_chains`… | +| `MTLRenderPipelineState` | 15 | 8 | 7 | `pipeline_facts`, `tile_threadgroups` | | `MTLResourceStateCommandEncoder` | 7 | 0 | 7 | | | `MTLTextureDescriptor` | 19 | 12 | 7 | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`… | -| `MTLVertexAttribute` | 7 | 0 | 7 | | | `MTLLinkedFunctions` | 6 | 0 | 6 | | | `MTLRenderPassAttachmentDescriptor` | 12 | 6 | 6 | `buffer_depth_samples`, `buffer_target_clears`, `color_write_masks`, `compute_render_chains`… | | `MTLTextureViewDescriptor` | 6 | 0 | 6 | | | `MTLDynamicLibrary` | 5 | 0 | 5 | | -| `MTLFunctionConstant` | 5 | 0 | 5 | | -| `MTLFunctionConstantValues` | 5 | 0 | 5 | | | `MTLFunctionDescriptor` | 5 | 0 | 5 | | | `MTLIndirectCommandBuffer` | 6 | 1 | 5 | `mesh_commands` | | `MTLBlitCommandEncoder` | 22 | 18 | 4 | `blit_encoder_commands`, `buffer_blits`, `buffer_depth_samples`, `buffer_texture_blits`… | @@ -91,7 +83,7 @@ Every container with an implemented item, by how much of it the suite reaches. | `MTLRenderPipelineReflection` | 9 | 5 | 4 | `texture_accesses` | | `MTLVisibleFunctionTable` | 4 | 0 | 4 | | | `MTLBuffer` | 6 | 3 | 3 | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`… | -| `MTLCommandQueue` | 4 | 1 | 3 | `blit_encoder_commands`, `buffer_blits`, `buffer_depth_samples`, `buffer_target_clears`… | +| `MTLCommandQueue` | 4 | 1 | 3 | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`… | | `MTLDepthStencilState` | 3 | 0 | 3 | | | `MTLFence` | 3 | 0 | 3 | | | `MTLFunctionHandle` | 3 | 0 | 3 | | @@ -112,6 +104,8 @@ Every container with an implemented item, by how much of it the suite reaches. | `MTLBufferLayoutDescriptorArray` | 3 | 1 | 2 | `stage_in_regions` | | `MTLComputePipelineReflection` | 3 | 1 | 2 | `function_bindings` | | `MTLEvent` | 3 | 1 | 2 | `shared_events` | +| `MTLFunction` | 12 | 10 | 2 | `argument_encoders`, `function_facts` | +| `MTLFunctionConstantValues` | 5 | 3 | 2 | `function_facts` | | `MTLPipelineBufferDescriptor` | 2 | 0 | 2 | | | `MTLRenderPassColorAttachmentDescriptorArray` | 3 | 1 | 2 | `buffer_target_clears`, `color_write_masks`, `compute_render_chains`, `discard_hoist`… | | `MTLRenderPipelineColorAttachmentDescriptorArray` | 3 | 1 | 2 | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`… | @@ -125,12 +119,14 @@ Every container with an implemented item, by how much of it the suite reaches. | `MTLVertexBufferLayoutDescriptorArray` | 3 | 1 | 2 | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`… | | `MTLAllocation` | 1 | 0 | 1 | | | `MTLArrayType` | 9 | 8 | 1 | `function_bindings` | +| `MTLAttribute` | 7 | 6 | 1 | `function_facts` | | `MTLAttributeDescriptor` | 4 | 3 | 1 | `stage_in_regions` | | `MTLBinding` | 7 | 6 | 1 | `function_bindings`, `texture_accesses` | | `MTLBufferBinding` | 6 | 5 | 1 | `function_bindings` | | `MTLBufferLayoutDescriptor` | 4 | 3 | 1 | `stage_in_regions` | -| `MTLCommandEncoder` | 2 | 1 | 1 | `buffer_depth_samples`, `buffer_target_clears`, `color_write_masks`, `compute_encoder_commands`… | +| `MTLCommandEncoder` | 2 | 1 | 1 | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`… | | `MTLDepthStencilDescriptor` | 5 | 4 | 1 | `shader_stencil`, `srgb_fetch`, `visibility` | +| `MTLFunctionConstant` | 5 | 4 | 1 | `function_facts` | | `MTLPointerType` | 8 | 7 | 1 | `function_bindings` | | `MTLRenderPassColorAttachmentDescriptor` | 2 | 1 | 1 | `buffer_target_clears`, `color_write_masks`, `compute_render_chains`, `discard_hoist`… | | `MTLRenderPassDepthAttachmentDescriptor` | 3 | 2 | 1 | `buffer_depth_samples`, `buffer_target_clears`, `color_write_masks`, `compute_render_chains`… | @@ -143,6 +139,7 @@ Every container with an implemented item, by how much of it the suite reaches. | `MTLTextureReferenceType` | 5 | 4 | 1 | `function_bindings` | | `MTLThreadgroupBinding` | 3 | 2 | 1 | `function_bindings` | | `MTLTileRenderPipelineColorAttachmentDescriptor` | 2 | 1 | 1 | `tile_threadgroups` | +| `MTLVertexAttribute` | 7 | 6 | 1 | `function_facts` | | `MTLVertexAttributeDescriptor` | 4 | 3 | 1 | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`… | | `MTLVertexBufferLayoutDescriptor` | 4 | 3 | 1 | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`… | @@ -152,18 +149,18 @@ A container is one Objective-C type; the SDK header it sits in is the family of | header | implemented | exercised | unexercised | |---|---|---|---| -| `MTLRenderCommandEncoder.h` | 119 | 23 | 96 | -| `MTLRenderPipeline.h` | 114 | 34 | 80 | -| `MTLLibrary.h` | 45 | 2 | 43 | -| `MTLDevice.h` | 73 | 32 | 41 | +| `MTLRenderCommandEncoder.h` | 119 | 27 | 92 | +| `MTLRenderPipeline.h` | 114 | 44 | 70 | +| `MTLDevice.h` | 73 | 33 | 40 | | `MTLIndirectCommandEncoder.h` | 35 | 0 | 35 | | `MTLArgument.h` | 77 | 46 | 31 | -| `MTLComputePipeline.h` | 34 | 4 | 30 | | `MTLRasterizationRate.h` | 37 | 9 | 28 | -| `MTLTexture.h` | 57 | 31 | 26 | -| `MTLRenderPass.h` | 41 | 20 | 21 | +| `MTLTexture.h` | 57 | 32 | 25 | +| `MTLComputePipeline.h` | 34 | 12 | 22 | | `MTLIndirectCommandBuffer.h` | 26 | 6 | 20 | -| `MTLComputeCommandEncoder.h` | 36 | 20 | 16 | +| `MTLRenderPass.h` | 41 | 22 | 19 | +| `MTLLibrary.h` | 45 | 28 | 17 | +| `MTLComputeCommandEncoder.h` | 36 | 22 | 14 | | `MTLHeap.h` | 25 | 11 | 14 | | `MTLSampler.h` | 19 | 8 | 11 | | `MTLBinaryArchive.h` | 9 | 0 | 9 | @@ -178,7 +175,6 @@ A container is one Objective-C type; the SDK header it sits in is the family of | `MTLLinkedFunctions.h` | 6 | 0 | 6 | | `MTLDepthStencil.h` | 15 | 10 | 5 | | `MTLDynamicLibrary.h` | 5 | 0 | 5 | -| `MTLFunctionConstantValues.h` | 5 | 0 | 5 | | `MTLFunctionDescriptor.h` | 5 | 0 | 5 | | `MTLPipeline.h` | 5 | 0 | 5 | | `MTLBlitCommandEncoder.h` | 22 | 18 | 4 | @@ -187,10 +183,11 @@ A container is one Objective-C type; the SDK header it sits in is the family of | `MTLFence.h` | 3 | 0 | 3 | | `MTLFunctionHandle.h` | 3 | 0 | 3 | | `MTLArgumentEncoder.h` | 23 | 21 | 2 | +| `MTLFunctionConstantValues.h` | 5 | 3 | 2 | | `MTLAllocation.h` | 1 | 0 | 1 | | `MTLCommandEncoder.h` | 2 | 1 | 1 | -13 of 37 headers have no exercised item at all, 98 implemented items between them: `MTLAllocation.h`, `MTLBinaryArchive.h`, `MTLDynamicLibrary.h`, `MTLFence.h`, `MTLFunctionConstantValues.h`, `MTLFunctionDescriptor.h`, `MTLFunctionHandle.h`, `MTLIndirectCommandEncoder.h`, `MTLLinkedFunctions.h`, `MTLPipeline.h`, `MTLResourceStateCommandEncoder.h`, `MTLTypes.h`, `MTLVisibleFunctionTable.h`. +12 of 37 headers have no exercised item at all, 93 implemented items between them: `MTLAllocation.h`, `MTLBinaryArchive.h`, `MTLDynamicLibrary.h`, `MTLFence.h`, `MTLFunctionDescriptor.h`, `MTLFunctionHandle.h`, `MTLIndirectCommandEncoder.h`, `MTLLinkedFunctions.h`, `MTLPipeline.h`, `MTLResourceStateCommandEncoder.h`, `MTLTypes.h`, `MTLVisibleFunctionTable.h`. ## Containers with no case at all @@ -201,14 +198,11 @@ An implemented container no case's Metal leg touches. These are the families of | the header's free functions | 12 | `MTLDevice.h` | | `MTLAllocation` | 1 | `MTLAllocation.h` | | `MTLArgument` | 17 | `MTLArgument.h` | -| `MTLAttribute` | 7 | `MTLLibrary.h` | | `MTLBinaryArchive` | 7 | `MTLBinaryArchive.h` | | `MTLBinaryArchiveDescriptor` | 2 | `MTLBinaryArchive.h` | | `MTLDepthStencilState` | 3 | `MTLDepthStencil.h` | | `MTLDynamicLibrary` | 5 | `MTLDynamicLibrary.h` | | `MTLFence` | 3 | `MTLFence.h` | -| `MTLFunctionConstant` | 5 | `MTLLibrary.h` | -| `MTLFunctionConstantValues` | 5 | `MTLFunctionConstantValues.h` | | `MTLFunctionDescriptor` | 5 | `MTLFunctionDescriptor.h` | | `MTLFunctionHandle` | 3 | `MTLFunctionHandle.h` | | `MTLFunctionReflection` | 3 | `MTLLibrary.h` | @@ -222,30 +216,28 @@ An implemented container no case's Metal leg touches. These are the families of | `MTLRasterizationRateLayerDescriptor` | 10 | `MTLRasterizationRate.h` | | `MTLRasterizationRateSampleArray` | 3 | `MTLRasterizationRate.h` | | `MTLRenderPipelineFunctionsDescriptor` | 4 | `MTLRenderPipeline.h` | -| `MTLRenderPipelineState` | 15 | `MTLRenderPipeline.h` | | `MTLResourceStateCommandEncoder` | 7 | `MTLResourceStateCommandEncoder.h` | | `MTLSharedEventHandle` | 2 | `MTLEvent.h` | | `MTLSharedEventListener` | 2 | `MTLEvent.h` | | `MTLSharedTextureHandle` | 2 | `MTLTexture.h` | | `MTLTextureViewDescriptor` | 6 | `MTLTexture.h` | | `MTLType` | 2 | `MTLArgument.h` | -| `MTLVertexAttribute` | 7 | `MTLLibrary.h` | | `MTLVisibleFunctionTable` | 4 | `MTLVisibleFunctionTable.h` | | `MTLVisibleFunctionTableDescriptor` | 3 | `MTLVisibleFunctionTable.h` | -34 containers, 197 implemented items. +29 containers, 158 implemented items. ## The suite's shape | | | |---|---| -| case modules | 88 | -| committed recordings | 739 | +| case modules | 90 | +| committed recordings | 757 | | recorded runs behind a case, median | 3 | | recorded runs, least and most | 1 and 30 | | cases whose recording holds more than one outcome | 0 | -| cases running a committed shader fixture | 396 | -| cases whose Metal answer is `metal_run` | 655 | +| cases running a committed shader fixture | 414 | +| cases whose Metal answer is `metal_run` | 673 | | cases whose Metal answer is `carried` | 80 | | cases whose Metal answer is `never_returned` | 4 | | modules that loosen a measured value | 11 | @@ -254,14 +246,14 @@ An implemented container no case's Metal leg touches. These are the families of | loosenings used | `Unchecked`, `Absolute`, `Ulps` | | justifications named | `Degradation`, `AcceptedDifference` | | modules forbidding a re-record | 8 | -| `Side` methods (the suite's whole device vocabulary) | 70 | -| `Side` methods the Metal leg reaches an SDK item through | 56 | -| SDK items a case's Metal leg reaches, median | 34 | -| the same, least and most | 0 and 87 | -| Metal call sites in the leg | 723 | -| distinct selectors the leg sends | 311 | -| of those, resolved to an item of the coverage map | 305 | -| oracles the recordings name | `apple-m3-max` ×739 | +| `Side` methods (the suite's whole device vocabulary) | 74 | +| `Side` methods the Metal leg reaches an SDK item through | 69 | +| SDK items a case's Metal leg reaches, median | 42 | +| the same, least and most | 0 and 91 | +| Metal call sites in the leg | 836 | +| distinct selectors the leg sends | 337 | +| of those, resolved to an item of the coverage map | 334 | +| oracles the recordings name | `apple-m3-max` ×757 | ## By family @@ -269,94 +261,96 @@ Each case module: the cases it holds, the `Side` methods it calls, and how many | family | cases | Metal ran | compared | items reached | |---|---|---|---|---| -| `argument_encoders` | 5 | 5 | every field | 49 | -| `astc_textures` | 28 | 28 | 1 tolerance(s): `Degradation` | 22 | -| `blit_encoder_commands` | 9 | 9 | every field | 47 | -| `border_swizzles` | 8 | 8 | 1 tolerance(s): `Degradation` | 30 | -| `buffer_blits` | 4 | 4 | every field | 15 | -| `buffer_depth_samples` | 5 | 5 | every field | 40 | +| `argument_encoders` | 5 | 5 | every field | 58 | +| `astc_textures` | 28 | 28 | 1 tolerance(s): `Degradation` | 31 | +| `blit_encoder_commands` | 9 | 9 | every field | 56 | +| `border_swizzles` | 8 | 8 | 1 tolerance(s): `Degradation` | 39 | +| `buffer_blits` | 4 | 4 | every field | 27 | +| `buffer_depth_samples` | 5 | 5 | every field | 50 | | `buffer_target_clears` | 6 | 6 | every field | 36 | -| `buffer_texture_blits` | 2 | 2 | every field | 30 | -| `buffer_textures` | 3 | 2 | every field | 41 | -| `chroma_pairs` | 6 | 6 | every field | 41 | -| `color_write_masks` | 3 | 3 | every field | 69 | +| `buffer_texture_blits` | 2 | 2 | every field | 39 | +| `buffer_textures` | 3 | 2 | every field | 51 | +| `chroma_pairs` | 6 | 6 | every field | 49 | +| `color_write_masks` | 3 | 3 | every field | 73 | | `command_queues` | 1 | 1 | every field | 3 | -| `compressed_blits` | 4 | 4 | every field | 32 | -| `compressed_decode` | 10 | 10 | 1 tolerance(s): `Degradation` | 22 | -| `compressed_moves` | 14 | 14 | every field | 16 | -| `compressed_views` | 14 | 14 | every field | 30 | +| `compressed_blits` | 4 | 4 | every field | 41 | +| `compressed_decode` | 10 | 10 | 1 tolerance(s): `Degradation` | 31 | +| `compressed_moves` | 14 | 14 | every field | 28 | +| `compressed_views` | 14 | 14 | every field | 39 | | `compute_encoder_commands` | 8 | 8 | every field | 44 | -| `compute_render_chains` | 3 | 3 | every field | 86 | -| `compute_threadgroups` | 2 | 1 | every field | 8 | -| `denormal_word_fetches` | 1 | 1 | every field | 22 | -| `depth_texel_reads` | 1 | 1 | every field | 19 | -| `discard_hoist` | 1 | 1 | 1 tolerance(s): `Degradation` | 80 | -| `draw_state_changes` | 1 | 1 | every field | 82 | -| `etc_textures` | 10 | 10 | 2 tolerance(s): `Degradation` | 22 | +| `compute_render_chains` | 3 | 3 | every field | 90 | +| `compute_threadgroups` | 2 | 1 | every field | 17 | +| `denormal_word_fetches` | 1 | 1 | every field | 31 | +| `depth_texel_reads` | 1 | 1 | every field | 28 | +| `discard_hoist` | 1 | 1 | 1 tolerance(s): `Degradation` | 84 | +| `draw_state_changes` | 1 | 1 | every field | 86 | +| `etc_textures` | 10 | 10 | 2 tolerance(s): `Degradation` | 31 | | `event_orders` | 4 | 4 | every field | 17 | -| `extended_range_blends` | 18 | 18 | every field | 75 | -| `extended_range_planes` | 4 | 4 | every field | 4 | -| `extended_range_targets` | 22 | 22 | every field | 75 | -| `extended_range_two_planes` | 2 | 2 | every field | 11 | -| `extended_swizzles` | 15 | 15 | every field | 30 | -| `fetch_ordered` | 4 | 4 | every field | 69 | -| `format_copies` | 16 | 16 | every field | 31 | -| `frame_chains` | 1 | 1 | every field | 86 | -| `fresh_contents` | 87 | 87 | every field | 33 | +| `extended_range_blends` | 18 | 18 | every field | 82 | +| `extended_range_planes` | 4 | 4 | every field | 18 | +| `extended_range_targets` | 22 | 22 | every field | 79 | +| `extended_range_two_planes` | 2 | 2 | every field | 20 | +| `extended_swizzles` | 15 | 15 | every field | 39 | +| `fetch_ordered` | 4 | 4 | every field | 74 | +| `format_copies` | 16 | 16 | every field | 40 | +| `frame_chains` | 1 | 1 | every field | 88 | +| `fresh_contents` | 87 | 87 | every field | 42 | | `function_bindings` | 3 | 3 | every field | 49 | -| `half_output_blends` | 6 | 6 | every field | 69 | -| `half_read_nans` | 6 | 6 | every field | 19 | -| `half_storage_writes` | 9 | 9 | every field | 11 | -| `half_texel_nans` | 8 | 8 | every field | 11 | -| `half_write_nans` | 7 | 7 | every field | 6 | +| `function_facts` | 12 | 12 | every field | 31 | +| `half_output_blends` | 6 | 6 | every field | 74 | +| `half_read_nans` | 6 | 6 | every field | 28 | +| `half_storage_writes` | 9 | 9 | every field | 21 | +| `half_texel_nans` | 8 | 8 | every field | 20 | +| `half_write_nans` | 7 | 7 | every field | 20 | | `handler_waits` | 3 | 0 | every field | 0 | | `heap_metal_sizes` | 7 | 7 | every field | 12 | | `indirect_private_types` | 1 | 0 | every field | 0 | -| `int_attributes` | 1 | 1 | every field | 63 | -| `level_sizes` | 2 | 2 | every field | 22 | -| `math_routines` | 2 | 2 | every field | 7 | -| `mesh_barriers` | 2 | 2 | every field | 30 | -| `mesh_commands` | 2 | 2 | 1 tolerance(s): `AcceptedDifference` | 31 | -| `mesh_draws` | 6 | 6 | every field | 27 | -| `nearest_positions` | 1 | 1 | every field | 19 | -| `norm_storage_writes` | 7 | 7 | every field | 23 | -| `pass_bytes` | 4 | 4 | 1 tolerance(s): `Degradation` | 7 | -| `pixel_downscales` | 7 | 7 | every field | 21 | -| `pixel_samplers` | 16 | 16 | every field | 21 | -| `pvrtc_cpu_order` | 6 | 6 | every field | 31 | -| `pvrtc_rows` | 8 | 8 | every field | 31 | +| `int_attributes` | 1 | 1 | every field | 65 | +| `level_sizes` | 2 | 2 | every field | 31 | +| `math_routines` | 2 | 2 | every field | 16 | +| `mesh_barriers` | 2 | 2 | every field | 31 | +| `mesh_commands` | 2 | 2 | 1 tolerance(s): `AcceptedDifference` | 32 | +| `mesh_draws` | 6 | 6 | every field | 28 | +| `nearest_positions` | 1 | 1 | every field | 28 | +| `norm_storage_writes` | 7 | 7 | every field | 33 | +| `pass_bytes` | 4 | 4 | 1 tolerance(s): `Degradation` | 16 | +| `pipeline_facts` | 6 | 6 | every field | 52 | +| `pixel_downscales` | 7 | 7 | every field | 30 | +| `pixel_samplers` | 16 | 16 | every field | 30 | +| `pvrtc_cpu_order` | 6 | 6 | every field | 40 | +| `pvrtc_rows` | 8 | 8 | every field | 40 | | `rate_maps` | 2 | 2 | every field | 13 | -| `render_chains` | 3 | 3 | every field | 80 | -| `rgb10a2_srgb` | 8 | 8 | every field | 37 | -| `rotated_planes` | 20 | 20 | 1 tolerance(s): `Degradation` | 70 | -| `rotated_targets` | 14 | 14 | every field | 70 | +| `render_chains` | 3 | 3 | every field | 84 | +| `rgb10a2_srgb` | 8 | 8 | every field | 46 | +| `rotated_planes` | 20 | 20 | 1 tolerance(s): `Degradation` | 73 | +| `rotated_targets` | 14 | 14 | every field | 75 | | `sample_fills` | 17 | 0 | 1 tolerance(s): `Degradation` | 0 | -| `sample_positions` | 19 | 16 | every field | 69 | +| `sample_positions` | 19 | 16 | every field | 73 | | `scheduled_handlers` | 1 | 1 | every field | 11 | -| `shader_stencil` | 2 | 2 | every field | 83 | +| `shader_stencil` | 2 | 2 | every field | 87 | | `shared_events` | 1 | 1 | every field | 8 | -| `shared_exponent_storage` | 5 | 5 | every field | 22 | -| `simdgroup_lockstep` | 2 | 2 | every field | 7 | -| `snorm_tile_store` | 7 | 7 | 1 tolerance(s): `Degradation` | 69 | +| `shared_exponent_storage` | 5 | 5 | every field | 32 | +| `simdgroup_lockstep` | 2 | 2 | every field | 16 | +| `snorm_tile_store` | 7 | 7 | 1 tolerance(s): `Degradation` | 73 | | `sparse_heaps` | 6 | 6 | every field | 22 | | `sparse_tiles` | 4 | 4 | every field | 4 | -| `srgb_fetch` | 2 | 2 | every field | 81 | -| `stage_in_regions` | 1 | 1 | every field | 21 | +| `srgb_fetch` | 2 | 2 | every field | 86 | +| `stage_in_regions` | 1 | 1 | every field | 32 | | `surface_fills` | 1 | 0 | every field | 0 | -| `swizzled_storage` | 6 | 6 | every field | 22 | -| `texel_swizzles` | 6 | 6 | every field | 22 | +| `swizzled_storage` | 6 | 6 | every field | 33 | +| `texel_swizzles` | 6 | 6 | every field | 31 | | `texture_accesses` | 1 | 1 | every field | 13 | | `texture_buffer_fills` | 3 | 0 | every field | 0 | -| `texture_fills` | 54 | 2 | 1 tolerance(s): `Degradation` | 34 | -| `textures` | 75 | 75 | every field | 4 | -| `tile_threadgroups` | 8 | 8 | every field | 15 | -| `two_plane_copies` | 3 | 1 | every field | 34 | -| `two_plane_heap_blits` | 1 | 1 | every field | 32 | -| `two_plane_samples` | 16 | 16 | every field | 19 | -| `visibility` | 10 | 10 | every field | 83 | -| `wide_points` | 1 | 1 | every field | 70 | -| `ycbcr_minify` | 2 | 2 | every field | 22 | -| `ycbcr_textures` | 2 | 2 | every field | 20 | +| `texture_fills` | 54 | 2 | 1 tolerance(s): `Degradation` | 43 | +| `textures` | 75 | 75 | every field | 5 | +| `tile_threadgroups` | 8 | 8 | every field | 33 | +| `two_plane_copies` | 3 | 1 | every field | 43 | +| `two_plane_heap_blits` | 1 | 1 | every field | 41 | +| `two_plane_samples` | 16 | 16 | every field | 28 | +| `visibility` | 10 | 10 | every field | 85 | +| `wide_points` | 1 | 1 | every field | 74 | +| `ycbcr_minify` | 2 | 2 | every field | 31 | +| `ycbcr_textures` | 2 | 2 | every field | 29 | ## Every implemented item @@ -467,12 +461,12 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | item | exercised | families | cases Metal ran | |---|---|---|---| | `MTLAttribute` | no | — | — | -| `name` | no | — | — | -| `attributeIndex` | no | — | — | -| `attributeType` | no | — | — | -| `active` | no | — | — | -| `patchData` | no | — | — | -| `patchControlPointData` | no | — | — | +| `name` | yes | `function_facts` | 12 | +| `attributeIndex` | yes | `function_facts` | 12 | +| `attributeType` | yes | `function_facts` | 12 | +| `active` | yes | `function_facts` | 12 | +| `patchData` | yes | `function_facts` | 12 | +| `patchControlPointData` | yes | `function_facts` | 12 | ### `MTLAttributeDescriptor` @@ -532,7 +526,7 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | `copyFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:` | yes | `buffer_texture_blits`, `chroma_pairs`, `compressed_blits`, `format_copies`, `pvrtc_rows`, `two_plane_heap_blits` | 37 | | `copyFromBuffer:sourceOffset:sourceBytesPerRow:sourceBytesPerImage:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:` | yes | `blit_encoder_commands` | 9 | | `copyFromBuffer:sourceOffset:sourceBytesPerRow:sourceBytesPerImage:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:options:` | yes | `blit_encoder_commands`, `buffer_depth_samples`, `chroma_pairs`, `compressed_blits`, `compressed_views`, `format_copies`, `fresh_contents`, `pvrtc_cpu_order`, `pvrtc_rows`, `texture_fills`, `two_plane_copies` | 158 | -| `copyFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toBuffer:destinationOffset:destinationBytesPerRow:destinationBytesPerImage:` | yes | `blit_encoder_commands` | 9 | +| `copyFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toBuffer:destinationOffset:destinationBytesPerRow:destinationBytesPerImage:` | yes | `blit_encoder_commands`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `half_output_blends`, `render_chains`, `rgb10a2_srgb`, `rotated_targets`, `sample_positions`, `shader_stencil`, `srgb_fetch`, `wide_points` | 110 | | `copyFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toBuffer:destinationOffset:destinationBytesPerRow:destinationBytesPerImage:options:` | yes | `blit_encoder_commands`, `buffer_depth_samples`, `chroma_pairs`, `compressed_blits`, `format_copies`, `fresh_contents`, `pvrtc_cpu_order`, `pvrtc_rows`, `texture_fills`, `two_plane_copies` | 144 | | `generateMipmapsForTexture:` | yes | `blit_encoder_commands` | 9 | | `fillBuffer:range:value:` | yes | `blit_encoder_commands`, `buffer_blits`, `event_orders`, `fresh_contents`, `scheduled_handlers` | 105 | @@ -599,16 +593,16 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | `kernelEndTime` | no | — | — | | `GPUStartTime` | no | — | — | | `GPUEndTime` | no | — | — | -| `commit` | yes | `buffer_target_clears`, `color_write_masks`, `compute_encoder_commands`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `event_orders`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `scheduled_handlers`, `shader_stencil`, `shared_events`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 163 | +| `commit` | yes | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_blits`, `buffer_depth_samples`, `buffer_target_clears`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `color_write_masks`, `compressed_blits`, `compressed_decode`, `compressed_moves`, `compressed_views`, `compute_encoder_commands`, `compute_render_chains`, `compute_threadgroups`, `denormal_word_fetches`, `depth_texel_reads`, `discard_hoist`, `draw_state_changes`, `etc_textures`, `event_orders`, `extended_range_blends`, `extended_range_planes`, `extended_range_targets`, `extended_range_two_planes`, `extended_swizzles`, `fetch_ordered`, `format_copies`, `frame_chains`, `fresh_contents`, `half_output_blends`, `half_read_nans`, `half_storage_writes`, `half_texel_nans`, `half_write_nans`, `int_attributes`, `level_sizes`, `math_routines`, `nearest_positions`, `norm_storage_writes`, `pass_bytes`, `pixel_downscales`, `pixel_samplers`, `pvrtc_cpu_order`, `pvrtc_rows`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `scheduled_handlers`, `shader_stencil`, `shared_events`, `shared_exponent_storage`, `simdgroup_lockstep`, `snorm_tile_store`, `srgb_fetch`, `stage_in_regions`, `swizzled_storage`, `texel_swizzles`, `texture_fills`, `two_plane_copies`, `two_plane_heap_blits`, `two_plane_samples`, `visibility`, `wide_points`, `ycbcr_minify`, `ycbcr_textures` | 538 | | `addScheduledHandler:` | yes | `event_orders`, `scheduled_handlers` | 5 | | `waitUntilScheduled` | yes | `scheduled_handlers` | 1 | | `addCompletedHandler:` | yes | `event_orders`, `scheduled_handlers` | 5 | | `waitUntilCompleted` | yes | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_blits`, `buffer_depth_samples`, `buffer_target_clears`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `color_write_masks`, `compressed_blits`, `compressed_decode`, `compressed_moves`, `compressed_views`, `compute_encoder_commands`, `compute_render_chains`, `compute_threadgroups`, `denormal_word_fetches`, `depth_texel_reads`, `discard_hoist`, `draw_state_changes`, `etc_textures`, `extended_range_blends`, `extended_range_planes`, `extended_range_targets`, `extended_range_two_planes`, `extended_swizzles`, `fetch_ordered`, `format_copies`, `frame_chains`, `fresh_contents`, `half_output_blends`, `half_read_nans`, `half_storage_writes`, `half_texel_nans`, `half_write_nans`, `int_attributes`, `level_sizes`, `math_routines`, `nearest_positions`, `norm_storage_writes`, `pass_bytes`, `pixel_downscales`, `pixel_samplers`, `pvrtc_cpu_order`, `pvrtc_rows`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `shared_events`, `shared_exponent_storage`, `simdgroup_lockstep`, `snorm_tile_store`, `srgb_fetch`, `stage_in_regions`, `swizzled_storage`, `texel_swizzles`, `texture_fills`, `two_plane_copies`, `two_plane_heap_blits`, `two_plane_samples`, `visibility`, `wide_points`, `ycbcr_minify`, `ycbcr_textures` | 533 | | `status` | yes | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_blits`, `buffer_depth_samples`, `buffer_target_clears`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `color_write_masks`, `compressed_blits`, `compressed_decode`, `compressed_moves`, `compressed_views`, `compute_encoder_commands`, `compute_render_chains`, `compute_threadgroups`, `denormal_word_fetches`, `depth_texel_reads`, `discard_hoist`, `draw_state_changes`, `etc_textures`, `event_orders`, `extended_range_blends`, `extended_range_planes`, `extended_range_targets`, `extended_range_two_planes`, `extended_swizzles`, `fetch_ordered`, `format_copies`, `frame_chains`, `fresh_contents`, `half_output_blends`, `half_read_nans`, `half_storage_writes`, `half_texel_nans`, `half_write_nans`, `int_attributes`, `level_sizes`, `math_routines`, `nearest_positions`, `norm_storage_writes`, `pass_bytes`, `pixel_downscales`, `pixel_samplers`, `pvrtc_cpu_order`, `pvrtc_rows`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `scheduled_handlers`, `shader_stencil`, `shared_exponent_storage`, `simdgroup_lockstep`, `snorm_tile_store`, `srgb_fetch`, `stage_in_regions`, `swizzled_storage`, `texel_swizzles`, `texture_fills`, `two_plane_copies`, `two_plane_heap_blits`, `two_plane_samples`, `visibility`, `wide_points`, `ycbcr_minify`, `ycbcr_textures` | 537 | | `error` | yes | `buffer_target_clears`, `color_write_masks`, `compute_encoder_commands`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 149 | -| `blitCommandEncoder` | yes | `blit_encoder_commands`, `buffer_blits`, `buffer_depth_samples`, `buffer_texture_blits`, `chroma_pairs`, `compressed_blits`, `compressed_views`, `event_orders`, `format_copies`, `fresh_contents`, `pvrtc_cpu_order`, `pvrtc_rows`, `scheduled_handlers`, `texture_fills`, `two_plane_copies`, `two_plane_heap_blits` | 170 | -| `renderCommandEncoderWithDescriptor:` | yes | `buffer_depth_samples`, `buffer_target_clears`, `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 164 | -| `computeCommandEncoder` | yes | `compute_encoder_commands`, `compute_render_chains`, `extended_range_blends`, `extended_range_targets`, `frame_chains` | 52 | +| `blitCommandEncoder` | yes | `blit_encoder_commands`, `buffer_blits`, `buffer_depth_samples`, `buffer_texture_blits`, `chroma_pairs`, `compressed_blits`, `compressed_views`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `event_orders`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `format_copies`, `fresh_contents`, `half_output_blends`, `pvrtc_cpu_order`, `pvrtc_rows`, `render_chains`, `rgb10a2_srgb`, `rotated_targets`, `sample_positions`, `scheduled_handlers`, `shader_stencil`, `srgb_fetch`, `texture_fills`, `two_plane_copies`, `two_plane_heap_blits`, `wide_points` | 271 | +| `renderCommandEncoderWithDescriptor:` | yes | `buffer_depth_samples`, `buffer_target_clears`, `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `tile_threadgroups`, `visibility`, `wide_points` | 172 | +| `computeCommandEncoder` | yes | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_blits`, `buffer_depth_samples`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `compressed_blits`, `compressed_decode`, `compressed_moves`, `compressed_views`, `compute_encoder_commands`, `compute_render_chains`, `compute_threadgroups`, `denormal_word_fetches`, `depth_texel_reads`, `etc_textures`, `extended_range_blends`, `extended_range_planes`, `extended_range_targets`, `extended_range_two_planes`, `extended_swizzles`, `format_copies`, `frame_chains`, `fresh_contents`, `half_read_nans`, `half_storage_writes`, `half_texel_nans`, `half_write_nans`, `level_sizes`, `math_routines`, `nearest_positions`, `norm_storage_writes`, `pass_bytes`, `pixel_downscales`, `pixel_samplers`, `pvrtc_cpu_order`, `pvrtc_rows`, `rgb10a2_srgb`, `shared_exponent_storage`, `simdgroup_lockstep`, `stage_in_regions`, `swizzled_storage`, `texel_swizzles`, `texture_fills`, `two_plane_copies`, `two_plane_heap_blits`, `two_plane_samples`, `ycbcr_minify`, `ycbcr_textures` | 435 | | `computeCommandEncoderWithDispatchType:` | yes | `compute_encoder_commands` | 8 | | `encodeWaitForEvent:value:` | yes | `event_orders` | 4 | | `encodeSignalEvent:value:` | yes | `event_orders`, `shared_events` | 5 | @@ -619,7 +613,7 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | item | exercised | families | cases Metal ran | |---|---|---|---| | `MTLCommandEncoder` | no | — | — | -| `endEncoding` | yes | `buffer_depth_samples`, `buffer_target_clears`, `color_write_masks`, `compute_encoder_commands`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `event_orders`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `scheduled_handlers`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 167 | +| `endEncoding` | yes | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_blits`, `buffer_depth_samples`, `buffer_target_clears`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `color_write_masks`, `compressed_blits`, `compressed_decode`, `compressed_moves`, `compressed_views`, `compute_encoder_commands`, `compute_render_chains`, `compute_threadgroups`, `denormal_word_fetches`, `depth_texel_reads`, `discard_hoist`, `draw_state_changes`, `etc_textures`, `event_orders`, `extended_range_blends`, `extended_range_planes`, `extended_range_targets`, `extended_range_two_planes`, `extended_swizzles`, `fetch_ordered`, `format_copies`, `frame_chains`, `fresh_contents`, `half_output_blends`, `half_read_nans`, `half_storage_writes`, `half_texel_nans`, `half_write_nans`, `int_attributes`, `level_sizes`, `math_routines`, `nearest_positions`, `norm_storage_writes`, `pass_bytes`, `pixel_downscales`, `pixel_samplers`, `pvrtc_cpu_order`, `pvrtc_rows`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `scheduled_handlers`, `shader_stencil`, `shared_exponent_storage`, `simdgroup_lockstep`, `snorm_tile_store`, `srgb_fetch`, `stage_in_regions`, `swizzled_storage`, `texel_swizzles`, `texture_fills`, `two_plane_copies`, `two_plane_heap_blits`, `two_plane_samples`, `visibility`, `wide_points`, `ycbcr_minify`, `ycbcr_textures` | 537 | ### `MTLCommandQueue` @@ -628,7 +622,7 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | `MTLCommandQueue` | no | — | — | | `label` | no | — | — | | `device` | no | — | — | -| `commandBuffer` | yes | `blit_encoder_commands`, `buffer_blits`, `buffer_depth_samples`, `buffer_target_clears`, `buffer_texture_blits`, `chroma_pairs`, `color_write_masks`, `command_queues`, `compressed_blits`, `compressed_views`, `compute_encoder_commands`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `event_orders`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `format_copies`, `frame_chains`, `fresh_contents`, `half_output_blends`, `int_attributes`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `pvrtc_cpu_order`, `pvrtc_rows`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `scheduled_handlers`, `shader_stencil`, `shared_events`, `snorm_tile_store`, `srgb_fetch`, `texture_fills`, `two_plane_copies`, `two_plane_heap_blits`, `visibility`, `wide_points` | 339 | +| `commandBuffer` | yes | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_blits`, `buffer_depth_samples`, `buffer_target_clears`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `color_write_masks`, `command_queues`, `compressed_blits`, `compressed_decode`, `compressed_moves`, `compressed_views`, `compute_encoder_commands`, `compute_render_chains`, `compute_threadgroups`, `denormal_word_fetches`, `depth_texel_reads`, `discard_hoist`, `draw_state_changes`, `etc_textures`, `event_orders`, `extended_range_blends`, `extended_range_planes`, `extended_range_targets`, `extended_range_two_planes`, `extended_swizzles`, `fetch_ordered`, `format_copies`, `frame_chains`, `fresh_contents`, `half_output_blends`, `half_read_nans`, `half_storage_writes`, `half_texel_nans`, `half_write_nans`, `int_attributes`, `level_sizes`, `math_routines`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `nearest_positions`, `norm_storage_writes`, `pass_bytes`, `pixel_downscales`, `pixel_samplers`, `pvrtc_cpu_order`, `pvrtc_rows`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `scheduled_handlers`, `shader_stencil`, `shared_events`, `shared_exponent_storage`, `simdgroup_lockstep`, `snorm_tile_store`, `srgb_fetch`, `stage_in_regions`, `swizzled_storage`, `texel_swizzles`, `texture_fills`, `tile_threadgroups`, `two_plane_copies`, `two_plane_heap_blits`, `two_plane_samples`, `visibility`, `wide_points`, `ycbcr_minify`, `ycbcr_textures` | 557 | ### `MTLComputeCommandEncoder` @@ -636,9 +630,9 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised |---|---|---|---| | `MTLComputeCommandEncoder` | no | — | — | | `dispatchType` | yes | `compute_encoder_commands` | 8 | -| `setComputePipelineState:` | yes | `compute_encoder_commands`, `compute_render_chains`, `extended_range_blends`, `extended_range_targets`, `frame_chains` | 52 | +| `setComputePipelineState:` | yes | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_blits`, `buffer_depth_samples`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `compressed_blits`, `compressed_decode`, `compressed_moves`, `compressed_views`, `compute_encoder_commands`, `compute_render_chains`, `compute_threadgroups`, `denormal_word_fetches`, `depth_texel_reads`, `etc_textures`, `extended_range_blends`, `extended_range_planes`, `extended_range_targets`, `extended_range_two_planes`, `extended_swizzles`, `format_copies`, `frame_chains`, `fresh_contents`, `half_read_nans`, `half_storage_writes`, `half_texel_nans`, `half_write_nans`, `level_sizes`, `math_routines`, `nearest_positions`, `norm_storage_writes`, `pass_bytes`, `pixel_downscales`, `pixel_samplers`, `pvrtc_cpu_order`, `pvrtc_rows`, `rgb10a2_srgb`, `shared_exponent_storage`, `simdgroup_lockstep`, `stage_in_regions`, `swizzled_storage`, `texel_swizzles`, `texture_fills`, `two_plane_copies`, `two_plane_heap_blits`, `two_plane_samples`, `ycbcr_minify`, `ycbcr_textures` | 435 | | `setBytes:length:atIndex:` | yes | `compute_encoder_commands` | 8 | -| `setBuffer:offset:atIndex:` | yes | `compute_encoder_commands`, `compute_render_chains`, `extended_range_blends`, `extended_range_targets`, `frame_chains` | 52 | +| `setBuffer:offset:atIndex:` | yes | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_blits`, `buffer_depth_samples`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `compressed_blits`, `compressed_decode`, `compressed_moves`, `compressed_views`, `compute_encoder_commands`, `compute_render_chains`, `compute_threadgroups`, `denormal_word_fetches`, `depth_texel_reads`, `etc_textures`, `extended_range_blends`, `extended_range_planes`, `extended_range_targets`, `extended_range_two_planes`, `extended_swizzles`, `format_copies`, `frame_chains`, `fresh_contents`, `half_read_nans`, `half_storage_writes`, `half_texel_nans`, `half_write_nans`, `level_sizes`, `math_routines`, `nearest_positions`, `norm_storage_writes`, `pass_bytes`, `pixel_downscales`, `pixel_samplers`, `pvrtc_cpu_order`, `pvrtc_rows`, `rgb10a2_srgb`, `shared_exponent_storage`, `simdgroup_lockstep`, `stage_in_regions`, `swizzled_storage`, `texel_swizzles`, `texture_fills`, `two_plane_copies`, `two_plane_heap_blits`, `two_plane_samples`, `ycbcr_minify`, `ycbcr_textures` | 435 | | `setBufferOffset:atIndex:` | yes | `compute_encoder_commands` | 8 | | `setBuffers:offsets:withRange:` | yes | `compute_encoder_commands` | 8 | | `setBuffer:offset:attributeStride:atIndex:` | no | — | — | @@ -647,22 +641,22 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | `setBytes:length:attributeStride:atIndex:` | no | — | — | | `setVisibleFunctionTable:atBufferIndex:` | no | — | — | | `setVisibleFunctionTables:withBufferRange:` | no | — | — | -| `setTexture:atIndex:` | yes | `compute_encoder_commands`, `compute_render_chains`, `extended_range_blends`, `extended_range_targets`, `frame_chains` | 52 | +| `setTexture:atIndex:` | yes | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_blits`, `buffer_depth_samples`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `compressed_blits`, `compressed_decode`, `compressed_moves`, `compressed_views`, `compute_encoder_commands`, `compute_render_chains`, `compute_threadgroups`, `denormal_word_fetches`, `depth_texel_reads`, `etc_textures`, `extended_range_blends`, `extended_range_planes`, `extended_range_targets`, `extended_range_two_planes`, `extended_swizzles`, `format_copies`, `frame_chains`, `fresh_contents`, `half_read_nans`, `half_storage_writes`, `half_texel_nans`, `half_write_nans`, `level_sizes`, `math_routines`, `nearest_positions`, `norm_storage_writes`, `pass_bytes`, `pixel_downscales`, `pixel_samplers`, `pvrtc_cpu_order`, `pvrtc_rows`, `rgb10a2_srgb`, `shared_exponent_storage`, `simdgroup_lockstep`, `stage_in_regions`, `swizzled_storage`, `texel_swizzles`, `texture_fills`, `two_plane_copies`, `two_plane_heap_blits`, `two_plane_samples`, `ycbcr_minify`, `ycbcr_textures` | 435 | | `setTextures:withRange:` | yes | `compute_encoder_commands` | 8 | -| `setSamplerState:atIndex:` | yes | `compute_encoder_commands` | 8 | +| `setSamplerState:atIndex:` | yes | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_blits`, `buffer_depth_samples`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `compressed_blits`, `compressed_decode`, `compressed_moves`, `compressed_views`, `compute_encoder_commands`, `compute_threadgroups`, `denormal_word_fetches`, `depth_texel_reads`, `etc_textures`, `extended_range_blends`, `extended_range_planes`, `extended_range_two_planes`, `extended_swizzles`, `format_copies`, `fresh_contents`, `half_read_nans`, `half_storage_writes`, `half_texel_nans`, `half_write_nans`, `level_sizes`, `math_routines`, `nearest_positions`, `norm_storage_writes`, `pass_bytes`, `pixel_downscales`, `pixel_samplers`, `pvrtc_cpu_order`, `pvrtc_rows`, `rgb10a2_srgb`, `shared_exponent_storage`, `simdgroup_lockstep`, `stage_in_regions`, `swizzled_storage`, `texel_swizzles`, `texture_fills`, `two_plane_copies`, `two_plane_heap_blits`, `two_plane_samples`, `ycbcr_minify`, `ycbcr_textures` | 409 | | `setSamplerStates:withRange:` | yes | `compute_encoder_commands` | 8 | | `setSamplerState:lodMinClamp:lodMaxClamp:atIndex:` | yes | `compute_encoder_commands` | 8 | | `setSamplerStates:lodMinClamps:lodMaxClamps:withRange:` | yes | `compute_encoder_commands` | 8 | | `setThreadgroupMemoryLength:atIndex:` | yes | `compute_encoder_commands` | 8 | | `setImageblockWidth:height:` | no | — | — | -| `setStageInRegion:` | no | — | — | -| `setStageInRegionWithIndirectBuffer:indirectBufferOffset:` | no | — | — | -| `dispatchThreadgroups:threadsPerThreadgroup:` | yes | `compute_encoder_commands` | 8 | +| `setStageInRegion:` | yes | `stage_in_regions` | 1 | +| `setStageInRegionWithIndirectBuffer:indirectBufferOffset:` | yes | `stage_in_regions` | 1 | +| `dispatchThreadgroups:threadsPerThreadgroup:` | yes | `buffer_depth_samples`, `compute_encoder_commands` | 13 | | `dispatchThreadgroupsWithIndirectBuffer:indirectBufferOffset:threadsPerThreadgroup:` | yes | `compute_encoder_commands` | 8 | | `dispatchThreads:threadsPerThreadgroup:` | yes | `compute_render_chains`, `extended_range_blends`, `extended_range_targets`, `frame_chains` | 44 | | `updateFence:` | no | — | — | | `waitForFence:` | no | — | — | -| `useResource:usage:` | yes | `compute_encoder_commands` | 8 | +| `useResource:usage:` | yes | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_blits`, `buffer_depth_samples`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `compressed_blits`, `compressed_decode`, `compressed_moves`, `compressed_views`, `compute_encoder_commands`, `compute_threadgroups`, `denormal_word_fetches`, `depth_texel_reads`, `etc_textures`, `extended_range_blends`, `extended_range_planes`, `extended_range_two_planes`, `extended_swizzles`, `format_copies`, `fresh_contents`, `half_read_nans`, `half_storage_writes`, `half_texel_nans`, `half_write_nans`, `level_sizes`, `math_routines`, `nearest_positions`, `norm_storage_writes`, `pass_bytes`, `pixel_downscales`, `pixel_samplers`, `pvrtc_cpu_order`, `pvrtc_rows`, `rgb10a2_srgb`, `shared_exponent_storage`, `simdgroup_lockstep`, `stage_in_regions`, `swizzled_storage`, `texel_swizzles`, `texture_fills`, `two_plane_copies`, `two_plane_heap_blits`, `two_plane_samples`, `ycbcr_minify`, `ycbcr_textures` | 409 | | `useResources:count:usage:` | yes | `compute_encoder_commands` | 8 | | `useHeap:` | no | — | — | | `useHeaps:count:` | no | — | — | @@ -676,13 +670,13 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | item | exercised | families | cases Metal ran | |---|---|---|---| | `MTLComputePipelineDescriptor` | no | — | — | -| `label` | no | — | — | -| `computeFunction` | yes | `stage_in_regions` | 1 | +| `label` | yes | `pipeline_facts` | 6 | +| `computeFunction` | yes | `pipeline_facts`, `stage_in_regions` | 7 | | `threadGroupSizeIsMultipleOfThreadExecutionWidth` | no | — | — | | `maxTotalThreadsPerThreadgroup` | no | — | — | | `stageInputDescriptor` | yes | `stage_in_regions` | 1 | | `buffers` | no | — | — | -| `supportIndirectCommandBuffers` | no | — | — | +| `supportIndirectCommandBuffers` | yes | `pipeline_facts` | 6 | | `insertLibraries` | no | — | — | | `preloadedLibraries` | no | — | — | | `binaryArchives` | no | — | — | @@ -690,7 +684,7 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | `linkedFunctions` | no | — | — | | `supportAddingBinaryFunctions` | no | — | — | | `maxCallStackDepth` | no | — | — | -| `requiredThreadsPerThreadgroup` | no | — | — | +| `requiredThreadsPerThreadgroup` | yes | `pipeline_facts` | 6 | ### `MTLComputePipelineReflection` @@ -705,20 +699,20 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | item | exercised | families | cases Metal ran | |---|---|---|---| | `MTLComputePipelineState` | no | — | — | -| `label` | no | — | — | +| `label` | yes | `pipeline_facts` | 6 | | `functionHandleWithBinaryFunction:` | no | — | — | | `newComputePipelineStateWithBinaryFunctions:error:` | no | — | — | -| `device` | no | — | — | +| `device` | yes | `pipeline_facts` | 6 | | `maxTotalThreadsPerThreadgroup` | no | — | — | | `threadExecutionWidth` | no | — | — | -| `staticThreadgroupMemoryLength` | yes | `compute_threadgroups` | 1 | -| `imageblockMemoryLengthForDimensions:` | no | — | — | -| `supportIndirectCommandBuffers` | no | — | — | +| `staticThreadgroupMemoryLength` | yes | `compute_threadgroups`, `pipeline_facts` | 7 | +| `imageblockMemoryLengthForDimensions:` | yes | `pipeline_facts` | 6 | +| `supportIndirectCommandBuffers` | yes | `pipeline_facts` | 6 | | `gpuResourceID` | no | — | — | | `functionHandleWithFunction:` | no | — | — | | `newComputePipelineStateWithAdditionalBinaryFunctions:error:` | no | — | — | | `newVisibleFunctionTableWithDescriptor:` | no | — | — | -| `requiredThreadsPerThreadgroup` | no | — | — | +| `requiredThreadsPerThreadgroup` | yes | `pipeline_facts` | 6 | ### `MTLDepthStencilDescriptor` @@ -744,7 +738,7 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised |---|---|---|---| | `MTLDevice` | no | — | — | | `name` | no | — | — | -| `registryID` | yes | `argument_encoders` | 5 | +| `registryID` | yes | `argument_encoders`, `function_facts`, `pipeline_facts` | 23 | | `maxThreadsPerThreadgroup` | no | — | — | | `hasUnifiedMemory` | no | — | — | | `depth24Stencil8PixelFormatSupported` | no | — | — | @@ -758,15 +752,15 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | `heapBufferSizeAndAlignWithLength:options:` | no | — | — | | `newHeapWithDescriptor:` | yes | `blit_encoder_commands`, `buffer_blits`, `buffer_depth_samples`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `compressed_blits`, `compressed_moves`, `compressed_views`, `format_copies`, `fresh_contents`, `pvrtc_cpu_order`, `pvrtc_rows`, `sparse_heaps`, `texture_fills`, `two_plane_copies`, `two_plane_heap_blits` | 187 | | `newBufferWithLength:options:` | yes | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_blits`, `buffer_depth_samples`, `buffer_target_clears`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `color_write_masks`, `compressed_blits`, `compressed_decode`, `compressed_moves`, `compressed_views`, `compute_encoder_commands`, `compute_render_chains`, `compute_threadgroups`, `denormal_word_fetches`, `depth_texel_reads`, `discard_hoist`, `draw_state_changes`, `etc_textures`, `event_orders`, `extended_range_blends`, `extended_range_targets`, `extended_range_two_planes`, `extended_swizzles`, `fetch_ordered`, `format_copies`, `frame_chains`, `fresh_contents`, `half_output_blends`, `half_read_nans`, `half_storage_writes`, `half_texel_nans`, `half_write_nans`, `int_attributes`, `level_sizes`, `math_routines`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `nearest_positions`, `norm_storage_writes`, `pass_bytes`, `pixel_downscales`, `pixel_samplers`, `pvrtc_cpu_order`, `pvrtc_rows`, `rate_maps`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `scheduled_handlers`, `shader_stencil`, `shared_exponent_storage`, `simdgroup_lockstep`, `snorm_tile_store`, `srgb_fetch`, `stage_in_regions`, `swizzled_storage`, `texel_swizzles`, `texture_fills`, `tile_threadgroups`, `two_plane_copies`, `two_plane_heap_blits`, `two_plane_samples`, `visibility`, `wide_points`, `ycbcr_minify`, `ycbcr_textures` | 553 | -| `newBufferWithBytes:length:options:` | no | — | — | +| `newBufferWithBytes:length:options:` | yes | `buffer_depth_samples` | 5 | | `newBufferWithBytesNoCopy:length:options:deallocator:` | no | — | — | | `newDepthStencilStateWithDescriptor:` | yes | `shader_stencil`, `srgb_fetch`, `visibility` | 14 | -| `newTextureWithDescriptor:` | yes | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_depth_samples`, `buffer_target_clears`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `color_write_masks`, `compressed_blits`, `compressed_decode`, `compressed_moves`, `compressed_views`, `compute_encoder_commands`, `compute_render_chains`, `denormal_word_fetches`, `depth_texel_reads`, `discard_hoist`, `draw_state_changes`, `etc_textures`, `extended_range_blends`, `extended_range_targets`, `extended_range_two_planes`, `extended_swizzles`, `fetch_ordered`, `format_copies`, `frame_chains`, `fresh_contents`, `half_output_blends`, `half_read_nans`, `half_storage_writes`, `half_texel_nans`, `heap_metal_sizes`, `level_sizes`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `nearest_positions`, `norm_storage_writes`, `pixel_downscales`, `pixel_samplers`, `pvrtc_cpu_order`, `pvrtc_rows`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `shared_exponent_storage`, `snorm_tile_store`, `srgb_fetch`, `swizzled_storage`, `texel_swizzles`, `texture_fills`, `textures`, `tile_threadgroups`, `two_plane_copies`, `two_plane_heap_blits`, `two_plane_samples`, `visibility`, `wide_points`, `ycbcr_textures` | 604 | +| `newTextureWithDescriptor:` | yes | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_blits`, `buffer_depth_samples`, `buffer_target_clears`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `color_write_masks`, `compressed_blits`, `compressed_decode`, `compressed_moves`, `compressed_views`, `compute_encoder_commands`, `compute_render_chains`, `denormal_word_fetches`, `depth_texel_reads`, `discard_hoist`, `draw_state_changes`, `etc_textures`, `extended_range_blends`, `extended_range_planes`, `extended_range_targets`, `extended_range_two_planes`, `extended_swizzles`, `fetch_ordered`, `format_copies`, `frame_chains`, `fresh_contents`, `half_output_blends`, `half_read_nans`, `half_storage_writes`, `half_texel_nans`, `half_write_nans`, `heap_metal_sizes`, `level_sizes`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `nearest_positions`, `norm_storage_writes`, `pixel_downscales`, `pixel_samplers`, `pvrtc_cpu_order`, `pvrtc_rows`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `shared_exponent_storage`, `snorm_tile_store`, `srgb_fetch`, `swizzled_storage`, `texel_swizzles`, `texture_fills`, `textures`, `tile_threadgroups`, `two_plane_copies`, `two_plane_heap_blits`, `two_plane_samples`, `visibility`, `wide_points`, `ycbcr_textures` | 619 | | `newSharedTextureWithDescriptor:` | no | — | — | | `newSharedTextureWithHandle:` | no | — | — | | `newSamplerStateWithDescriptor:` | yes | `argument_encoders`, `border_swizzles`, `chroma_pairs`, `compute_encoder_commands`, `compute_render_chains`, `depth_texel_reads`, `discard_hoist`, `draw_state_changes`, `extended_swizzles`, `frame_chains`, `half_read_nans`, `nearest_positions`, `pixel_downscales`, `pixel_samplers`, `render_chains`, `rgb10a2_srgb`, `two_plane_samples`, `ycbcr_minify` | 108 | | `newLibraryWithData:error:` | no | — | — | -| `newRenderPipelineStateWithDescriptor:error:` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 143 | +| `newRenderPipelineStateWithDescriptor:error:` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 149 | | `newRenderPipelineStateWithDescriptor:options:reflection:error:` | yes | `texture_accesses` | 1 | | `newRenderPipelineStateWithDescriptor:completionHandler:` | no | — | — | | `newRenderPipelineStateWithDescriptor:options:completionHandler:` | no | — | — | @@ -774,7 +768,7 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | `newComputePipelineStateWithFunction:options:reflection:error:` | yes | `function_bindings` | 3 | | `newComputePipelineStateWithFunction:completionHandler:` | no | — | — | | `newComputePipelineStateWithFunction:options:completionHandler:` | no | — | — | -| `newComputePipelineStateWithDescriptor:options:reflection:error:` | yes | `stage_in_regions` | 1 | +| `newComputePipelineStateWithDescriptor:options:reflection:error:` | yes | `pipeline_facts`, `stage_in_regions` | 7 | | `newComputePipelineStateWithDescriptor:options:completionHandler:` | no | — | — | | `newFence` | yes | `blit_encoder_commands` | 9 | | `supportsFamily:` | no | — | — | @@ -837,36 +831,36 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | item | exercised | families | cases Metal ran | |---|---|---|---| | `MTLFunction` | no | — | — | -| `device` | no | — | — | -| `functionType` | no | — | — | -| `patchType` | no | — | — | -| `patchControlPointCount` | no | — | — | -| `vertexAttributes` | no | — | — | -| `stageInputAttributes` | no | — | — | -| `name` | no | — | — | -| `functionConstantsDictionary` | no | — | — | +| `device` | yes | `function_facts` | 12 | +| `functionType` | yes | `function_facts` | 12 | +| `patchType` | yes | `function_facts` | 12 | +| `patchControlPointCount` | yes | `function_facts` | 12 | +| `vertexAttributes` | yes | `function_facts` | 12 | +| `stageInputAttributes` | yes | `function_facts` | 12 | +| `name` | yes | `function_facts` | 12 | +| `functionConstantsDictionary` | yes | `function_facts` | 12 | | `newArgumentEncoderWithBufferIndex:` | yes | `argument_encoders` | 5 | | `newArgumentEncoderWithBufferIndex:reflection:` | no | — | — | -| `options` | no | — | — | +| `options` | yes | `function_facts` | 12 | ### `MTLFunctionConstant` | item | exercised | families | cases Metal ran | |---|---|---|---| | `MTLFunctionConstant` | no | — | — | -| `name` | no | — | — | -| `type` | no | — | — | -| `index` | no | — | — | -| `required` | no | — | — | +| `name` | yes | `function_facts` | 12 | +| `type` | yes | `function_facts` | 12 | +| `index` | yes | `function_facts` | 12 | +| `required` | yes | `function_facts` | 12 | ### `MTLFunctionConstantValues` | item | exercised | families | cases Metal ran | |---|---|---|---| | `MTLFunctionConstantValues` | no | — | — | -| `setConstantValue:type:atIndex:` | no | — | — | -| `setConstantValues:type:withRange:` | no | — | — | -| `setConstantValue:type:withName:` | no | — | — | +| `setConstantValue:type:atIndex:` | yes | `function_facts` | 12 | +| `setConstantValues:type:withRange:` | yes | `function_facts` | 12 | +| `setConstantValue:type:withName:` | yes | `function_facts` | 12 | | `reset` | no | — | — | ### `MTLFunctionDescriptor` @@ -1016,8 +1010,8 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised |---|---|---|---| | `MTLLibrary` | no | — | — | | `device` | no | — | — | -| `newFunctionWithName:` | yes | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_blits`, `buffer_depth_samples`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `color_write_masks`, `compressed_blits`, `compressed_decode`, `compressed_moves`, `compressed_views`, `compute_encoder_commands`, `compute_render_chains`, `compute_threadgroups`, `denormal_word_fetches`, `depth_texel_reads`, `discard_hoist`, `draw_state_changes`, `etc_textures`, `extended_range_blends`, `extended_range_planes`, `extended_range_targets`, `extended_range_two_planes`, `extended_swizzles`, `fetch_ordered`, `format_copies`, `frame_chains`, `fresh_contents`, `function_bindings`, `half_output_blends`, `half_read_nans`, `half_storage_writes`, `half_texel_nans`, `half_write_nans`, `int_attributes`, `level_sizes`, `math_routines`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `nearest_positions`, `norm_storage_writes`, `pass_bytes`, `pixel_downscales`, `pixel_samplers`, `pvrtc_cpu_order`, `pvrtc_rows`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `shared_exponent_storage`, `simdgroup_lockstep`, `snorm_tile_store`, `srgb_fetch`, `stage_in_regions`, `swizzled_storage`, `texel_swizzles`, `texture_accesses`, `texture_fills`, `tile_threadgroups`, `two_plane_copies`, `two_plane_heap_blits`, `two_plane_samples`, `visibility`, `wide_points`, `ycbcr_minify`, `ycbcr_textures` | 548 | -| `newFunctionWithName:constantValues:error:` | no | — | — | +| `newFunctionWithName:` | yes | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_blits`, `buffer_depth_samples`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `color_write_masks`, `compressed_blits`, `compressed_decode`, `compressed_moves`, `compressed_views`, `compute_encoder_commands`, `compute_render_chains`, `compute_threadgroups`, `denormal_word_fetches`, `depth_texel_reads`, `discard_hoist`, `draw_state_changes`, `etc_textures`, `extended_range_blends`, `extended_range_planes`, `extended_range_targets`, `extended_range_two_planes`, `extended_swizzles`, `fetch_ordered`, `format_copies`, `frame_chains`, `fresh_contents`, `function_bindings`, `function_facts`, `half_output_blends`, `half_read_nans`, `half_storage_writes`, `half_texel_nans`, `half_write_nans`, `int_attributes`, `level_sizes`, `math_routines`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `nearest_positions`, `norm_storage_writes`, `pass_bytes`, `pipeline_facts`, `pixel_downscales`, `pixel_samplers`, `pvrtc_cpu_order`, `pvrtc_rows`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `shared_exponent_storage`, `simdgroup_lockstep`, `snorm_tile_store`, `srgb_fetch`, `stage_in_regions`, `swizzled_storage`, `texel_swizzles`, `texture_accesses`, `texture_fills`, `tile_threadgroups`, `two_plane_copies`, `two_plane_heap_blits`, `two_plane_samples`, `visibility`, `wide_points`, `ycbcr_minify`, `ycbcr_textures` | 566 | +| `newFunctionWithName:constantValues:error:` | yes | `function_facts` | 12 | | `newFunctionWithName:constantValues:completionHandler:` | no | — | — | | `reflectionForFunctionWithName:` | no | — | — | | `newFunctionWithDescriptor:completionHandler:` | no | — | — | @@ -1163,7 +1157,7 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | item | exercised | families | cases Metal ran | |---|---|---|---| | `MTLRenderCommandEncoder` | no | — | — | -| `setRenderPipelineState:` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `mesh_barriers`, `mesh_draws`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 151 | +| `setRenderPipelineState:` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `mesh_barriers`, `mesh_draws`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `tile_threadgroups`, `visibility`, `wide_points` | 159 | | `setVertexBytes:length:atIndex:` | yes | `compute_render_chains`, `draw_state_changes`, `frame_chains`, `render_chains`, `wide_points` | 9 | | `setVertexBuffer:offset:atIndex:` | yes | `color_write_masks`, `fetch_ordered`, `int_attributes`, `rotated_planes`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility` | 65 | | `setVertexBufferOffset:atIndex:` | no | — | — | @@ -1255,11 +1249,11 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | `drawIndexedPatches:patchIndexBuffer:patchIndexBufferOffset:controlPointIndexBuffer:controlPointIndexBufferOffset:indirectBuffer:indirectBufferOffset:` | no | — | — | | `tileWidth` | no | — | — | | `tileHeight` | no | — | — | -| `setTileBytes:length:atIndex:` | no | — | — | -| `setTileBuffer:offset:atIndex:` | no | — | — | +| `setTileBytes:length:atIndex:` | yes | `tile_threadgroups` | 8 | +| `setTileBuffer:offset:atIndex:` | yes | `tile_threadgroups` | 8 | | `setTileBufferOffset:atIndex:` | no | — | — | | `setTileBuffers:offsets:withRange:` | no | — | — | -| `setTileTexture:atIndex:` | no | — | — | +| `setTileTexture:atIndex:` | yes | `tile_threadgroups` | 8 | | `setTileTextures:withRange:` | no | — | — | | `setTileSamplerState:atIndex:` | no | — | — | | `setTileSamplerStates:withRange:` | no | — | — | @@ -1267,7 +1261,7 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | `setTileSamplerStates:lodMinClamps:lodMaxClamps:withRange:` | no | — | — | | `setTileVisibleFunctionTable:atBufferIndex:` | no | — | — | | `setTileVisibleFunctionTables:withBufferRange:` | no | — | — | -| `dispatchThreadsPerTile:` | no | — | — | +| `dispatchThreadsPerTile:` | yes | `tile_threadgroups` | 8 | | `setThreadgroupMemoryLength:offset:atIndex:` | no | — | — | | `useResource:usage:` | no | — | — | | `useResources:count:usage:` | no | — | — | @@ -1287,7 +1281,7 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | item | exercised | families | cases Metal ran | |---|---|---|---| | `MTLRenderPassAttachmentDescriptor` | no | — | — | -| `texture` | yes | `buffer_depth_samples`, `buffer_target_clears`, `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 164 | +| `texture` | yes | `buffer_depth_samples`, `buffer_target_clears`, `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `tile_threadgroups`, `visibility`, `wide_points` | 172 | | `level` | no | — | — | | `slice` | yes | `buffer_depth_samples` | 5 | | `depthPlane` | no | — | — | @@ -1295,8 +1289,8 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | `resolveLevel` | no | — | — | | `resolveSlice` | no | — | — | | `resolveDepthPlane` | no | — | — | -| `loadAction` | yes | `buffer_depth_samples`, `buffer_target_clears`, `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 164 | -| `storeAction` | yes | `buffer_depth_samples`, `buffer_target_clears`, `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 164 | +| `loadAction` | yes | `buffer_depth_samples`, `buffer_target_clears`, `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `tile_threadgroups`, `visibility`, `wide_points` | 172 | +| `storeAction` | yes | `buffer_depth_samples`, `buffer_target_clears`, `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `tile_threadgroups`, `visibility`, `wide_points` | 172 | | `storeActionOptions` | yes | `buffer_target_clears`, `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | ### `MTLRenderPassColorAttachmentDescriptor` @@ -1311,7 +1305,7 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | item | exercised | families | cases Metal ran | |---|---|---|---| | `MTLRenderPassColorAttachmentDescriptorArray` | no | — | — | -| `objectAtIndexedSubscript:` | yes | `buffer_target_clears`, `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 159 | +| `objectAtIndexedSubscript:` | yes | `buffer_target_clears`, `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `tile_threadgroups`, `visibility`, `wide_points` | 167 | | `setObject:atIndexedSubscript:` | no | — | — | ### `MTLRenderPassDepthAttachmentDescriptor` @@ -1328,15 +1322,15 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised |---|---|---|---| | `MTLRenderPassDescriptor` | no | — | — | | `renderPassDescriptor` | no | — | — | -| `colorAttachments` | yes | `buffer_target_clears`, `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 159 | +| `colorAttachments` | yes | `buffer_target_clears`, `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `tile_threadgroups`, `visibility`, `wide_points` | 167 | | `depthAttachment` | yes | `buffer_depth_samples`, `buffer_target_clears`, `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 146 | | `stencilAttachment` | yes | `buffer_depth_samples`, `buffer_target_clears`, `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 146 | | `visibilityResultBuffer` | yes | `buffer_target_clears`, `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | | `renderTargetArrayLength` | no | — | — | | `imageblockSampleLength` | no | — | — | | `threadgroupMemoryLength` | no | — | — | -| `tileWidth` | no | — | — | -| `tileHeight` | no | — | — | +| `tileWidth` | yes | `tile_threadgroups` | 8 | +| `tileHeight` | yes | `tile_threadgroups` | 8 | | `defaultRasterSampleCount` | yes | `buffer_target_clears`, `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | | `renderTargetWidth` | yes | `buffer_target_clears`, `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | | `renderTargetHeight` | yes | `buffer_target_clears`, `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | @@ -1357,22 +1351,22 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | item | exercised | families | cases Metal ran | |---|---|---|---| | `MTLRenderPipelineColorAttachmentDescriptor` | no | — | — | -| `pixelFormat` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `texture_accesses`, `visibility`, `wide_points` | 154 | -| `blendingEnabled` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 135 | -| `sourceRGBBlendFactor` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 135 | -| `destinationRGBBlendFactor` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 135 | -| `rgbBlendOperation` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 135 | -| `sourceAlphaBlendFactor` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 135 | -| `destinationAlphaBlendFactor` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 135 | -| `alphaBlendOperation` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 135 | -| `writeMask` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 135 | +| `pixelFormat` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `pipeline_facts`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `texture_accesses`, `visibility`, `wide_points` | 160 | +| `blendingEnabled` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | +| `sourceRGBBlendFactor` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | +| `destinationRGBBlendFactor` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | +| `rgbBlendOperation` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | +| `sourceAlphaBlendFactor` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | +| `destinationAlphaBlendFactor` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | +| `alphaBlendOperation` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | +| `writeMask` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | ### `MTLRenderPipelineColorAttachmentDescriptorArray` | item | exercised | families | cases Metal ran | |---|---|---|---| | `MTLRenderPipelineColorAttachmentDescriptorArray` | no | — | — | -| `objectAtIndexedSubscript:` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `texture_accesses`, `visibility`, `wide_points` | 154 | +| `objectAtIndexedSubscript:` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `pipeline_facts`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `texture_accesses`, `visibility`, `wide_points` | 160 | | `setObject:atIndexedSubscript:` | no | — | — | ### `MTLRenderPipelineDescriptor` @@ -1380,19 +1374,19 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | item | exercised | families | cases Metal ran | |---|---|---|---| | `MTLRenderPipelineDescriptor` | no | — | — | -| `label` | no | — | — | -| `vertexFunction` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `texture_accesses`, `visibility`, `wide_points` | 144 | -| `fragmentFunction` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `texture_accesses`, `visibility`, `wide_points` | 144 | -| `vertexDescriptor` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 135 | +| `label` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | +| `vertexFunction` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `texture_accesses`, `visibility`, `wide_points` | 150 | +| `fragmentFunction` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `texture_accesses`, `visibility`, `wide_points` | 150 | +| `vertexDescriptor` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | | `sampleCount` | no | — | — | -| `rasterSampleCount` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 135 | +| `rasterSampleCount` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | | `alphaToCoverageEnabled` | no | — | — | | `alphaToOneEnabled` | no | — | — | -| `rasterizationEnabled` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 135 | +| `rasterizationEnabled` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | | `maxVertexAmplificationCount` | no | — | — | -| `colorAttachments` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `texture_accesses`, `visibility`, `wide_points` | 144 | -| `depthAttachmentPixelFormat` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 135 | -| `stencilAttachmentPixelFormat` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 135 | +| `colorAttachments` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `texture_accesses`, `visibility`, `wide_points` | 150 | +| `depthAttachmentPixelFormat` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | +| `stencilAttachmentPixelFormat` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | | `inputPrimitiveTopology` | no | — | — | | `tessellationPartitionMode` | no | — | — | | `maxTessellationFactor` | no | — | — | @@ -1403,7 +1397,7 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | `tessellationOutputWindingOrder` | no | — | — | | `vertexBuffers` | no | — | — | | `fragmentBuffers` | no | — | — | -| `supportIndirectCommandBuffers` | no | — | — | +| `supportIndirectCommandBuffers` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | | `binaryArchives` | no | — | — | | `vertexPreloadedLibraries` | no | — | — | | `fragmentPreloadedLibraries` | no | — | — | @@ -1443,20 +1437,20 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | item | exercised | families | cases Metal ran | |---|---|---|---| | `MTLRenderPipelineState` | no | — | — | -| `label` | no | — | — | -| `device` | no | — | — | +| `label` | yes | `pipeline_facts` | 6 | +| `device` | yes | `pipeline_facts` | 6 | | `functionHandleWithBinaryFunction:stage:` | no | — | — | | `newRenderPipelineStateWithBinaryFunctions:error:` | no | — | — | -| `maxTotalThreadsPerThreadgroup` | no | — | — | -| `threadgroupSizeMatchesTileSize` | no | — | — | -| `imageblockSampleLength` | no | — | — | -| `imageblockMemoryLengthForDimensions:` | no | — | — | -| `supportIndirectCommandBuffers` | no | — | — | +| `maxTotalThreadsPerThreadgroup` | yes | `pipeline_facts`, `tile_threadgroups` | 14 | +| `threadgroupSizeMatchesTileSize` | yes | `pipeline_facts`, `tile_threadgroups` | 14 | +| `imageblockSampleLength` | yes | `pipeline_facts`, `tile_threadgroups` | 14 | +| `imageblockMemoryLengthForDimensions:` | yes | `pipeline_facts` | 6 | +| `supportIndirectCommandBuffers` | yes | `pipeline_facts` | 6 | | `gpuResourceID` | no | — | — | | `functionHandleWithFunction:stage:` | no | — | — | | `newVisibleFunctionTableWithDescriptor:stage:` | no | — | — | | `newRenderPipelineStateWithAdditionalBinaryFunctions:error:` | no | — | — | -| `requiredThreadsPerTileThreadgroup` | no | — | — | +| `requiredThreadsPerTileThreadgroup` | yes | `pipeline_facts` | 6 | ### `MTLResource` @@ -1618,8 +1612,8 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | `gpuResourceID` | yes | `half_storage_writes`, `norm_storage_writes`, `pixel_downscales`, `pixel_samplers` | 39 | | `getBytes:bytesPerRow:bytesPerImage:fromRegion:mipmapLevel:slice:` | yes | `blit_encoder_commands`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `compressed_blits`, `pvrtc_cpu_order`, `two_plane_copies` | 30 | | `replaceRegion:mipmapLevel:slice:withBytes:bytesPerRow:bytesPerImage:` | yes | `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_depth_samples`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `compressed_blits`, `compressed_decode`, `compressed_views`, `denormal_word_fetches`, `etc_textures`, `extended_swizzles`, `format_copies`, `fresh_contents`, `level_sizes`, `norm_storage_writes`, `pvrtc_cpu_order`, `pvrtc_rows`, `shared_exponent_storage`, `swizzled_storage`, `texel_swizzles`, `texture_fills`, `two_plane_copies`, `two_plane_heap_blits` | 261 | -| `getBytes:bytesPerRow:fromRegion:mipmapLevel:` | no | — | — | -| `replaceRegion:mipmapLevel:withBytes:bytesPerRow:` | yes | `argument_encoders`, `chroma_pairs`, `compute_encoder_commands`, `depth_texel_reads`, `discard_hoist`, `draw_state_changes`, `extended_range_two_planes`, `half_read_nans`, `half_storage_writes`, `half_texel_nans`, `nearest_positions`, `pixel_downscales`, `pixel_samplers`, `rgb10a2_srgb`, `textures`, `tile_threadgroups`, `two_plane_samples` | 178 | +| `getBytes:bytesPerRow:fromRegion:mipmapLevel:` | yes | `color_write_masks`, `extended_range_planes`, `half_storage_writes`, `half_write_nans`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `norm_storage_writes`, `rgb10a2_srgb`, `shared_exponent_storage`, `snorm_tile_store`, `swizzled_storage`, `textures`, `tile_threadgroups` | 149 | +| `replaceRegion:mipmapLevel:withBytes:bytesPerRow:` | yes | `argument_encoders`, `blit_encoder_commands`, `buffer_blits`, `buffer_depth_samples`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `color_write_masks`, `compressed_blits`, `compressed_moves`, `compressed_views`, `compute_encoder_commands`, `depth_texel_reads`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_planes`, `extended_range_two_planes`, `fetch_ordered`, `format_copies`, `fresh_contents`, `half_output_blends`, `half_read_nans`, `half_storage_writes`, `half_texel_nans`, `half_write_nans`, `nearest_positions`, `pixel_downscales`, `pixel_samplers`, `pvrtc_cpu_order`, `pvrtc_rows`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `snorm_tile_store`, `srgb_fetch`, `swizzled_storage`, `texture_fills`, `textures`, `tile_threadgroups`, `two_plane_copies`, `two_plane_heap_blits`, `two_plane_samples` | 444 | | `newTextureViewWithPixelFormat:` | no | — | — | | `newTextureViewWithPixelFormat:textureType:levels:slices:` | yes | `compressed_moves`, `compressed_views` | 28 | | `newSharedTextureHandle` | no | — | — | @@ -1655,9 +1649,9 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | `arrayLength` | yes | `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_depth_samples`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `compressed_blits`, `compressed_decode`, `compressed_views`, `denormal_word_fetches`, `etc_textures`, `extended_swizzles`, `format_copies`, `fresh_contents`, `heap_metal_sizes`, `level_sizes`, `norm_storage_writes`, `pvrtc_cpu_order`, `pvrtc_rows`, `shared_exponent_storage`, `sparse_heaps`, `swizzled_storage`, `texel_swizzles`, `texture_fills`, `two_plane_copies`, `two_plane_heap_blits`, `ycbcr_textures` | 276 | | `resourceOptions` | no | — | — | | `cpuCacheMode` | no | — | — | -| `storageMode` | yes | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_depth_samples`, `buffer_target_clears`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `color_write_masks`, `compressed_blits`, `compressed_decode`, `compressed_views`, `compute_encoder_commands`, `compute_render_chains`, `denormal_word_fetches`, `depth_texel_reads`, `discard_hoist`, `draw_state_changes`, `etc_textures`, `extended_range_blends`, `extended_range_targets`, `extended_range_two_planes`, `extended_swizzles`, `fetch_ordered`, `format_copies`, `frame_chains`, `fresh_contents`, `half_output_blends`, `half_read_nans`, `half_storage_writes`, `half_texel_nans`, `heap_metal_sizes`, `level_sizes`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `nearest_positions`, `norm_storage_writes`, `pixel_downscales`, `pixel_samplers`, `pvrtc_cpu_order`, `pvrtc_rows`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `shared_exponent_storage`, `snorm_tile_store`, `sparse_heaps`, `srgb_fetch`, `swizzled_storage`, `texel_swizzles`, `texture_fills`, `textures`, `tile_threadgroups`, `two_plane_copies`, `two_plane_heap_blits`, `two_plane_samples`, `visibility`, `wide_points`, `ycbcr_minify`, `ycbcr_textures` | 598 | +| `storageMode` | yes | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_blits`, `buffer_depth_samples`, `buffer_target_clears`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `color_write_masks`, `compressed_blits`, `compressed_decode`, `compressed_moves`, `compressed_views`, `compute_encoder_commands`, `compute_render_chains`, `denormal_word_fetches`, `depth_texel_reads`, `discard_hoist`, `draw_state_changes`, `etc_textures`, `extended_range_blends`, `extended_range_planes`, `extended_range_targets`, `extended_range_two_planes`, `extended_swizzles`, `fetch_ordered`, `format_copies`, `frame_chains`, `fresh_contents`, `half_output_blends`, `half_read_nans`, `half_storage_writes`, `half_texel_nans`, `half_write_nans`, `heap_metal_sizes`, `level_sizes`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `nearest_positions`, `norm_storage_writes`, `pixel_downscales`, `pixel_samplers`, `pvrtc_cpu_order`, `pvrtc_rows`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `shared_exponent_storage`, `snorm_tile_store`, `sparse_heaps`, `srgb_fetch`, `swizzled_storage`, `texel_swizzles`, `texture_fills`, `textures`, `tile_threadgroups`, `two_plane_copies`, `two_plane_heap_blits`, `two_plane_samples`, `visibility`, `wide_points`, `ycbcr_minify`, `ycbcr_textures` | 627 | | `hazardTrackingMode` | no | — | — | -| `usage` | yes | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_depth_samples`, `buffer_target_clears`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `color_write_masks`, `compressed_blits`, `compressed_decode`, `compressed_views`, `compute_encoder_commands`, `compute_render_chains`, `denormal_word_fetches`, `depth_texel_reads`, `discard_hoist`, `draw_state_changes`, `etc_textures`, `extended_range_blends`, `extended_range_targets`, `extended_range_two_planes`, `extended_swizzles`, `fetch_ordered`, `format_copies`, `frame_chains`, `fresh_contents`, `half_output_blends`, `half_read_nans`, `half_storage_writes`, `half_texel_nans`, `heap_metal_sizes`, `level_sizes`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `nearest_positions`, `norm_storage_writes`, `pixel_downscales`, `pixel_samplers`, `pvrtc_cpu_order`, `pvrtc_rows`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `shared_exponent_storage`, `snorm_tile_store`, `sparse_heaps`, `srgb_fetch`, `swizzled_storage`, `texel_swizzles`, `texture_fills`, `textures`, `tile_threadgroups`, `two_plane_copies`, `two_plane_heap_blits`, `two_plane_samples`, `visibility`, `wide_points`, `ycbcr_minify`, `ycbcr_textures` | 598 | +| `usage` | yes | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_blits`, `buffer_depth_samples`, `buffer_target_clears`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `color_write_masks`, `compressed_blits`, `compressed_decode`, `compressed_moves`, `compressed_views`, `compute_encoder_commands`, `compute_render_chains`, `denormal_word_fetches`, `depth_texel_reads`, `discard_hoist`, `draw_state_changes`, `etc_textures`, `extended_range_blends`, `extended_range_planes`, `extended_range_targets`, `extended_range_two_planes`, `extended_swizzles`, `fetch_ordered`, `format_copies`, `frame_chains`, `fresh_contents`, `half_output_blends`, `half_read_nans`, `half_storage_writes`, `half_texel_nans`, `half_write_nans`, `heap_metal_sizes`, `level_sizes`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `nearest_positions`, `norm_storage_writes`, `pixel_downscales`, `pixel_samplers`, `pvrtc_cpu_order`, `pvrtc_rows`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `shared_exponent_storage`, `snorm_tile_store`, `sparse_heaps`, `srgb_fetch`, `swizzled_storage`, `texel_swizzles`, `texture_fills`, `textures`, `tile_threadgroups`, `two_plane_copies`, `two_plane_heap_blits`, `two_plane_samples`, `visibility`, `wide_points`, `ycbcr_minify`, `ycbcr_textures` | 627 | | `allowGPUOptimizedContents` | yes | `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_depth_samples`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `compressed_blits`, `compressed_decode`, `compressed_views`, `denormal_word_fetches`, `etc_textures`, `extended_swizzles`, `format_copies`, `fresh_contents`, `level_sizes`, `norm_storage_writes`, `pvrtc_cpu_order`, `pvrtc_rows`, `shared_exponent_storage`, `swizzled_storage`, `texel_swizzles`, `texture_fills`, `two_plane_copies`, `two_plane_heap_blits` | 261 | | `swizzle` | yes | `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_depth_samples`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `compressed_blits`, `compressed_decode`, `compressed_views`, `denormal_word_fetches`, `etc_textures`, `extended_swizzles`, `format_copies`, `fresh_contents`, `level_sizes`, `norm_storage_writes`, `pvrtc_cpu_order`, `pvrtc_rows`, `shared_exponent_storage`, `swizzled_storage`, `texel_swizzles`, `texture_fills`, `two_plane_copies`, `two_plane_heap_blits` | 261 | @@ -1737,28 +1731,28 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | item | exercised | families | cases Metal ran | |---|---|---|---| | `MTLVertexAttribute` | no | — | — | -| `name` | no | — | — | -| `attributeIndex` | no | — | — | -| `attributeType` | no | — | — | -| `active` | no | — | — | -| `patchData` | no | — | — | -| `patchControlPointData` | no | — | — | +| `name` | yes | `function_facts` | 12 | +| `attributeIndex` | yes | `function_facts` | 12 | +| `attributeType` | yes | `function_facts` | 12 | +| `active` | yes | `function_facts` | 12 | +| `patchData` | yes | `function_facts` | 12 | +| `patchControlPointData` | yes | `function_facts` | 12 | ### `MTLVertexAttributeDescriptor` | item | exercised | families | cases Metal ran | |---|---|---|---| | `MTLVertexAttributeDescriptor` | no | — | — | -| `format` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 135 | -| `offset` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 135 | -| `bufferIndex` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 135 | +| `format` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | +| `offset` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | +| `bufferIndex` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | ### `MTLVertexAttributeDescriptorArray` | item | exercised | families | cases Metal ran | |---|---|---|---| | `MTLVertexAttributeDescriptorArray` | no | — | — | -| `objectAtIndexedSubscript:` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 135 | +| `objectAtIndexedSubscript:` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | | `setObject:atIndexedSubscript:` | no | — | — | ### `MTLVertexBufferLayoutDescriptor` @@ -1766,16 +1760,16 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised | item | exercised | families | cases Metal ran | |---|---|---|---| | `MTLVertexBufferLayoutDescriptor` | no | — | — | -| `stride` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 135 | -| `stepFunction` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 135 | -| `stepRate` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 135 | +| `stride` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | +| `stepFunction` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | +| `stepRate` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | ### `MTLVertexBufferLayoutDescriptorArray` | item | exercised | families | cases Metal ran | |---|---|---|---| | `MTLVertexBufferLayoutDescriptorArray` | no | — | — | -| `objectAtIndexedSubscript:` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 135 | +| `objectAtIndexedSubscript:` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | | `setObject:atIndexedSubscript:` | no | — | — | ### `MTLVertexDescriptor` @@ -1784,8 +1778,8 @@ One row per implemented item of the SDK, in the coverage map's order. *exercised |---|---|---|---| | `MTLVertexDescriptor` | no | — | — | | `vertexDescriptor` | no | — | — | -| `layouts` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 135 | -| `attributes` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 135 | +| `layouts` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | +| `attributes` | yes | `color_write_masks`, `compute_render_chains`, `discard_hoist`, `draw_state_changes`, `extended_range_blends`, `extended_range_targets`, `fetch_ordered`, `frame_chains`, `half_output_blends`, `int_attributes`, `pipeline_facts`, `render_chains`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `snorm_tile_store`, `srgb_fetch`, `visibility`, `wide_points` | 141 | | `reset` | no | — | — | ### `MTLVisibleFunctionTable` @@ -1813,7 +1807,7 @@ An item the suite's Metal leg calls whose coverage-map status is not implemented |---|---|---|---| | `MTL4LibraryDescriptor` `source` | missing | Metal 4's command model (`MTL4CommandQueue`, `MTL4CommandBuffer`, argument tables, the compiler, `RuntimeGap::Metal4Api`) | `blit_encoder_commands`, `buffer_blits`, `buffer_depth_samples`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `compressed_blits`, `compressed_moves`, `compressed_views`, `format_copies`, `fresh_contents`, `pvrtc_cpu_order`, `pvrtc_rows`, `texture_fills`, `two_plane_copies`, `two_plane_heap_blits` | | `MTL4LibraryFunctionDescriptor` `library` | missing | Metal 4's command model (`MTL4CommandQueue`, `MTL4CommandBuffer`, argument tables, the compiler, `RuntimeGap::Metal4Api`) | `blit_encoder_commands`, `buffer_blits`, `buffer_depth_samples`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `compressed_blits`, `compressed_moves`, `compressed_views`, `format_copies`, `fresh_contents`, `pvrtc_cpu_order`, `pvrtc_rows`, `texture_fills`, `two_plane_copies`, `two_plane_heap_blits` | -| `MTLDevice` `newLibraryWithURL:error:` | missing | a metallib read from a file URL | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_blits`, `buffer_depth_samples`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `color_write_masks`, `compressed_blits`, `compressed_decode`, `compressed_moves`, `compressed_views`, `compute_encoder_commands`, `compute_render_chains`, `compute_threadgroups`, `denormal_word_fetches`, `depth_texel_reads`, `discard_hoist`, `draw_state_changes`, `etc_textures`, `extended_range_blends`, `extended_range_planes`, `extended_range_targets`, `extended_range_two_planes`, `extended_swizzles`, `fetch_ordered`, `format_copies`, `frame_chains`, `fresh_contents`, `function_bindings`, `half_output_blends`, `half_read_nans`, `half_storage_writes`, `half_texel_nans`, `half_write_nans`, `int_attributes`, `level_sizes`, `math_routines`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `nearest_positions`, `norm_storage_writes`, `pass_bytes`, `pixel_downscales`, `pixel_samplers`, `pvrtc_cpu_order`, `pvrtc_rows`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `shared_exponent_storage`, `simdgroup_lockstep`, `snorm_tile_store`, `srgb_fetch`, `stage_in_regions`, `swizzled_storage`, `texel_swizzles`, `texture_accesses`, `texture_fills`, `tile_threadgroups`, `two_plane_copies`, `two_plane_heap_blits`, `two_plane_samples`, `visibility`, `wide_points`, `ycbcr_minify`, `ycbcr_textures` | +| `MTLDevice` `newLibraryWithURL:error:` | missing | a metallib read from a file URL | `argument_encoders`, `astc_textures`, `blit_encoder_commands`, `border_swizzles`, `buffer_blits`, `buffer_depth_samples`, `buffer_texture_blits`, `buffer_textures`, `chroma_pairs`, `color_write_masks`, `compressed_blits`, `compressed_decode`, `compressed_moves`, `compressed_views`, `compute_encoder_commands`, `compute_render_chains`, `compute_threadgroups`, `denormal_word_fetches`, `depth_texel_reads`, `discard_hoist`, `draw_state_changes`, `etc_textures`, `extended_range_blends`, `extended_range_planes`, `extended_range_targets`, `extended_range_two_planes`, `extended_swizzles`, `fetch_ordered`, `format_copies`, `frame_chains`, `fresh_contents`, `function_bindings`, `function_facts`, `half_output_blends`, `half_read_nans`, `half_storage_writes`, `half_texel_nans`, `half_write_nans`, `int_attributes`, `level_sizes`, `math_routines`, `mesh_barriers`, `mesh_commands`, `mesh_draws`, `nearest_positions`, `norm_storage_writes`, `pass_bytes`, `pipeline_facts`, `pixel_downscales`, `pixel_samplers`, `pvrtc_cpu_order`, `pvrtc_rows`, `render_chains`, `rgb10a2_srgb`, `rotated_planes`, `rotated_targets`, `sample_positions`, `shader_stencil`, `shared_exponent_storage`, `simdgroup_lockstep`, `snorm_tile_store`, `srgb_fetch`, `stage_in_regions`, `swizzled_storage`, `texel_swizzles`, `texture_accesses`, `texture_fills`, `tile_threadgroups`, `two_plane_copies`, `two_plane_heap_blits`, `two_plane_samples`, `visibility`, `wide_points`, `ycbcr_minify`, `ycbcr_textures` | ## Called, attributed to no family @@ -1821,14 +1815,8 @@ An item the Metal leg calls that no case module was found to reach: either a `Si | item | status | |---|---| -| `MTLComputeCommandEncoder` `setStageInRegion:` | implemented | -| `MTLComputeCommandEncoder` `setStageInRegionWithIndirectBuffer:indirectBufferOffset:` | implemented | | `MTLDevice` `name` | implemented | -| `MTLRenderCommandEncoder` `dispatchThreadsPerTile:` | implemented | | `MTLRenderCommandEncoder` `drawIndexedPrimitives:indexCount:indexType:indexBuffer:indexBufferOffset:instanceCount:baseVertex:baseInstance:` | implemented | -| `MTLRenderCommandEncoder` `setTileBuffer:offset:atIndex:` | implemented | -| `MTLRenderCommandEncoder` `setTileBytes:length:atIndex:` | implemented | -| `MTLRenderCommandEncoder` `setTileTexture:atIndex:` | implemented | ## The ledger diff --git a/scripts/conformance-coverage/metal_leg.py b/scripts/conformance-coverage/metal_leg.py index 36c7c36dd..dc0b61792 100644 --- a/scripts/conformance-coverage/metal_leg.py +++ b/scripts/conformance-coverage/metal_leg.py @@ -245,6 +245,39 @@ class Function: end: int +def body_brace(text: str, after: int) -> int: + """Where the body of the `fn` whose name ends at `after` opens, or `-1` for a declaration. + + The signature is skipped by **bracket depth**, not by looking for the first `{` and treating a + `;` before it as the end of a declaration. A parameter of an array type carries a `;` inside + its brackets — `imageblock: [u32; 3]` — and reading that `;` as the end of a declaration drops + the whole function, with every Metal call it makes. Measured when this was written: it dropped + fourteen functions of the Metal side, `texture_2d`, `read_texture`, `replace_region`, + `dispatch`, `dispatch_threads` and `tile_pass` among them, so their calls were attributed to no + item at all and were missing from the unresolved count too. + + `->` is skipped as a unit, because its `>` is not a closing bracket. + """ + depth = 0 + i = after + while i < len(text): + two = text[i : i + 2] + if two == "->": + i += 2 + continue + char = text[i] + if char in "([<": + depth += 1 + elif char in ")]>": + depth = max(0, depth - 1) + elif depth == 0 and char == "{": + return i + elif depth == 0 and char == ";": + return -1 + i += 1 + return -1 + + def functions(text: str, file: str) -> list[Function]: """Every function the (blanked) source declares, with its body's span.""" out: list[Function] = [] @@ -255,9 +288,8 @@ def functions(text: str, file: str) -> list[Function]: impls.append((header, span[1])) impls[-1] = (header, span[1]) for match in re.finditer(r"\bfn\s+([A-Za-z_][A-Za-z0-9_]*)", text): - open_at = text.find("{", match.end()) - semi = text.find(";", match.end()) - if open_at < 0 or (0 <= semi < open_at and "=>" not in text[match.end() : semi]): + open_at = body_brace(text, match.end()) + if open_at < 0: # A declaration with no body (a trait's required method). continue start, end = block(text, match.end())