Skip to content

Conversation

slouken
Copy link
Collaborator

@slouken slouken commented Sep 26, 2025

Closes #6192

@slouken slouken marked this pull request as draft September 26, 2025 20:34
@slouken
Copy link
Collaborator Author

slouken commented Sep 26, 2025

@icculus, I still need to add GPU support for this, but at least it works from an API perspective. What do you think?

@slouken slouken force-pushed the palette branch 3 times, most recently from d09ca0f to d025fb2 Compare September 26, 2025 22:46
@slouken slouken force-pushed the palette branch 2 times, most recently from c4854f1 to b144cc2 Compare September 27, 2025 06:21
@slouken slouken marked this pull request as ready for review September 28, 2025 06:05
Each texture gets its own palette, the palette is updated when it is rendered if necessary, rendering is flushed if a texture render is already queued up.

Trying to share palettes and handle the different cases of queued rendering and changing palettes in the middle of the frame ends up being very complicated, so we'll keep it simple for now.
This is needed to add more fragment shader constants in the future as we're already at our 64 size limit
VUID-VkPipelineRasterizationStateCreateInfo-depthClampEnable-00782(ERROR / SPEC): msgNum: -316906200 - Validation Error: [ VUID-VkPipelineRasterizationStateCreateInfo-depthClampEnable-00782 ] | MessageID = 0xed1c6528 | vkCreateGraphicsPipelines(): pCreateInfos[0].pRasterizationState->depthClampEnable is VK_TRUE, but the depthClamp feature was not enabled. The Vulkan spec states: If the depthClamp feature is not enabled, depthClampEnable must be VK_FALSE (https://vulkan.lunarg.com/doc/view/1.3.268.0/windows/1.3-extensions/vkspec.html#VUID-VkPipelineRasterizationStateCreateInfo-depthClampEnable-00782)
Supported backends: direct3d, direct3d11, direct3d12, gpu, metal, opengl, opengles2
@slouken slouken force-pushed the palette branch 2 times, most recently from 5bae749 to ebe5fcc Compare September 29, 2025 04:32
When the application modifies the palette, any textures that use it will automatically be updated.
@slouken slouken merged commit b655901 into libsdl-org:main Sep 29, 2025
42 checks passed
@slouken slouken deleted the palette branch September 29, 2025 05:10
@sezero
Copy link
Contributor

sezero commented Sep 29, 2025

sdl2-compat test are failing in buildbots. Is this he culprit?

@madebr
Copy link
Contributor

madebr commented Sep 29, 2025

sdl2-compat test are failing in buildbots. Is this he culprit?

#14061 is more likely

@sezero
Copy link
Contributor

sezero commented Sep 29, 2025

sdl2-compat test are failing in buildbots. Is this he culprit?

#14061 is more likely

I don't see how?

Here is he excerpt from linux run:

2025-09-29T05:35:11.5619808Z 13: INFO:  09/29/25 05:35:11: Assert 'Call to SDL_RWFromMem(data, 0) succeeded': Passed
2025-09-29T05:35:11.5619980Z 13: ERROR: 09/29/25 05:35:11: Assert 'Verify SDL_RWFromMem(data, 0) returns NULL': Failed
2025-09-29T05:35:11.5620156Z 13: INFO:  09/29/25 05:35:11: Assert 'Call to SDL_RWFromConstMem(data, 0) succeeded': Passed
2025-09-29T05:35:11.5620350Z 13: ERROR: 09/29/25 05:35:11: Assert 'Verify SDL_RWFromConstMem(data, 0) returns NULL': Failed
2025-09-29T05:35:11.5620562Z 13: INFO:  09/29/25 05:35:11: Assert 'Verify result from remove(rwops_read), expected 0, got 0': Passed
2025-09-29T05:35:11.5620796Z 13: INFO:  09/29/25 05:35:11: Assert 'Verify result from remove(rwops_alphabet), expected 0, got 0': Passed
2025-09-29T05:35:11.5621022Z 13: INFO:  09/29/25 05:35:11: Assert 'Cleanup of test files completed': Passed
2025-09-29T05:35:11.5621169Z 13: ERROR: 09/29/25 05:35:11: Assert Summary: Total=26 Passed=24 Failed=2
2025-09-29T05:35:11.5621284Z 13: INFO:  09/29/25 05:35:11: Total Test runtime: 0.0 sec
2025-09-29T05:35:11.5621627Z 13: ERROR: 09/29/25 05:35:11: >>> Test 'rwops_testParamNegative': Failed

@sezero
Copy link
Contributor

sezero commented Sep 29, 2025

Should be #13840 I guess, droppin a note in there now.

@madebr

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants