mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-27 15:09:11 +00:00
Add SDL_SetGPUBlendConstants, SDL_SetGPUStencilReference (#10704)
This commit is contained in:
parent
04a732881a
commit
2d4eb29c37
10 changed files with 383 additions and 189 deletions
|
@ -194,11 +194,6 @@ SDL_GPUGraphicsPipeline *SDL_GPU_FetchBlitPipeline(
|
|||
|
||||
blitPipelineCreateInfo.primitiveType = SDL_GPU_PRIMITIVETYPE_TRIANGLELIST;
|
||||
|
||||
blitPipelineCreateInfo.blendConstants[0] = 1.0f;
|
||||
blitPipelineCreateInfo.blendConstants[1] = 1.0f;
|
||||
blitPipelineCreateInfo.blendConstants[2] = 1.0f;
|
||||
blitPipelineCreateInfo.blendConstants[3] = 1.0f;
|
||||
|
||||
pipeline = SDL_CreateGPUGraphicsPipeline(
|
||||
device,
|
||||
&blitPipelineCreateInfo);
|
||||
|
@ -1281,6 +1276,42 @@ void SDL_SetGPUScissor(
|
|||
scissor);
|
||||
}
|
||||
|
||||
void SDL_SetGPUBlendConstants(
|
||||
SDL_GPURenderPass *renderPass,
|
||||
SDL_FColor blendConstants)
|
||||
{
|
||||
if (renderPass == NULL) {
|
||||
SDL_InvalidParamError("renderPass");
|
||||
return;
|
||||
}
|
||||
|
||||
if (RENDERPASS_DEVICE->debugMode) {
|
||||
CHECK_RENDERPASS
|
||||
}
|
||||
|
||||
RENDERPASS_DEVICE->SetBlendConstants(
|
||||
RENDERPASS_COMMAND_BUFFER,
|
||||
blendConstants);
|
||||
}
|
||||
|
||||
void SDL_SetGPUStencilReference(
|
||||
SDL_GPURenderPass *renderPass,
|
||||
Uint8 reference)
|
||||
{
|
||||
if (renderPass == NULL) {
|
||||
SDL_InvalidParamError("renderPass");
|
||||
return;
|
||||
}
|
||||
|
||||
if (RENDERPASS_DEVICE->debugMode) {
|
||||
CHECK_RENDERPASS
|
||||
}
|
||||
|
||||
RENDERPASS_DEVICE->SetStencilReference(
|
||||
RENDERPASS_COMMAND_BUFFER,
|
||||
reference);
|
||||
}
|
||||
|
||||
void SDL_BindGPUVertexBuffers(
|
||||
SDL_GPURenderPass *renderPass,
|
||||
Uint32 firstBinding,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue