Commit 2d802af4 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Make shader specific constants accessible via GL_LIMITS.

parent afcd2c53
......@@ -3481,7 +3481,7 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This, struct
struct arb_ps_np2fixup_info* const fixup = priv_ctx.cur_np2fixup_info;
const WORD map = priv_ctx.cur_ps_args->super.np2_fixup;
const UINT max_lconsts = gl_info->ps_arb_max_local_constants;
const UINT max_lconsts = GL_LIMITS(ps_arb_local_constants);
fixup->offset = next_local;
fixup->super.active = 0;
......
......@@ -4611,7 +4611,7 @@ static void shader_glsl_get_caps(WINED3DDEVTYPE devtype,
* of native instructions, so use that here. For more info see the pixel shader versioning code below.
*/
if ((gl_info->supported[NV_VERTEX_PROGRAM2] && !gl_info->supported[NV_VERTEX_PROGRAM3])
|| gl_info->ps_arb_max_instructions <= 512)
|| gl_info->max_ps_arb_instructions <= 512)
pCaps->VertexShaderVersion = WINED3DVS_VERSION(2,0);
else
pCaps->VertexShaderVersion = WINED3DVS_VERSION(3,0);
......@@ -4630,7 +4630,7 @@ static void shader_glsl_get_caps(WINED3DDEVTYPE devtype,
* NOTE: ps3.0 hardware requires 512 or more instructions but ati and nvidia offer 'enough' (1024 vs 4096) on their most basic ps3.0 hardware.
*/
if ((gl_info->supported[NV_FRAGMENT_PROGRAM] && !gl_info->supported[NV_FRAGMENT_PROGRAM2])
|| (gl_info->ps_arb_max_instructions <= 512))
|| (gl_info->max_ps_arb_instructions <= 512))
pCaps->PixelShaderVersion = WINED3DPS_VERSION(2,0);
else
pCaps->PixelShaderVersion = WINED3DPS_VERSION(3,0);
......
......@@ -4166,15 +4166,15 @@ struct wined3d_gl_info
unsigned int max_vshader_constantsF;
unsigned int max_pshader_constantsF;
unsigned int vs_arb_constantsF;
unsigned int vs_arb_max_instructions;
unsigned int vs_arb_max_temps;
unsigned int ps_arb_constantsF;
unsigned int ps_arb_max_local_constants;
unsigned int ps_arb_max_instructions;
unsigned int ps_arb_max_temps;
unsigned int vs_glsl_constantsF;
unsigned int ps_glsl_constantsF;
unsigned int max_vs_arb_constantsF;
unsigned int max_vs_arb_instructions;
unsigned int max_vs_arb_temps;
unsigned int max_ps_arb_constantsF;
unsigned int max_ps_arb_local_constants;
unsigned int max_ps_arb_instructions;
unsigned int max_ps_arb_temps;
unsigned int max_vs_glsl_constantsF;
unsigned int max_ps_glsl_constantsF;
DWORD reserved_glsl_constants;
......
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