mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/glsl: Implement VKD3DSIH_CONTINUE.
This commit is contained in:
parent
bc4aacd21e
commit
aba45d0386
Notes:
Henri Verbeet
2024-10-09 13:19:34 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1162
@ -702,6 +702,12 @@ static void shader_glsl_break(struct vkd3d_glsl_generator *gen)
|
|||||||
vkd3d_string_buffer_printf(gen->buffer, "break;\n");
|
vkd3d_string_buffer_printf(gen->buffer, "break;\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void shader_glsl_continue(struct vkd3d_glsl_generator *gen)
|
||||||
|
{
|
||||||
|
shader_glsl_print_indent(gen->buffer, gen->indent);
|
||||||
|
vkd3d_string_buffer_printf(gen->buffer, "continue;\n");
|
||||||
|
}
|
||||||
|
|
||||||
static void shader_glsl_switch(struct vkd3d_glsl_generator *gen, const struct vkd3d_shader_instruction *ins)
|
static void shader_glsl_switch(struct vkd3d_glsl_generator *gen, const struct vkd3d_shader_instruction *ins)
|
||||||
{
|
{
|
||||||
struct glsl_src src;
|
struct glsl_src src;
|
||||||
@ -1186,6 +1192,9 @@ static void vkd3d_glsl_handle_instruction(struct vkd3d_glsl_generator *gen,
|
|||||||
case VKD3DSIH_CASE:
|
case VKD3DSIH_CASE:
|
||||||
shader_glsl_case(gen, ins);
|
shader_glsl_case(gen, ins);
|
||||||
break;
|
break;
|
||||||
|
case VKD3DSIH_CONTINUE:
|
||||||
|
shader_glsl_continue(gen);
|
||||||
|
break;
|
||||||
case VKD3DSIH_DCL_INDEXABLE_TEMP:
|
case VKD3DSIH_DCL_INDEXABLE_TEMP:
|
||||||
shader_glsl_dcl_indexable_temp(gen, ins);
|
shader_glsl_dcl_indexable_temp(gen, ins);
|
||||||
break;
|
break;
|
||||||
|
@ -54,7 +54,7 @@ float4 main(float tex : texcoord) : sv_target
|
|||||||
|
|
||||||
[test]
|
[test]
|
||||||
uniform 0 uint4 10 0 0 0
|
uniform 0 uint4 10 0 0 0
|
||||||
todo(glsl) draw quad
|
draw quad
|
||||||
probe ( 0, 0, 159, 480) rgba (10.0, 35.0, 0.0, 0.0)
|
probe ( 0, 0, 159, 480) rgba (10.0, 35.0, 0.0, 0.0)
|
||||||
probe (161, 0, 479, 480) rgba (10.0, 38.0, 0.0, 0.0)
|
probe (161, 0, 479, 480) rgba (10.0, 38.0, 0.0, 0.0)
|
||||||
probe (481, 0, 640, 480) rgba ( 5.0, 10.0, 0.0, 0.0)
|
probe (481, 0, 640, 480) rgba ( 5.0, 10.0, 0.0, 0.0)
|
||||||
|
@ -574,11 +574,11 @@ float4 main() : sv_target
|
|||||||
[test]
|
[test]
|
||||||
if(sm<4) uniform 0 float4 1 0 3 1
|
if(sm<4) uniform 0 float4 1 0 3 1
|
||||||
if(sm>=4) uniform 0 uint4 1 0 3 1
|
if(sm>=4) uniform 0 uint4 1 0 3 1
|
||||||
todo(glsl) draw quad
|
draw quad
|
||||||
probe (0, 0) rgba (10.0, 11.0, 12.0, 13.0)
|
probe (0, 0) rgba (10.0, 11.0, 12.0, 13.0)
|
||||||
if(sm<4) uniform 0 float4 0 0 3 1
|
if(sm<4) uniform 0 float4 0 0 3 1
|
||||||
if(sm>=4) uniform 0 uint4 0 0 3 1
|
if(sm>=4) uniform 0 uint4 0 0 3 1
|
||||||
todo(glsl) draw quad
|
draw quad
|
||||||
probe (0, 0) rgba (7.0, 8.0, 9.0, 10.0)
|
probe (0, 0) rgba (7.0, 8.0, 9.0, 10.0)
|
||||||
|
|
||||||
% return from a switch nested in a loop
|
% return from a switch nested in a loop
|
||||||
|
Loading…
Reference in New Issue
Block a user