switch to new azur way of allocating commands

This commit is contained in:
Lephenixnoir 2023-06-15 20:21:54 +02:00
parent c99c38bf0b
commit 81f3f9f9a5
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 7 additions and 5 deletions

View File

@ -32,11 +32,13 @@ void shader_fsblend(uint16_t color, int alpha)
{
prof_enter(azrp_perf_cmdgen);
struct command cmd;
cmd.shader_id = BOSONX_SHADER_FSBLEND;
cmd.alpha = (alpha & 31);
cmd.color_expanded = ((color << 16) | color) & 0x07e0f81f;
struct command *cmd =
(struct command *)azrp_new_command(sizeof *cmd, 0, azrp_frag_count);
if(cmd) {
cmd->shader_id = BOSONX_SHADER_FSBLEND;
cmd->alpha = (alpha & 31);
cmd->color_expanded = ((color << 16) | color) & 0x07e0f81f;
}
azrp_queue_command(&cmd, sizeof cmd, 0, azrp_frag_count);
prof_leave(azrp_perf_cmdgen);
}