Skip to content

Commit

Permalink
Add LUNARG_api_dump layer settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
io7m committed Dec 9, 2024
1 parent 48ae405 commit f081e7e
Show file tree
Hide file tree
Showing 18 changed files with 716 additions and 0 deletions.
41 changes: 41 additions & 0 deletions com.io7m.jcoronado.layers.lunarg_api_dump.api/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<artifactId>com.io7m.jcoronado</artifactId>
<groupId>com.io7m.jcoronado</groupId>
<version>0.0.2-SNAPSHOT</version>
</parent>

<artifactId>com.io7m.jcoronado.layers.lunarg_api_dump.api</artifactId>

<packaging>jar</packaging>
<name>com.io7m.jcoronado.layers.lunarg_api_dump.api</name>
<description>Type-safe Vulkan frontend (VK_LAYER_LUNARG_api_dump API)</description>
<url>https://www.io7m.com/software/jcoronado</url>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>com.io7m.jcoronado.extensions.ext_layer_settings.api</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.annotation.bundle</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.annotation.versioning</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* Copyright © 2024 Mark Raynsford <[email protected]> https://www.io7m.com
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/


package com.io7m.jcoronado.layers.lunarg_api_dump.api;

import com.io7m.jcoronado.extensions.ext_layer_settings.api.VulkanLayerSettingBoolean;
import com.io7m.jcoronado.extensions.ext_layer_settings.api.VulkanLayerSettingType;

import java.util.List;

/**
* @param enabled If enabled
*
* @see "https://vulkan.lunarg.com/doc/view/latest/linux/api_dump_layer.html"
*/

public record VulkanAPIDumpDetailed(
boolean enabled)
implements VulkanAPIDumpSettingType
{
@Override
public VulkanLayerSettingType toSetting()
{
return new VulkanLayerSettingBoolean(
"VK_LAYER_LUNARG_api_dump",
"lunarg_api_dump.detailed",
List.of(Boolean.valueOf(this.enabled))
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* Copyright © 2024 Mark Raynsford <[email protected]> https://www.io7m.com
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/


package com.io7m.jcoronado.layers.lunarg_api_dump.api;

import com.io7m.jcoronado.extensions.ext_layer_settings.api.VulkanLayerSettingBoolean;
import com.io7m.jcoronado.extensions.ext_layer_settings.api.VulkanLayerSettingType;

import java.util.List;

/**
* @param enabled If enabled
*
* @see "https://vulkan.lunarg.com/doc/view/latest/linux/api_dump_layer.html"
*/

public record VulkanAPIDumpHideAddresses(
boolean enabled)
implements VulkanAPIDumpSettingType
{
@Override
public VulkanLayerSettingType toSetting()
{
return new VulkanLayerSettingBoolean(
"VK_LAYER_LUNARG_api_dump",
"lunarg_api_dump.no_addr",
List.of(Boolean.valueOf(this.enabled))
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* Copyright © 2024 Mark Raynsford <[email protected]> https://www.io7m.com
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/


package com.io7m.jcoronado.layers.lunarg_api_dump.api;

import com.io7m.jcoronado.extensions.ext_layer_settings.api.VulkanLayerSettingIntegerUnsigned32;
import com.io7m.jcoronado.extensions.ext_layer_settings.api.VulkanLayerSettingType;

import java.util.List;

/**
* @param size The indent size
*
* @see "https://vulkan.lunarg.com/doc/view/latest/linux/api_dump_layer.html"
*/

public record VulkanAPIDumpIndentSize(
int size)
implements VulkanAPIDumpSettingType
{
@Override
public VulkanLayerSettingType toSetting()
{
return new VulkanLayerSettingIntegerUnsigned32(
"VK_LAYER_LUNARG_api_dump",
"lunarg_api_dump.indent_size",
List.of(Integer.valueOf(this.size))
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright © 2024 Mark Raynsford <[email protected]> https://www.io7m.com
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/


package com.io7m.jcoronado.layers.lunarg_api_dump.api;

import com.io7m.jcoronado.extensions.ext_layer_settings.api.VulkanLayerSettingString;
import com.io7m.jcoronado.extensions.ext_layer_settings.api.VulkanLayerSettingType;

import java.nio.file.Path;
import java.util.List;

/**
* @param file The file
*
* @see "https://vulkan.lunarg.com/doc/view/latest/linux/api_dump_layer.html"
*/

public record VulkanAPIDumpLogFilename(
Path file)
implements VulkanAPIDumpSettingType
{
@Override
public VulkanLayerSettingType toSetting()
{
return new VulkanLayerSettingString(
"VK_LAYER_LUNARG_api_dump",
"lunarg_api_dump.log_filename",
List.of(this.file.toAbsolutePath().toString())
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* Copyright © 2024 Mark Raynsford <[email protected]> https://www.io7m.com
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/


package com.io7m.jcoronado.layers.lunarg_api_dump.api;

import com.io7m.jcoronado.extensions.ext_layer_settings.api.VulkanLayerSettingBoolean;
import com.io7m.jcoronado.extensions.ext_layer_settings.api.VulkanLayerSettingType;

import java.util.List;

/**
* @param enabled If enabled
*
* @see "https://vulkan.lunarg.com/doc/view/latest/linux/api_dump_layer.html"
*/

public record VulkanAPIDumpLogFlushAfterWrite(
boolean enabled)
implements VulkanAPIDumpSettingType
{
@Override
public VulkanLayerSettingType toSetting()
{
return new VulkanLayerSettingBoolean(
"VK_LAYER_LUNARG_api_dump",
"lunarg_api_dump.flush",
List.of(Boolean.valueOf(this.enabled))
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* Copyright © 2024 Mark Raynsford <[email protected]> https://www.io7m.com
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/


package com.io7m.jcoronado.layers.lunarg_api_dump.api;

import com.io7m.jcoronado.extensions.ext_layer_settings.api.VulkanLayerSettingString;
import com.io7m.jcoronado.extensions.ext_layer_settings.api.VulkanLayerSettingType;

import java.util.List;

/**
* @param format The output format
*
* @see "https://vulkan.lunarg.com/doc/view/latest/linux/api_dump_layer.html"
*/

public record VulkanAPIDumpOutputFormat(
VulkanAPIDumpOutputFormatType format)
implements VulkanAPIDumpSettingType
{
@Override
public VulkanLayerSettingType toSetting()
{
return new VulkanLayerSettingString(
"VK_LAYER_LUNARG_api_dump",
"lunarg_api_dump.output_format",
List.of(
switch (this.format) {
case TEXT -> "text";
case HTML -> "html";
case JSON -> "json";
}
)
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright © 2024 Mark Raynsford <[email protected]> https://www.io7m.com
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/


package com.io7m.jcoronado.layers.lunarg_api_dump.api;

/**
* The output format.
*/

public enum VulkanAPIDumpOutputFormatType
{
/**
* Plain text format.
*/

TEXT,

/**
* HTML format.
*/

HTML,

/**
* JSON format.
*/

JSON
}
Loading

0 comments on commit f081e7e

Please sign in to comment.