Commit 38cb9d02 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

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

parent 69b76122
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment