Skip to content

Commit

Permalink
HLSL: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aras-p committed Jan 5, 2021
1 parent e071892 commit 388159d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/shaders/hlsl/bc7e.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ static uint evaluate_solution(const color_quad_i pLow, const color_quad_i pHigh,

best_err = min(min(min(err0, err1), err2), err3);

best_sel = select(0 1, best_err == err1);
best_sel = select(0, 1, best_err == err1);
best_sel = select(best_sel, 2, best_err == err2);
best_sel = select(best_sel, 3, best_err == err3);
}
Expand Down
7 changes: 5 additions & 2 deletions src/testmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@
#endif

const bool kDoCapture = false;
const int kQuality = 3;
const int kQuality = 0;
const int kRunCount = kDoCapture ? 1 : 8;
const bool kAlwaysPerceptual = false;
#ifdef _MSC_VER
const bool kRequireExactResultsMatch = false;
#else
const bool kRequireExactResultsMatch = true;
#endif
const float kAllowedPsnrDiff = 66;
const float kAllowedPsnrDiff = 57;


static const char* kTestFileNames[] =
Expand Down Expand Up @@ -718,6 +719,8 @@ static float eval_psnr(int width, int height, int channels, const unsigned char*

static bool TestOnFile(TestFile& tf, bool perceptual)
{
if (kAlwaysPerceptual)
perceptual = true;
printf(" testing %s\n", tf.fileNameBase.c_str());
const int kBC7BlockBytes = 16;
const size_t compressedSize = tf.bc7exp.size();
Expand Down

0 comments on commit 388159d

Please sign in to comment.