GLES2Dbg: improve protocol and error check after shader upload
Change-Id: I0bd3867e0532e1c64c62db816be31ba0102c7e49 Signed-off-by: David Li <davidxli@google.com>
This commit is contained in:
@@ -61,10 +61,10 @@ public class MessageFormatter {
|
||||
static String FormatFloats(int count, final ByteBuffer data) {
|
||||
if (data.remaining() == 0)
|
||||
return "[null]";
|
||||
data.order(SampleView.targetByteOrder);
|
||||
String ret = "[";
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
ret += Float.intBitsToFloat(Integer.reverseBytes(data.getInt()));
|
||||
for (int i = 0; i < count; i++) {
|
||||
ret += Float.intBitsToFloat(data.getInt());
|
||||
if (i < count - 1)
|
||||
ret += ", ";
|
||||
}
|
||||
@@ -74,10 +74,10 @@ public class MessageFormatter {
|
||||
static String FormatInts(int count, final ByteBuffer data) {
|
||||
if (data.remaining() == 0)
|
||||
return "[null]";
|
||||
data.order(SampleView.targetByteOrder);
|
||||
String ret = "[";
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
ret += Integer.reverseBytes(data.getInt());
|
||||
for (int i = 0; i < count; i++) {
|
||||
ret += data.getInt();
|
||||
if (i < count - 1)
|
||||
ret += ", ";
|
||||
}
|
||||
@@ -87,10 +87,10 @@ public class MessageFormatter {
|
||||
static String FormatUints(int count, final ByteBuffer data) {
|
||||
if (data.remaining() == 0)
|
||||
return "[null]";
|
||||
data.order(SampleView.targetByteOrder);
|
||||
String ret = "[";
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
long bits = Integer.reverseBytes(data.getInt()) & 0xffffffff;
|
||||
for (int i = 0; i < count; i++) {
|
||||
long bits = data.getInt() & 0xffffffff;
|
||||
ret += bits;
|
||||
if (i < count - 1)
|
||||
ret += ", ";
|
||||
@@ -101,10 +101,10 @@ public class MessageFormatter {
|
||||
static String FormatMatrix(int columns, int count, final ByteBuffer data) {
|
||||
if (data.remaining() == 0)
|
||||
return "[null]";
|
||||
data.order(SampleView.targetByteOrder);
|
||||
String ret = "[";
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
ret += Float.intBitsToFloat(Integer.reverseBytes(data.getInt()));
|
||||
for (int i = 0; i < count; i++) {
|
||||
ret += Float.intBitsToFloat(data.getInt());
|
||||
if (i % columns == columns - 1)
|
||||
ret += "\\n ";
|
||||
else if (i < count - 1)
|
||||
|
||||
Reference in New Issue
Block a user