mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-24 01:40:22 +01:00
i965/vs: Apply the gen6 math workaround for math1 instructions.
Fixes glsl-vs-masked-cos.
This commit is contained in:
parent
2b7632aeaa
commit
cda28bca0d
1 changed files with 4 additions and 6 deletions
|
|
@ -122,14 +122,12 @@ vec4_visitor::emit_math1_gen6(enum opcode opcode, dst_reg dst, src_reg src)
|
|||
{
|
||||
/* The gen6 math instruction ignores the source modifiers --
|
||||
* swizzle, abs, negate, and at least some parts of the register
|
||||
* region description. Move the source to the corresponding slots
|
||||
* of the destination generally work.
|
||||
* region description.
|
||||
*/
|
||||
src_reg expanded = src_reg(this, glsl_type::float_type);
|
||||
emit(BRW_OPCODE_MOV, dst, src);
|
||||
src = expanded;
|
||||
src_reg temp_src = src_reg(this, glsl_type::vec4_type);
|
||||
emit(BRW_OPCODE_MOV, dst_reg(temp_src), src);
|
||||
|
||||
emit(opcode, dst, src);
|
||||
emit(opcode, dst, temp_src);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue