Opengles debug was not enabled when you specify -enable-debug-gles option because
it defined wrong varible.
Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com>
if test "$opengles" = "yes" ; then
echo "CONFIG_OPENGLES=y" >> $config_host_mak
if test "$debug_gles" = "yes" ; then
- echo "OPENGLES_DEBUG=y" >> $config_host_mak
+ echo "CONFIG_DEBUG_GLES=y" >> $config_host_mak
fi
fi
tfr->nsections = 0;
tfr->sections = 0;
-#if (GLES2_DEBUG == 1)
+#if (CONFIG_DEBUG_GLES == 1)
target_ulong first_page = TARGET_PAGE(va);
-#endif // GLES2_DEBUG == 1
+#endif // CONFIG_DEBUG_GLES == 1
target_ulong last_page = TARGET_PAGE(va + len - 1);
target_ulong start_addr = va;
{
return 0;
}
-#if (GLES2_DEBUG == 1)
+#if (CONFIG_DEBUG_GLES == 1)
target_ulong end_pa = start_pa;
-#endif // GLES2_DEBUG == 1
+#endif // CONFIG_DEBUG_GLES == 1
// Solve length of continuous section.
target_ulong end_page = start_page;
}
end_page = next_page;
-#if (GLES2_DEBUG == 1)
+#if (CONFIG_DEBUG_GLES == 1)
end_pa = next_pa;
-#endif // GLES2_DEBUG == 1
+#endif // CONFIG_DEBUG_GLES == 1
}
unsigned id = tfr->nsections++;
int gles2_transfer(gles2_State *s, target_ulong va, target_ulong len,
void* data, int access_type)
{
-#if (GLES2_DEBUG == 1)
+#if (CONFIG_DEBUG_GLES == 1)
target_ulong first_page = TARGET_PAGE(va);
-#endif // GLES2_DEBUG == 1
+#endif // CONFIG_DEBUG_GLES == 1
target_ulong last_page = TARGET_PAGE(va + len - 1);
target_ulong start_addr = va;
{
return 0;
}
-#if (GLES2_DEBUG == 1)
+#if (CONFIG_DEBUG_GLES == 1)
target_ulong end_pa = start_pa;
-#endif // GLES2_DEBUG == 1
+#endif // CONFIG_DEBUG_GLES == 1
// Solve length of continuous section.
target_ulong end_page = start_page;
}
end_page = next_page;
-#if (GLES2_DEBUG == 1)
+#if (CONFIG_DEBUG_GLES == 1)
end_pa = next_pa;
-#endif // GLES2_DEBUG == 1
+#endif // CONFIG_DEBUG_GLES == 1
}
GLES2_PRINT("\tContinuous from 0x%x to 0x%x (0x%x to 0x%x).\n",
void* gles2_handle_get(gles2_State *s, uint32_t i)
{
-#if(GLES2_DEBUG == 1)
+#ifdef CONFIG_DEBUG_GLES
if(i && (i & ~GLES2_HANDLE_MASK) != GLES2_HANDLE_BASE)
{
GLES2_PRINT("ERROR: Invalid handle %x!\n", i);
exit(1);
}
-#endif // GLES2_DEBUG == 1
+#endif // CONFIG_DEBUG_GLES == 1
void* data = i ? s->handles[i & GLES2_HANDLE_MASK] : NULL;
// Return the page offset part of address.
#define TARGET_OFFSET(addr) ((addr) & (TARGET_PAGE_SIZE - 1))
-#ifndef GLES2_DEBUG
-# define GLES2_DEBUG 0
-#endif
-
-#if(GLES2_DEBUG == 1)
+#ifdef CONFIG_DEBUG_GLES
# define GLES2_DEBUG_ARGS 1
# define GLES2_TRACING 1
# define GLES2_PRINT(format, args...) \
# define GLES2_DEBUG_ARGS 0
# define GLES2_PRINT(format, args...) (void)0
# define GLES2_TRACING 0
-#endif // GLES2_DEBUG != 1
+#endif // CONFIG_DEBUG_GLES != 1
#if(GLES2_TRACING == 1)
# define GLES2_TRACE(format, args...) \
pthread_mutex_t m;
};
-#if(GLES2_DEBUG==1)
+#ifdef CONFIG_DEBUG_GLES
unsigned int gles20_glGetError(void);
#endif
#include "gles2_escommon_calls.c"
-#if(GLES2_DEBUG==1)
+#ifdef CONFIG_DEBUG_GLES
unsigned int gles20_glGetError(void)
{
return hgl.glGetError();
GLES2_BARRIER_ARG_NORET;
GLES2_PRINT("shader %d source:\n", shader);
- #if(GLES2_DEBUG == 1)
+ #ifdef CONFIG_DEBUG_GLES
for(i = 0; i < count; ++i) {
fprintf(stderr, "%.*s", length_fgl[i], string_fgl[i]);
}
- #endif // GLES2_DEBUG == 1
+ #endif // CONFIG_DEBUG_GLES == 1
GLES2_PRINT("\n--END--");
hgl.glShaderSource(shader, (GLsizei)count,
GLES2_TRACE("WORKER(%d): Calling function %s (%p)...\n",
client->nr, client->call->name, client->call);
client->call->callback(client->s, &d, client);
-#if(GLES2_DEBUG == 1)
+#ifdef CONFIG_DEBUG_GLES
/*if (client->call->name[0] == 'g') {
unsigned int error = gles20_glGetError();
if (error) {
error, client->call->name);
}
}*/
-#endif // GLES2_DEBUG == 1
+#endif // CONFIG_DEBUG_GLES == 1
GLES2_PRINT("\tWORKER(%d): Done.\n", client->nr);
client->prev_call = client->call;
client->state = gles2_ClientState_done;