Prechádzať zdrojové kódy

Fix shaderc consistency (#2553)

* shaderc: Initialize 'texFormat' in uniform.

* glsl-optimizer: Fix consistency error of 'print_float'
C.Even 4 rokov pred
rodič
commit
13e6100681

+ 1 - 1
3rdparty/glsl-optimizer/src/glsl/ir_print_glsl_visitor.cpp

@@ -1344,7 +1344,7 @@ void print_float (string_buffer& buffer, float f)
 	// that so compiler output matches.
 	if (posE != NULL)
 	{
-		if((posE[1] == '+' || posE[1] == '-') && posE[2] == '0')
+		if((posE[1] == '+' || posE[1] == '-') && posE[2] == '0' && posE[3] == '0')
 		{
 			char* p = posE+2;
 			while (p[0])

+ 1 - 0
tools/shaderc/shaderc.h

@@ -91,6 +91,7 @@ namespace bgfx
 			, regCount(0)
 			, texComponent(0)
 			, texDimension(0)
+			, texFormat(0)
 		{
 		}