- Implement texture memory budget tracking to prevent GPU memory exhaustion.
- Add validation for texture dimensions against GPU capabilities before loading.
- Introduce checks for memory budget before texture allocation.
- Validate the success of bgfx::copy() during texture loading.
- Improve error handling and logging for texture creation failures.
- Ensure proper cleanup of texture memory during pipeline destruction.
- Add comprehensive unit tests for initialization order, texture loading, and resource management.
- Document potential issues in LoadTextureFromFile and shader compilation processes.
- Updated MeshPayload structure to include tangents.
- Modified BuildPayloadFromBspBuffer to compute tangents based on vertex normals.
- Enhanced AppendMeshPayload to handle tangents, either from mesh data or generated.
- Updated PushMeshToLua to expose tangents to Lua.
- Adjusted ReadVertexArray to read tangents from Lua.
feat(shader): implement ShaderPipelineValidator for shader validation
- Added ShaderPipelineValidator class to validate shader inputs/outputs and vertex layouts.
- Implemented methods to extract shader attributes and validate against vertex layouts.
- Added comprehensive validation checks for shader pipelines, including SPIR-V requirements.
- Created a logger interface for validation results.
test(shader): add unit tests for ShaderPipelineValidator
- Implemented extensive unit tests for shader validation, covering various scenarios.
- Tests include extraction of shader inputs/outputs, validation of vertex layout matches, stride checks, and interface matching.
- Added edge case tests for empty shaders and comments in GLSL code.
- Introduced string_view class for non-owning string references.
- Added traits header for type traits and utility functions.
- Implemented unordered_map class for hash table based key-value storage.
- Created unordered_set class for hash table based unique key storage.
- Developed vector class for dynamic array functionality with various utility methods.
- Implemented `compilePSSLShader` function in `shaderc_pssl.cpp` to handle PSSL shader compilation, currently returning an unsupported message.
- Introduced `shaderc_spirv.cpp` with comprehensive SPIR-V shader compilation logic, including GLSL to SPIR-V translation, reflection, and uniform handling.
- Added necessary includes and defined resource limits for SPIR-V compilation.
- Established texture format mappings and attribute enumerations for shader inputs.
- Enhanced error handling and logging for shader compilation processes.
- Introduced a new vertex shader for texture cube rendering in `vs_texture_cube.sc`.
- Enabled debugging for shader validation in the graphics backend initialization.
- Refactored GUI shaders to use a structured output for vertex data, improving clarity and maintainability.
- Updated shader compiler to disable automatic uniform binding, allowing for explicit binding in shaders.
- Simplified shader binary wrapping by removing unnecessary uniform and attribute metadata embedding, leveraging bgfx's reflection capabilities.
refactor(bgfx_gui_service): Integrate BgfxShaderCompiler for shader creation and validation
test(bgfx_gui_service): Enhance tests to validate shader key presence and uniform initialization