]> git.tdb.fi Git - libs/gl.git/log
libs/gl.git
13 months agoCheck the flat qualifier from the correct member master
Mikko Rasa [Thu, 6 Oct 2022 11:09:30 +0000 (14:09 +0300)]
Check the flat qualifier from the correct member

13 months agoAdd an internal error for invalid equality comparison in SPIR-V
Mikko Rasa [Thu, 6 Oct 2022 10:48:26 +0000 (13:48 +0300)]
Add an internal error for invalid equality comparison in SPIR-V

13 months agoUse a splat material for the terrain in forest pond
Mikko Rasa [Thu, 6 Oct 2022 10:37:54 +0000 (13:37 +0300)]
Use a splat material for the terrain in forest pond

13 months agoRename VulkanFramebuffer::prepare_image_layouts to synchronize_resources
Mikko Rasa [Thu, 6 Oct 2022 10:31:08 +0000 (13:31 +0300)]
Rename VulkanFramebuffer::prepare_image_layouts to synchronize_resources

For consistency with PipelineState.

13 months agoDon't apply primitive restart to list primitives
Mikko Rasa [Thu, 6 Oct 2022 10:19:06 +0000 (13:19 +0300)]
Don't apply primitive restart to list primitives

13 months agoSynchronize sampled images in addition to storage images
Mikko Rasa [Thu, 6 Oct 2022 10:15:57 +0000 (13:15 +0300)]
Synchronize sampled images in addition to storage images

The same image may alternate between sampled and storage for successive
compute dispatches, and different layouts are needed for each usage.

13 months agoShader fixes in the forest pond demo
Mikko Rasa [Thu, 6 Oct 2022 09:50:07 +0000 (12:50 +0300)]
Shader fixes in the forest pond demo

13 months agoSet a default value for the tint property in PbrMaterial
Mikko Rasa [Wed, 5 Oct 2022 11:35:04 +0000 (14:35 +0300)]
Set a default value for the tint property in PbrMaterial

13 months agoSupport exporting splat materials from Blender
Mikko Rasa [Tue, 4 Oct 2022 22:13:24 +0000 (01:13 +0300)]
Support exporting splat materials from Blender

13 months agoImplement a splat material type
Mikko Rasa [Tue, 4 Oct 2022 22:07:15 +0000 (01:07 +0300)]
Implement a splat material type

Currently it can't hold very many sub-materials because of limitations
of ProgramData.

13 months agoRearrange some things in the shader library
Mikko Rasa [Tue, 4 Oct 2022 21:34:03 +0000 (00:34 +0300)]
Rearrange some things in the shader library

Lighting parameters and queries are now in their own module.  The Cook-
Torrance BRDF has been separated from the PBR material so it's easier to
use elsewhere.

13 months agoChange the vertex group attribute to uvec4
Mikko Rasa [Tue, 4 Oct 2022 21:15:18 +0000 (00:15 +0300)]
Change the vertex group attribute to uvec4

The exporter writes it as UBYTE, which is not compatible with a signed
integer attribute.

13 months agoFix some errors in the Phong shader
Mikko Rasa [Tue, 4 Oct 2022 21:11:58 +0000 (00:11 +0300)]
Fix some errors in the Phong shader

13 months agoRefactor handling some material parameters in cooktorrance.glsl
Mikko Rasa [Mon, 3 Oct 2022 20:44:46 +0000 (23:44 +0300)]
Refactor handling some material parameters in cooktorrance.glsl

Occlusion is now passed as a parameter to the lighting function.
Emission is handled outside of it since it's not properly a part of the
Cook-Torrance BRDF.

13 months agoHandle OpPhi when specializing SPIR-V modules
Mikko Rasa [Mon, 3 Oct 2022 20:43:33 +0000 (23:43 +0300)]
Handle OpPhi when specializing SPIR-V modules

13 months agoHack to work around an issue with the flat interpolation qualifier
Mikko Rasa [Sat, 1 Oct 2022 20:05:45 +0000 (23:05 +0300)]
Hack to work around an issue with the flat interpolation qualifier

It appears that at least on my current system (GeForce 980 Ti, driver
460.91.03) vertex attributes somehow block the flat qualifier from
working on the same location.  It feels like a driver bug but that
remains to be confirmed.

14 months agoAn assortment of minor fixes
Mikko Rasa [Sun, 25 Sep 2022 17:21:19 +0000 (20:21 +0300)]
An assortment of minor fixes

Mostly formatting, with a few cleanups of unnecessary things.

14 months agoOnly apply ambient occlusion to the ambient lighting component
Mikko Rasa [Sun, 25 Sep 2022 17:15:03 +0000 (20:15 +0300)]
Only apply ambient occlusion to the ambient lighting component

14 months agoRecreate ProgramData buffer when needed even if no blocks were updated
Mikko Rasa [Sun, 25 Sep 2022 17:02:52 +0000 (20:02 +0300)]
Recreate ProgramData buffer when needed even if no blocks were updated

This can happen if setting a uniform triggers promotion of the buffer
from static to streaming, but the next shader program does not use that
uniform.

14 months agoUse forward references for entry point interfaces in SPIR-V
Mikko Rasa [Sun, 25 Sep 2022 16:58:40 +0000 (19:58 +0300)]
Use forward references for entry point interfaces in SPIR-V

14 months agoAdd a tint property for PBR materials
Mikko Rasa [Sun, 25 Sep 2022 16:45:34 +0000 (19:45 +0300)]
Add a tint property for PBR materials

14 months agoFix exporting of single objects
Mikko Rasa [Sun, 25 Sep 2022 16:32:08 +0000 (19:32 +0300)]
Fix exporting of single objects

14 months agoRefactor handling of texture storage properties in the Blender exporter
Mikko Rasa [Sun, 25 Sep 2022 16:13:43 +0000 (19:13 +0300)]
Refactor handling of texture storage properties in the Blender exporter

14 months agoAdd flat interpolation qualifier for integer inputs in fragment shader
Mikko Rasa [Sun, 25 Sep 2022 14:49:15 +0000 (17:49 +0300)]
Add flat interpolation qualifier for integer inputs in fragment shader

14 months agoFix validation checks for interpolation and sampling qualifiers
Mikko Rasa [Sun, 25 Sep 2022 14:48:51 +0000 (17:48 +0300)]
Fix validation checks for interpolation and sampling qualifiers

14 months agoPrint warnings if a required resource is not bound in PipelineState
Mikko Rasa [Sun, 25 Sep 2022 13:18:01 +0000 (16:18 +0300)]
Print warnings if a required resource is not bound in PipelineState

14 months agoRestore limits.max_storage_texture_bindings in Vulkan backend
Mikko Rasa [Sun, 11 Sep 2022 17:28:38 +0000 (20:28 +0300)]
Restore limits.max_storage_texture_bindings in Vulkan backend

Something funky happened with commits 569772f and 2a70fec, resulting in
this getting removed.

14 months agoRemove the separate clamping step from forest pond fluid simulation
Mikko Rasa [Sun, 11 Sep 2022 17:23:52 +0000 (20:23 +0300)]
Remove the separate clamping step from forest pond fluid simulation

Instead calculate clamping on the fly in the integration shader.  This
ends up using a few less texture reads in total.

14 months agoImplement water simulation and surface shader for forest pond
Mikko Rasa [Sun, 11 Sep 2022 12:54:22 +0000 (15:54 +0300)]
Implement water simulation and surface shader for forest pond

14 months agoRe-export forest pond data to enable alpha to coverage
Mikko Rasa [Sun, 11 Sep 2022 12:53:39 +0000 (15:53 +0300)]
Re-export forest pond data to enable alpha to coverage

14 months agoDeclare capability for extended storage image formats if required
Mikko Rasa [Tue, 6 Sep 2022 11:54:35 +0000 (14:54 +0300)]
Declare capability for extended storage image formats if required

14 months agoPass a non-sampled image to OP_IMAGE_FETCH
Mikko Rasa [Tue, 6 Sep 2022 11:52:56 +0000 (14:52 +0300)]
Pass a non-sampled image to OP_IMAGE_FETCH

14 months agoFix exporting of resource-only scenes
Mikko Rasa [Sun, 4 Sep 2022 10:55:57 +0000 (13:55 +0300)]
Fix exporting of resource-only scenes

14 months agoCompare constructor calls in TypeComparer
Mikko Rasa [Sat, 3 Sep 2022 19:25:27 +0000 (22:25 +0300)]
Compare constructor calls in TypeComparer

These may arise if e.g. an uint constant is initialized with an integer
literal.

14 months agoSupport exporting meshes from Blender using patch primitives
Mikko Rasa [Sat, 3 Sep 2022 13:40:35 +0000 (16:40 +0300)]
Support exporting meshes from Blender using patch primitives

14 months agoAdd tessellation shader support to the engine
Mikko Rasa [Sat, 3 Sep 2022 13:38:03 +0000 (16:38 +0300)]
Add tessellation shader support to the engine

14 months agoRefactor batch setup in Renderer to a helper function
Mikko Rasa [Sat, 3 Sep 2022 13:36:44 +0000 (16:36 +0300)]
Refactor batch setup in Renderer to a helper function

14 months agoClear load ID when assigning to a component
Mikko Rasa [Sat, 3 Sep 2022 13:31:16 +0000 (16:31 +0300)]
Clear load ID when assigning to a component

This prevents an issue where reading the value of the entire variable
afterwards would incorrectly use the old cached load.

14 months agoImplement tessellation shaders in the shader compiler
Mikko Rasa [Sat, 3 Sep 2022 13:14:43 +0000 (16:14 +0300)]
Implement tessellation shaders in the shader compiler

14 months agoHandle the flat and centroid qualifiers in SPIR-V output
Mikko Rasa [Sat, 3 Sep 2022 13:15:52 +0000 (16:15 +0300)]
Handle the flat and centroid qualifiers in SPIR-V output

14 months agoValidate that compute shaders specify a workgroup size
Mikko Rasa [Sat, 3 Sep 2022 12:05:33 +0000 (15:05 +0300)]
Validate that compute shaders specify a workgroup size

14 months agoValidate the presence of in/out layout qualifiers for geometry shaders
Mikko Rasa [Sat, 3 Sep 2022 11:33:43 +0000 (14:33 +0300)]
Validate the presence of in/out layout qualifiers for geometry shaders

Builtin arrays are now always autosized, even when the appropriate size
isn't known, because the error message from the missing size is confusing.

14 months agoFix incorrect check for end of string when processing SPIR-V modules
Mikko Rasa [Thu, 1 Sep 2022 19:44:32 +0000 (22:44 +0300)]
Fix incorrect check for end of string when processing SPIR-V modules

14 months agoMake VulkanFramebuffer::is_format_supported const
Mikko Rasa [Thu, 1 Sep 2022 19:36:14 +0000 (22:36 +0300)]
Make VulkanFramebuffer::is_format_supported const

14 months agoUse correct to_present flag when creating framebuffers and pipelines
Mikko Rasa [Thu, 1 Sep 2022 19:32:37 +0000 (22:32 +0300)]
Use correct to_present flag when creating framebuffers and pipelines

After a recent update validation layers started complaining about
incompatible render passes because subpass dependencies did not match.

14 months agoMake it possible to query if a framebuffer can be presented
Mikko Rasa [Thu, 1 Sep 2022 19:31:17 +0000 (22:31 +0300)]
Make it possible to query if a framebuffer can be presented

15 months agoRefactor creation of batches in the Blender exporter
Mikko Rasa [Sat, 13 Aug 2022 19:44:58 +0000 (22:44 +0300)]
Refactor creation of batches in the Blender exporter

19 months agoUse alpha to coverage when exporting materials with alpha cutoff
Mikko Rasa [Sat, 23 Apr 2022 21:31:03 +0000 (00:31 +0300)]
Use alpha to coverage when exporting materials with alpha cutoff

19 months agoAdd support for alpha to coverage
Mikko Rasa [Sat, 23 Apr 2022 16:33:58 +0000 (19:33 +0300)]
Add support for alpha to coverage

19 months agoUpdate pipeline handle if framebuffer changes
Mikko Rasa [Tue, 19 Apr 2022 10:01:37 +0000 (13:01 +0300)]
Update pipeline handle if framebuffer changes

The pipeline's sample count must match that of the render pass.

19 months agoImplement multisample resolve for Vulkan
Mikko Rasa [Tue, 19 Apr 2022 08:46:11 +0000 (11:46 +0300)]
Implement multisample resolve for Vulkan

19 months agoDon't set the storage bit in usage flags of multisampled images
Mikko Rasa [Tue, 19 Apr 2022 08:44:13 +0000 (11:44 +0300)]
Don't set the storage bit in usage flags of multisampled images

It requires a device feature to be set.  I'll add that later.

19 months agoSet mip levels of multisample textures to 1
Mikko Rasa [Tue, 19 Apr 2022 08:40:32 +0000 (11:40 +0300)]
Set mip levels of multisample textures to 1

19 months agoRework multisample resolve to use resolve attachments
Mikko Rasa [Tue, 19 Apr 2022 07:27:53 +0000 (10:27 +0300)]
Rework multisample resolve to use resolve attachments

Vulkan can only resolve a depth attachment as part of a subpass, and in
order to do that the attachments must all be in the same framebuffer.

19 months agoRemove unused parameter from VulkanPipelineState::synchronize_resources
Mikko Rasa [Tue, 19 Apr 2022 07:14:25 +0000 (10:14 +0300)]
Remove unused parameter from VulkanPipelineState::synchronize_resources

It got left over from an idea which didn't pan out.

19 months agoSupport compute shaders and compute operations
Mikko Rasa [Fri, 15 Apr 2022 21:17:05 +0000 (00:17 +0300)]
Support compute shaders and compute operations

19 months agoAdd support for storage images in Renderer and PipelineState
Mikko Rasa [Fri, 15 Apr 2022 20:10:37 +0000 (23:10 +0300)]
Add support for storage images in Renderer and PipelineState

19 months agoAdd a separate limit for storage texture binding range
Mikko Rasa [Fri, 15 Apr 2022 19:44:25 +0000 (22:44 +0300)]
Add a separate limit for storage texture binding range

19 months agoFix the version statement in the ARB_explicit_attrib_location extension
Mikko Rasa [Fri, 15 Apr 2022 19:40:52 +0000 (22:40 +0300)]
Fix the version statement in the ARB_explicit_attrib_location extension

19 months agoSupport compute shaders in the shader compiler
Mikko Rasa [Mon, 11 Apr 2022 11:44:16 +0000 (14:44 +0300)]
Support compute shaders in the shader compiler

19 months agoAdd support for storage images in shaders
Mikko Rasa [Mon, 11 Apr 2022 11:37:01 +0000 (14:37 +0300)]
Add support for storage images in shaders

19 months agoPreparatory refactoring of the texelFetch implementation
Mikko Rasa [Mon, 11 Apr 2022 11:35:16 +0000 (14:35 +0300)]
Preparatory refactoring of the texelFetch implementation

19 months agoUse the sampled image type for OpImageQueryLod
Mikko Rasa [Mon, 11 Apr 2022 11:24:07 +0000 (14:24 +0300)]
Use the sampled image type for OpImageQueryLod

19 months agoDon't resolve function call arguments with incorrect types
Mikko Rasa [Mon, 11 Apr 2022 11:22:48 +0000 (14:22 +0300)]
Don't resolve function call arguments with incorrect types

19 months agoRefactor function call argument type resolving logic a bit
Mikko Rasa [Mon, 11 Apr 2022 11:22:25 +0000 (14:22 +0300)]
Refactor function call argument type resolving logic a bit

19 months agoAdd multisampled texture types to the shader compiler
Mikko Rasa [Sun, 10 Apr 2022 10:03:20 +0000 (13:03 +0300)]
Add multisampled texture types to the shader compiler

19 months agoParse array sizes for interface blocks
Mikko Rasa [Sat, 9 Apr 2022 16:24:53 +0000 (19:24 +0300)]
Parse array sizes for interface blocks

This fixes the last failing test case.

19 months agoUse VariableDeclaration in Assignment::Target
Mikko Rasa [Sat, 9 Apr 2022 16:02:40 +0000 (19:02 +0300)]
Use VariableDeclaration in Assignment::Target

19 months agoDon't add depth range conversion if an assignment to gl_Position.z exists
Mikko Rasa [Sat, 9 Apr 2022 16:01:25 +0000 (19:01 +0300)]
Don't add depth range conversion if an assignment to gl_Position.z exists

This is kinda crude since it triggers from any such assignment, but it
allows the idempotence test cases to work.

19 months agoFix GLSL test cases so they pass the basic tests
Mikko Rasa [Sat, 9 Apr 2022 13:22:21 +0000 (16:22 +0300)]
Fix GLSL test cases so they pass the basic tests

Some changes had changed the compiler output, particularly acd7bb6 adding
an extra statement to the end of vertex shaders in OpenGL mode. Some
idempotence tests still fail because of this.

19 months agoMake it possible to specify a target API for GLSL test cases
Mikko Rasa [Sat, 9 Apr 2022 11:43:49 +0000 (14:43 +0300)]
Make it possible to specify a target API for GLSL test cases

19 months agoRemove Vulkan checks from feature converters
Mikko Rasa [Sat, 9 Apr 2022 11:41:04 +0000 (14:41 +0300)]
Remove Vulkan checks from feature converters

Since the GLSL version is now consistent, features can be checked
against it.  This also makes the GLSL output behave better if used
on a shader compiled for Vulkan.

19 months agoRefactor SL::Features::from_api_version to take the actual API version
Mikko Rasa [Sat, 9 Apr 2022 11:39:37 +0000 (14:39 +0300)]
Refactor SL::Features::from_api_version to take the actual API version

Vulkan features now have a sensible GLSL version.

19 months agoFix incorrect version for ARB_explicit_attrib_location
Mikko Rasa [Sat, 9 Apr 2022 11:34:44 +0000 (14:34 +0300)]
Fix incorrect version for ARB_explicit_attrib_location

19 months agoRefactor Renderer's texture management to make it more extensible
Mikko Rasa [Sat, 9 Apr 2022 06:33:21 +0000 (09:33 +0300)]
Refactor Renderer's texture management to make it more extensible

The same code can now be used for other kinds of resources as well.

19 months agoUnify handling of shader resources in PipelineState
Mikko Rasa [Fri, 8 Apr 2022 20:44:37 +0000 (23:44 +0300)]
Unify handling of shader resources in PipelineState

19 months agoFix an incorrect variable name
Mikko Rasa [Thu, 7 Apr 2022 20:54:10 +0000 (23:54 +0300)]
Fix an incorrect variable name

19 months agoRefresh target framebuffer before blitting
Mikko Rasa [Thu, 7 Apr 2022 20:50:31 +0000 (23:50 +0300)]
Refresh target framebuffer before blitting

It seems that this has been broken since ce36589 without getting noticed.

19 months agoUse a default sampler in Renderer if null was passed in
Mikko Rasa [Thu, 7 Apr 2022 07:38:21 +0000 (10:38 +0300)]
Use a default sampler in Renderer if null was passed in

20 months agoRefactor render pass operations into a helper struct
Mikko Rasa [Tue, 22 Mar 2022 07:53:09 +0000 (09:53 +0200)]
Refactor render pass operations into a helper struct

20 months agoSome adjustments to includes
Mikko Rasa [Tue, 22 Mar 2022 07:19:39 +0000 (09:19 +0200)]
Some adjustments to includes

20 months agoFix issues from the command recorder refactoring
Mikko Rasa [Mon, 21 Mar 2022 21:31:05 +0000 (23:31 +0200)]
Fix issues from the command recorder refactoring

20 months agoMake StructureBuilder return const references to the pointers
Mikko Rasa [Sat, 19 Mar 2022 22:45:57 +0000 (00:45 +0200)]
Make StructureBuilder return const references to the pointers

20 months agoAdd a wrapper class for recording Vulkan commands
Mikko Rasa [Sat, 19 Mar 2022 08:51:40 +0000 (10:51 +0200)]
Add a wrapper class for recording Vulkan commands

This makes the command syntax shorter by storing the command buffer
handle in the wrapper.

20 months agoMove environment map handling to its own shader file
Mikko Rasa [Sat, 19 Mar 2022 07:57:38 +0000 (09:57 +0200)]
Move environment map handling to its own shader file

20 months agoFix a copy-paste error
Mikko Rasa [Sat, 19 Mar 2022 07:54:49 +0000 (09:54 +0200)]
Fix a copy-paste error

20 months agoAdd files which were forgotten earlier
Mikko Rasa [Fri, 18 Mar 2022 22:57:03 +0000 (00:57 +0200)]
Add files which were forgotten earlier

These should have been in 370eb9e.

20 months agoBegin creating a new demo program
Mikko Rasa [Fri, 18 Mar 2022 22:49:32 +0000 (00:49 +0200)]
Begin creating a new demo program

20 months agoMostly cosmetic changes
Mikko Rasa [Thu, 17 Mar 2022 20:12:20 +0000 (22:12 +0200)]
Mostly cosmetic changes

20 months agoMake it possible to export instance arrays from Blender
Mikko Rasa [Thu, 17 Mar 2022 20:08:13 +0000 (22:08 +0200)]
Make it possible to export instance arrays from Blender

20 months agoAdd a loader to InstanceArray and make them loadable in scenes
Mikko Rasa [Thu, 17 Mar 2022 20:06:10 +0000 (22:06 +0200)]
Add a loader to InstanceArray and make them loadable in scenes

20 months agoAdd instancing support to standard shaders and RenderMethod
Mikko Rasa [Thu, 17 Mar 2022 20:04:52 +0000 (22:04 +0200)]
Add instancing support to standard shaders and RenderMethod

20 months agoCall set_matrix from ObjectInstance's transform loader
Mikko Rasa [Thu, 17 Mar 2022 20:00:58 +0000 (22:00 +0200)]
Call set_matrix from ObjectInstance's transform loader

20 months agoFix instance attribute description updates in VertexSetup on Vulkan
Mikko Rasa [Thu, 17 Mar 2022 19:57:09 +0000 (21:57 +0200)]
Fix instance attribute description updates in VertexSetup on Vulkan

It was ignoring padding attributes when calculating which index to use
for the first instance attribute, resulting in a bogus description.

20 months agoSort shader program input attributes by name
Mikko Rasa [Thu, 17 Mar 2022 19:56:40 +0000 (21:56 +0200)]
Sort shader program input attributes by name

The lookup requires this.  It seems to have gotten broken in 2576b61, but
since the only user is InstanceArray, it wasn't noticed until now.

20 months agoRedesign InstanceArray
Mikko Rasa [Thu, 17 Mar 2022 19:55:18 +0000 (21:55 +0200)]
Redesign InstanceArray

It now stores the instances contiguously in memory instead of allocating
them individually.  Consequently only one type of instance is allowed in
any particular array.

20 months agoRebind all descriptor sets if push constant layout changes
Mikko Rasa [Thu, 17 Mar 2022 19:47:01 +0000 (21:47 +0200)]
Rebind all descriptor sets if push constant layout changes

20 months agoFurther refactoring of instance handling in the Blender exporter
Mikko Rasa [Thu, 17 Mar 2022 10:17:48 +0000 (12:17 +0200)]
Further refactoring of instance handling in the Blender exporter

20 months agoMove the utility functions in export_material into MaterialExporter
Mikko Rasa [Thu, 17 Mar 2022 09:06:47 +0000 (11:06 +0200)]
Move the utility functions in export_material into MaterialExporter

20 months agoRemove support for material atlases from the Blender exporter
Mikko Rasa [Thu, 17 Mar 2022 08:46:50 +0000 (10:46 +0200)]
Remove support for material atlases from the Blender exporter

Support for PBR materials was never added and it's unknown if it even
works anymore.  Baking and vertex colors are better solutions.