summaryrefslogtreecommitdiffstats
path: root/tests/reflection
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2017-11-07 14:05:22 -0800
committerGitHub <noreply@github.com>2017-11-07 14:05:22 -0800
commit939688e963fde7a0485f210ef2674c27692021a4 (patch)
treeb86d6d71c3dd57b3fc2af3b1006be397d0cb01cc /tests/reflection
parent417c9f3939e0545125317f49316a6dfb060d6c2c (diff)
Add reflection API to get type name (#263)
This is currently only useful for `struct` types. I implemented a special-case exception so that the auto-generated `struct` types used for `cbuffer` members don't show their internal name. I did *not* implement any logic to avoid returning the name `vector` for a vector type, etc., since they are all `DeclRefType`s and it seemed easiest to just let the user access information they can't really use.
Diffstat (limited to 'tests/reflection')
-rw-r--r--tests/reflection/std430-layout.glsl.expected1
-rw-r--r--tests/reflection/vertex-input-semantics.hlsl.expected4
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/reflection/std430-layout.glsl.expected b/tests/reflection/std430-layout.glsl.expected
index bd04c417f..7c9c514d6 100644
--- a/tests/reflection/std430-layout.glsl.expected
+++ b/tests/reflection/std430-layout.glsl.expected
@@ -61,6 +61,7 @@ standard output = {
"name": "e",
"type": {
"kind": "struct",
+ "name": "Foo",
"fields": [
{
"name": "f",
diff --git a/tests/reflection/vertex-input-semantics.hlsl.expected b/tests/reflection/vertex-input-semantics.hlsl.expected
index 014533fdb..a3747a86a 100644
--- a/tests/reflection/vertex-input-semantics.hlsl.expected
+++ b/tests/reflection/vertex-input-semantics.hlsl.expected
@@ -30,6 +30,7 @@ standard output = {
"semanticName": "B",
"type": {
"kind": "struct",
+ "name": "B",
"fields": [
{
"name": "b0",
@@ -48,6 +49,7 @@ standard output = {
"name": "b1",
"type": {
"kind": "struct",
+ "name": "X",
"fields": [
{
"name": "x0",
@@ -91,11 +93,13 @@ standard output = {
"binding": {"kind": "vertexInput", "index": 4, "count": 3},
"type": {
"kind": "struct",
+ "name": "C",
"fields": [
{
"name": "c0",
"type": {
"kind": "struct",
+ "name": "X",
"fields": [
{
"name": "x0",