wined3d: Take geometry shaders into account in shader_glsl_load_constantsB().

This commit is contained in:
Henri Verbeet 2009-07-10 10:20:14 +02:00 committed by Alexandre Julliard
parent 69b7612265
commit 38cb9d02b1
1 changed files with 22 additions and 2 deletions

View File

@ -502,10 +502,30 @@ static void shader_glsl_load_constantsB(IWineD3DBaseShaderImpl *This, const Wine
GLint tmp_loc;
unsigned int i;
char tmp_name[8];
char is_pshader = shader_is_pshader_version(This->baseShader.reg_maps.shader_version.type);
const char* prefix = is_pshader? "PB":"VB";
const char *prefix;
struct list* ptr;
switch (This->baseShader.reg_maps.shader_version.type)
{
case WINED3D_SHADER_TYPE_VERTEX:
prefix = "VB";
break;
case WINED3D_SHADER_TYPE_GEOMETRY:
prefix = "GB";
break;
case WINED3D_SHADER_TYPE_PIXEL:
prefix = "PB";
break;
default:
FIXME("Unknown shader type %#x.\n",
This->baseShader.reg_maps.shader_version.type);
prefix = "UB";
break;
}
/* TODO: Benchmark and see if it would be beneficial to store the
* locations of the constants to avoid looking up each time */
for (i = 0; constants_set; constants_set >>= 1, ++i)