首页> 外国专利> Preshaders: optimization of GPU programs

Preshaders: optimization of GPU programs

机译:预着色器:优化GPU程序

摘要

A shader program capable of execution on a GPU is analyzed for constant expressions. These constant expressions are replaced with references to registers or memory addresses on the GPU. A preshader is created that comprises two executable files. The first executable file contains the shader program with the each constant expression removed and replaced with a unique reference accessible by the GPU. The first file is executable at the GPU. A second file contains the removed constant expressions along with instructions to place the values generated at the associated reference. The second executable file is executable at a CPU. When the preshader is executed, an instance of the first file is executed at the GPU for each vertex or pixel that is displayed. One instance of the second file is executed at the CPU. As the preshader is executed, the constant expressions in the second file are evaluated and the resulting intermediate values are passed to each instance of the first file on the GPU.
机译:分析可以在GPU上执行的着色器程序的常量表达式。这些常量表达式将替换为对GPU上的寄存器或内存地址的引用。创建一个包含两个可执行文件的预着色器。第一个可执行文件包含着色器程序,其中删除了每个常量表达式,并替换为GPU可访问的唯一引用。第一个文件在GPU上可执行。第二个文件包含已删除的常量表达式以及将生成的值放在关联的引用处的指令。第二可执行文件在CPU上是可执行的。当执行预着色器时,针对显示的每个顶点或像素,在GPU上执行第一个文件的实例。第二个文件的一个实例在CPU上执行。在执行预着色器时,将评估第二个文件中的常量表达式,并将所得的中间值传递到GPU上第一个文件的每个实例。

著录项

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号