Commit d1cd08b7 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Honor WINED3DSPSM_NOT in ARB.

parent 8fb1e2ac
...@@ -4644,6 +4644,7 @@ static void shader_arb_handle_instruction(const struct wined3d_shader_instructio ...@@ -4644,6 +4644,7 @@ static void shader_arb_handle_instruction(const struct wined3d_shader_instructio
IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *)ins->ctx->shader; IWineD3DBaseShaderImpl *This = (IWineD3DBaseShaderImpl *)ins->ctx->shader;
struct control_frame *control_frame; struct control_frame *control_frame;
SHADER_BUFFER *buffer = ins->ctx->buffer; SHADER_BUFFER *buffer = ins->ctx->buffer;
BOOL bool_const;
if(ins->handler_idx == WINED3DSIH_LOOP || ins->handler_idx == WINED3DSIH_REP) if(ins->handler_idx == WINED3DSIH_LOOP || ins->handler_idx == WINED3DSIH_REP)
{ {
...@@ -4767,7 +4768,9 @@ static void shader_arb_handle_instruction(const struct wined3d_shader_instructio ...@@ -4767,7 +4768,9 @@ static void shader_arb_handle_instruction(const struct wined3d_shader_instructio
list_add_head(&priv->control_frames, &control_frame->entry); list_add_head(&priv->control_frames, &control_frame->entry);
control_frame->type = IF; control_frame->type = IF;
if(!priv->muted && get_bool_const(ins, This, ins->src[0].reg.idx) == FALSE) bool_const = get_bool_const(ins, This, ins->src[0].reg.idx);
if(ins->src[0].modifiers == WINED3DSPSM_NOT) bool_const = !bool_const;
if(!priv->muted && bool_const == FALSE)
{ {
shader_addline(buffer, "#if(FALSE){\n"); shader_addline(buffer, "#if(FALSE){\n");
priv->muted = TRUE; priv->muted = TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment