d3dx9: Allow sampler declaration without sampler type.
This commit is contained in:
parent
3d5a3a32ce
commit
5bb403ceb2
|
@ -618,6 +618,21 @@ instruction: INSTR_ADD omods dreg ',' sregs
|
||||||
}
|
}
|
||||||
asm_ctx.funcs->dcl_sampler(&asm_ctx, $2, $3.mod, $4, asm_ctx.line_no);
|
asm_ctx.funcs->dcl_sampler(&asm_ctx, $2, $3.mod, $4, asm_ctx.line_no);
|
||||||
}
|
}
|
||||||
|
| INSTR_DCL omods REG_SAMPLER
|
||||||
|
{
|
||||||
|
TRACE("Sampler declared\n");
|
||||||
|
if($2.shift != 0) {
|
||||||
|
asmparser_message(&asm_ctx, "Line %u: Shift modifier not allowed here\n",
|
||||||
|
asm_ctx.line_no);
|
||||||
|
set_parse_status(&asm_ctx, PARSE_ERR);
|
||||||
|
}
|
||||||
|
if(asm_ctx.shader->type != ST_PIXEL) {
|
||||||
|
asmparser_message(&asm_ctx, "Line %u: Declaration needs a sampler type\n",
|
||||||
|
asm_ctx.line_no);
|
||||||
|
set_parse_status(&asm_ctx, PARSE_ERR);
|
||||||
|
}
|
||||||
|
asm_ctx.funcs->dcl_sampler(&asm_ctx, BWRITERSTT_UNKNOWN, $2.mod, $3, asm_ctx.line_no);
|
||||||
|
}
|
||||||
| INSTR_DCL sampdcl omods dcl_inputreg
|
| INSTR_DCL sampdcl omods dcl_inputreg
|
||||||
{
|
{
|
||||||
TRACE("Error rule: sampler decl of input reg\n");
|
TRACE("Error rule: sampler decl of input reg\n");
|
||||||
|
|
|
@ -1216,6 +1216,11 @@ static void ps_3_0_test(void) {
|
||||||
"dcl v0\n",
|
"dcl v0\n",
|
||||||
{0xffff0300, 0x0200001f, 0x80000000, 0x900f0000, 0x0000ffff}
|
{0xffff0300, 0x0200001f, 0x80000000, 0x900f0000, 0x0000ffff}
|
||||||
},
|
},
|
||||||
|
{ /* shader 16 */
|
||||||
|
"ps_3_0\n"
|
||||||
|
"dcl s2\n",
|
||||||
|
{0xffff0300, 0x0200001f, 0x80000000, 0xa00f0802, 0x0000ffff}
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
exec_tests("ps_3_0", tests, sizeof(tests) / sizeof(tests[0]));
|
exec_tests("ps_3_0", tests, sizeof(tests) / sizeof(tests[0]));
|
||||||
|
|
Loading…
Reference in New Issue