Files
android_development/tools/emulator/opengl/system/renderControl_enc/renderControl.attrib
David 'Digit' Turner 5d7f0875e9 emulator: opengl: 'large' buffer optimization
This patch modifies the guest encoding libraries to avoid
un-necessary copies when sending large buffers (e.g. pixels)
to the host. Instead, the data is sent directly through a
new IOStream method (writeFully()).

On my machine, this improves the NenaMark2 benchmark
(from 50.8 to 57.1 fps). More importantly, this speeds up
the display of non-GL surfaces too, which are sent through
the special rcUpdateColorBuffer() function in gralloc_goldfish.

This is noticeable in many parts of the UI (e.g. when scrolling
through lists).

To tag a given parameter, use the new 'isLarge' variable flag
in the protocol .attrib file.

Implemented for the following encoding functions:

  rcUpdateColorBuffer
  glTexSubImage2D
  glTexImage2Di
  glBufferData
  glBufferSubData
  glCompressedTexImage2D
  glCompressedTexSubImage2D
  glTexImage3DOES
  glTexSubImage3DOES
  glCompressedTexImage3DOES
  glCompressedTexSubImage3DOES

+ Optimize the auto-generated encoder functions to avoid
  repeated function calls (for size computations).

Change-Id: I13a02607b606c40cd05984cd2051b1f3424bc2d0
2011-09-20 15:58:54 +02:00

42 lines
866 B
Plaintext

GLOBAL
base_opcode 10000
encoder_headers <stdint.h> <EGL/egl.h> "glUtils.h"
rcGetEGLVersion
dir major out
len major sizeof(EGLint)
dir minor out
len minor sizeof(EGLint)
rcQueryEGLString
dir buffer out
len buffer bufferSize
rcGetGLString
dir buffer out
len buffer bufferSize
rcGetNumConfigs
dir numAttribs out
len numAttribs sizeof(uint32_t)
rcGetConfigs
dir buffer out
len buffer bufSize
rcChooseConfig
dir attribs in
len attribs attribs_size
dir configs out
var_flag configs nullAllowed
len configs configs_size*sizeof(uint32_t)
rcReadColorBuffer
dir pixels out
len pixels (((glUtilsPixelBitSize(format, type) * width) >> 3) * height)
rcUpdateColorBuffer
dir pixels in
len pixels (((glUtilsPixelBitSize(format, type) * width) >> 3) * height)
var_flag pixels isLarge