wined3d: Take geometry shaders into account in shader_glsl_load_constantsB().
This commit is contained in:
parent
69b7612265
commit
38cb9d02b1
|
@ -502,10 +502,30 @@ static void shader_glsl_load_constantsB(IWineD3DBaseShaderImpl *This, const Wine
|
||||||
GLint tmp_loc;
|
GLint tmp_loc;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
char tmp_name[8];
|
char tmp_name[8];
|
||||||
char is_pshader = shader_is_pshader_version(This->baseShader.reg_maps.shader_version.type);
|
const char *prefix;
|
||||||
const char* prefix = is_pshader? "PB":"VB";
|
|
||||||
struct list* ptr;
|
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
|
/* TODO: Benchmark and see if it would be beneficial to store the
|
||||||
* locations of the constants to avoid looking up each time */
|
* locations of the constants to avoid looking up each time */
|
||||||
for (i = 0; constants_set; constants_set >>= 1, ++i)
|
for (i = 0; constants_set; constants_set >>= 1, ++i)
|
||||||
|
|
Loading…
Reference in New Issue