mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/ir: Introduce a stub SSA to temp allocation pass.
This commit is contained in:
committed by
Henri Verbeet
parent
34dbd60e01
commit
5e4c61eba6
Notes:
Henri Verbeet
2025-06-23 20:18:01 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1485
@@ -2137,6 +2137,9 @@ int d3dbc_compile(struct vsir_program *program, uint64_t config_flags,
|
||||
struct vkd3d_bytecode_buffer *buffer = &d3dbc.buffer;
|
||||
int result;
|
||||
|
||||
if ((result = vsir_allocate_temp_registers(program, message_context)))
|
||||
return result;
|
||||
|
||||
d3dbc.program = program;
|
||||
d3dbc.message_context = message_context;
|
||||
switch (version->type)
|
||||
|
@@ -7725,6 +7725,16 @@ static enum vkd3d_result vsir_program_insert_vertex_fog(struct vsir_program *pro
|
||||
return VKD3D_OK;
|
||||
}
|
||||
|
||||
enum vkd3d_result vsir_allocate_temp_registers(struct vsir_program *program,
|
||||
struct vkd3d_shader_message_context *message_context)
|
||||
{
|
||||
if (!program->ssa_count)
|
||||
return VKD3D_OK;
|
||||
|
||||
vkd3d_shader_error(message_context, NULL, VKD3D_SHADER_ERROR_VSIR_NOT_IMPLEMENTED, "Allocate SSA registers.");
|
||||
return VKD3D_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
struct validation_context
|
||||
{
|
||||
struct vkd3d_shader_message_context *message_context;
|
||||
|
@@ -4463,6 +4463,9 @@ int tpf_compile(struct vsir_program *program, uint64_t config_flags, const struc
|
||||
size_t i;
|
||||
int ret;
|
||||
|
||||
if ((ret = vsir_allocate_temp_registers(program, message_context)))
|
||||
return ret;
|
||||
|
||||
tpf.program = program;
|
||||
tpf.buffer = NULL;
|
||||
tpf.stat = &stat;
|
||||
|
@@ -1503,6 +1503,8 @@ struct vsir_program
|
||||
size_t block_name_count;
|
||||
};
|
||||
|
||||
enum vkd3d_result vsir_allocate_temp_registers(struct vsir_program *program,
|
||||
struct vkd3d_shader_message_context *message_context);
|
||||
void vsir_program_cleanup(struct vsir_program *program);
|
||||
int vsir_program_compile(struct vsir_program *program, uint64_t config_flags,
|
||||
const struct vkd3d_shader_compile_info *compile_info, struct vkd3d_shader_code *out,
|
||||
|
Reference in New Issue
Block a user