diff options
Diffstat (limited to 'emulator/opengl/host/tools/emugen/tests/t.001/expected/encoder/foo_enc.cpp')
-rw-r--r-- | emulator/opengl/host/tools/emugen/tests/t.001/expected/encoder/foo_enc.cpp | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/emulator/opengl/host/tools/emugen/tests/t.001/expected/encoder/foo_enc.cpp b/emulator/opengl/host/tools/emugen/tests/t.001/expected/encoder/foo_enc.cpp new file mode 100644 index 0000000..b1f66b7 --- /dev/null +++ b/emulator/opengl/host/tools/emugen/tests/t.001/expected/encoder/foo_enc.cpp @@ -0,0 +1,62 @@ +// Generated Code - DO NOT EDIT !! +// generated by 'emugen' + + +#include <string.h> +#include "foo_opcodes.h" + +#include "foo_enc.h" + + +#include <stdio.h> +static void enc_unsupported() +{ + ALOGE("Function is unsupported\n"); +} + +void fooAlphaFunc_enc(void *self , FooInt func, FooFloat ref) +{ + + foo_encoder_context_t *ctx = (foo_encoder_context_t *)self; + IOStream *stream = ctx->m_stream; + + unsigned char *ptr; + const size_t packetSize = 8 + 4 + 4; + ptr = stream->alloc(packetSize); + int tmp = OP_fooAlphaFunc;memcpy(ptr, &tmp, 4); ptr += 4; + memcpy(ptr, &packetSize, 4); ptr += 4; + + memcpy(ptr, &func, 4); ptr += 4; + memcpy(ptr, &ref, 4); ptr += 4; +} + +FooBoolean fooIsBuffer_enc(void *self , void* stuff) +{ + + foo_encoder_context_t *ctx = (foo_encoder_context_t *)self; + IOStream *stream = ctx->m_stream; + + const unsigned int __size_stuff = (4 * sizeof(float)); + unsigned char *ptr; + const size_t packetSize = 8 + __size_stuff + 1*4; + ptr = stream->alloc(packetSize); + int tmp = OP_fooIsBuffer;memcpy(ptr, &tmp, 4); ptr += 4; + memcpy(ptr, &packetSize, 4); ptr += 4; + + *(unsigned int *)(ptr) = __size_stuff; ptr += 4; + memcpy(ptr, stuff, __size_stuff);ptr += __size_stuff; + + FooBoolean retval; + stream->readback(&retval, 1); + return retval; +} + +foo_encoder_context_t::foo_encoder_context_t(IOStream *stream) +{ + m_stream = stream; + + fooAlphaFunc = (fooAlphaFunc_enc); + fooIsBuffer = (fooIsBuffer_enc); + fooUnsupported = (fooUnsupported_client_proc_t)(enc_unsupported); +} + |