Skip to content

Commit

Permalink
Merge pull request #75 from elishacloud/master
Browse files Browse the repository at this point in the history
  • Loading branch information
crosire authored Apr 14, 2018
2 parents 3090539 + 60296ef commit 882a425
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/d3d8to9_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1795,13 +1795,13 @@ HRESULT STDMETHODCALLTYPE Direct3DDevice8::CreatePixelShader(const DWORD *pFunct
size_t SourceSize = SourceCode.size();
SourceCode = std::regex_replace(SourceCode,
std::regex(" (...)(_[_satxd248]*|) (r[0-9])([\\.wxyz]*), (1?-?[crtv][0-9][\\.wxyz_abdis2]*, )?(1?-?[crtv][0-9][\\.wxyz_abdis2]*, )?(1?-?[crtv][0-9][\\.wxyz_abdis2]*, )?((1?-)(c[0-9])([\\.wxyz]*)(_bx2|_bias|_x2|_d[zbwa]|)|(1?-?)(c[0-9])([\\.wxyz]*)(_bx2|_bias|_x2|_d[zbwa]))(?![_\\.wxyz])"),
" mov $3$4, $10$11$14$15 /* added line */\n $1$2 $3$4, $5$6$9$13$3$12$16$4 /* changed $10$11$14$15 to $3$4 */", std::regex_constants::format_first_only);
" mov $3$4, $10$11$14$15 /* added line */\n $1$2 $3$4, $5$6$9$13$3$12$16 /* changed $10$11$14$15 to $3 */", std::regex_constants::format_first_only);
// Replace one constant modifier on coissued commands using the dest register as a temporary register
if (SourceSize == SourceCode.size())
{
SourceCode = std::regex_replace(SourceCode,
std::regex("( .*\\n) \\+ (...)(_[_satxd248]*|) (r[0-9])([\\.wxyz]*), (1?-?[crtv][0-9][\\.wxyz_abdis2]*, )?(1?-?[crtv][0-9][\\.wxyz_abdis2]*, )?(1?-?[crtv][0-9][\\.wxyz_abdis2]*, )?((1?-)(c[0-9])([\\.wxyz]*)(_bx2|_bias|_x2|_d[zbwa]|)|(1?-?)(c[0-9])([\\.wxyz]*)(_bx2|_bias|_x2|_d[zbwa]))(?![_\\.wxyz])"),
" mov $4$5, $11$12$15$16 /* added line */\n$1 + $2$3 $4$5, $6$7$10$14$4$13$17$5 /* changed $11$12$15$16 to $4$5 */", std::regex_constants::format_first_only);
" mov $4$5, $11$12$15$16 /* added line */\n$1 + $2$3 $4$5, $6$7$10$14$4$13$17 /* changed $11$12$15$16 to $4 */", std::regex_constants::format_first_only);
}
if (SourceSize == SourceCode.size())
{
Expand Down

0 comments on commit 882a425

Please sign in to comment.