TODO on RETAIN_PREV.

This commit is contained in:
Ben Vanik 2014-11-02 09:45:28 -08:00
parent 36f30b3374
commit 9cb4fe03a4
2 changed files with 7 additions and 0 deletions

View File

@ -289,6 +289,7 @@ int D3D11ShaderTranslator::TranslatePixelShader(
" float4 r%d = c[%d];\n", n, n + 256);
}
append(" float4 t;\n");
append(" float s;\n"); // scalar result (used for RETAIN_PREV)
// Bring registers local.
if (alloc_counts.params) {
@ -1027,6 +1028,11 @@ int D3D11ShaderTranslator::TranslateALU_SUB_CONST_1(const instr_alu_t& alu) {
return TranslateALU_SUB_CONST_0(alu);
}
int D3D11ShaderTranslator::TranslateALU_RETAIN_PREV(const instr_alu_t& alu) {
// TODO(benvanik): pull out prev value in s.
return 1;
}
namespace {
typedef int (D3D11ShaderTranslator::*TranslateFn)(const instr_alu_t& alu);

View File

@ -105,6 +105,7 @@ private:
int TranslateALU_ADD_CONST_1(const xenos::instr_alu_t& alu);
int TranslateALU_SUB_CONST_0(const xenos::instr_alu_t& alu);
int TranslateALU_SUB_CONST_1(const xenos::instr_alu_t& alu);
int TranslateALU_RETAIN_PREV(const xenos::instr_alu_t& alu);
void PrintDestFecth(uint32_t dst_reg, uint32_t dst_swiz);
void AppendFetchDest(uint32_t dst_reg, uint32_t dst_swiz);