mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/ir: Lower texkill instructions to discard_nz.
This commit is contained in:
committed by
Alexandre Julliard
parent
7e75ac63a1
commit
b92f6c448a
Notes:
Alexandre Julliard
2024-01-24 22:53:52 +01:00
Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/514
@@ -2084,6 +2084,23 @@ bool shader_instruction_array_reserve(struct vkd3d_shader_instruction_array *ins
|
||||
return true;
|
||||
}
|
||||
|
||||
bool shader_instruction_array_insert_at(struct vkd3d_shader_instruction_array *instructions,
|
||||
unsigned int idx, unsigned int count)
|
||||
{
|
||||
assert(idx <= instructions->count);
|
||||
|
||||
if (!shader_instruction_array_reserve(instructions, instructions->count + count))
|
||||
return false;
|
||||
|
||||
memmove(&instructions->elements[idx + count], &instructions->elements[idx],
|
||||
(instructions->count - idx) * sizeof(*instructions->elements));
|
||||
memset(&instructions->elements[idx], 0, count * sizeof(*instructions->elements));
|
||||
|
||||
instructions->count += count;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool shader_instruction_array_add_icb(struct vkd3d_shader_instruction_array *instructions,
|
||||
struct vkd3d_shader_immediate_constant_buffer *icb)
|
||||
{
|
||||
|
Reference in New Issue
Block a user