SoC2007 Emulation         Emulating Lesser Hardware Capabilities -GSoC 2007

Summer of Code 2007: Emulating Lesser Hardware Capabilities

Student: Juozas Gaigalas (juozasg)

Mentor: Daniel Wickert (haffax)

Location: CVS HEAD - formerly CVS 'soc07-emulation' branch

Status: Merged into Shoggoth

Objective

Add an easy to use way for developers to test what their OGRE applications would look like on a machine with a less advanced GPU.
Roughly, this can be split into two main tasks:

  1. Loading and applying GPU capabilities definitions
  2. Building a database of GPUs

The Plan

See http://www.ogre3d.org/phpBB2/viewtopic.php?t=30130

Stage 0: Getting Familiar with OGRE

  1. Build, run and understand the current unit and PlayPen tests.
  2. Write a toy script loader.
  3. Precisely how are D3D RenderSystem and OpenGL RenderSystem are different in their init methods (initCapabilities vs. initGL)? Write a short report on this.
  4. Research runtime reloading of materials. How hard is it? How hard would it be to move all knowledge about GPU capabilities into the RenderSystem?
  5. Make a list of classes to modify, add and delete. (note: his will not include the anything that's a part of rcapsdump tool)
  6. Describe every test to be written. (note: this will not include the rcapsdump tool)

Stage 1: RenderSystemCapabilities Changes

  1. Add a shader profile list to RenderSystemCapabilities
  2. Add isShaderSupported and addShaderProfile methods
  3. Update DirectX and OpenGL init methods to use these methods
  4. Update all shader managers to use these methods

Deliverables

  1. DONE No shader syntax information in any high level and low level shader manager
  2. DONE A unit test for addShaderProfile and isShaderSupported methods

Stage 2: RenderSystem refactoring

  1. Refactor the initGL method into createCapabilities and intializeWithCapabilities
  2. Refactor DirecX initCapabilities into createCapabilities and initializeWithCapabilities
  3. Generally cleanup of both init sequences.
  4. Add a useCustomCapabilities method to Ogre::Root

Deliverables

  1. [DONE] initGL removed from GLRenderSystem
  2. [DONE] initCapabilities refactored in DirectX RenderSystem
  3. [DONE] Two unit tests for initializeWithCapabilities methods in each render system

Stage 3: Serializing RenderSystemCapabilities

  1. Create a RenderSystemCapabilitiesSerializer that can read (and write) RenderSystemCapabilities
  2. Create the RenderSystemCapabilitiesManager class
  3. Generally cleanup of both init sequences.
  4. Add a useCustomCapabilities method to Ogre::Root

Deliverables

  1. [DONE] RenderSystemCapabilitiesSerializer reading .rendercaps files
  2. [DONE] RenderSystemCapabilitiesSerializer writing .rendercaps files
  3. [DONE] Tests for reading RSC from file
  4. [DONE] A test that initializes Ogre from the loaded RSC
  5. [DONE] A test for writing RSCs to file and reading them back

Stage 4: Building a database of RenderSystemCapabilities

  1. Add versioning information to RSC class
  2. Create a tool for dumping RSCs to file - rcapsdump
  3. Create a web page with a form for uploading .rendercaps files

Deliverables

  1. [DONE] DriverVersion fields for D3D9 and GL included in the RenderSystemCapabilities class
  2. rcapsdump tool completed for both linux and windows