wined3d: Rename max_samplers to max_fragment_samplers.

This commit is contained in:
H. Verbeet 2007-06-25 22:45:21 +02:00 committed by Alexandre Julliard
parent 71d7da1170
commit 3ad03206ab
5 changed files with 9 additions and 9 deletions

View File

@ -1811,7 +1811,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, WINED3DPR
/* Initialize the texture unit mapping to a 1:1 mapping */
for(state = 0; state < MAX_SAMPLERS; state++) {
if (state < GL_LIMITS(samplers)) {
if (state < GL_LIMITS(fragment_samplers)) {
This->texUnitMap[state] = state;
This->rev_tex_unit_map[state] = state;
} else {

View File

@ -494,7 +494,7 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info, Display* display) {
gl_info->max_buffers = 1;
gl_info->max_textures = 1;
gl_info->max_texture_stages = 1;
gl_info->max_samplers = 1;
gl_info->max_fragment_samplers = 1;
gl_info->max_sampler_stages = 1;
gl_info->ps_arb_version = PS_VERSION_NOT_SUPPORTED;
gl_info->ps_arb_max_temps = 0;
@ -568,7 +568,7 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info, Display* display) {
gl_info->supported[ARB_FRAGMENT_PROGRAM] = TRUE;
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &gl_max);
TRACE_(d3d_caps)(" FOUND: ARB Pixel Shader support - GL_MAX_TEXTURE_IMAGE_UNITS_ARB=%u\n", gl_max);
gl_info->max_samplers = min(MAX_SAMPLERS, gl_max);
gl_info->max_fragment_samplers = min(MAX_SAMPLERS, gl_max);
GL_EXTCALL(glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_ENV_PARAMETERS_ARB, &gl_max));
TRACE_(d3d_caps)(" FOUND: ARB Pixel Shader support - max float constants=%u\n", gl_max);
gl_info->ps_arb_constantsF = gl_max;
@ -596,7 +596,7 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info, Display* display) {
gl_info->supported[ARB_MULTITEXTURE] = TRUE;
gl_info->max_textures = min(MAX_TEXTURES, gl_max);
gl_info->max_texture_stages = min(MAX_TEXTURES, gl_max);
gl_info->max_samplers = max(gl_info->max_samplers, gl_max);
gl_info->max_fragment_samplers = max(gl_info->max_fragment_samplers, gl_max);
} else if (strcmp(ThisExtn, "GL_ARB_texture_cube_map") == 0) {
TRACE_(d3d_caps)(" FOUND: ARB Texture Cube Map support\n");
gl_info->supported[ARB_TEXTURE_CUBE_MAP] = TRUE;
@ -838,7 +838,7 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info, Display* display) {
/* In some cases the number of texture stages can be larger than the number
* of samplers. The GF4 for example can use only 2 samplers (no fragment
* shaders), but 8 texture stages (register combiners). */
gl_info->max_sampler_stages = max(gl_info->max_samplers, gl_info->max_texture_stages);
gl_info->max_sampler_stages = max(gl_info->max_fragment_samplers, gl_info->max_texture_stages);
/* We can only use ORM_FBO when the hardware supports it. */
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO && !gl_info->supported[EXT_FRAMEBUFFER_OBJECT]) {

View File

@ -85,7 +85,7 @@ static void shader_glsl_load_psamplers(
int i;
char sampler_name[20];
for (i=0; i< GL_LIMITS(samplers); ++i) {
for (i=0; i< GL_LIMITS(fragment_samplers); ++i) {
if (stateBlock->textures[i] != NULL) {
snprintf(sampler_name, sizeof(sampler_name), "Psampler%d", i);
name_loc = GL_EXTCALL(glGetUniformLocationARB(programId, sampler_name));

View File

@ -1910,7 +1910,7 @@ static void tex_coordindex(DWORD state, IWineD3DStateBlockImpl *stateblock, Wine
}
if (GL_SUPPORT(ARB_MULTITEXTURE)) {
if(mapped_stage >= GL_LIMITS(samplers)) {
if(mapped_stage >= GL_LIMITS(fragment_samplers)) {
return;
}
GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage));
@ -2138,7 +2138,7 @@ static void sampler(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCont
}
if (GL_SUPPORT(ARB_MULTITEXTURE)) {
if (mapped_stage >= GL_LIMITS(samplers)) {
if (mapped_stage >= GL_LIMITS(fragment_samplers)) {
return;
}
GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage));

View File

@ -1961,7 +1961,7 @@ typedef struct _WineD3D_GL_Info {
UINT max_lights;
UINT max_textures;
UINT max_texture_stages;
UINT max_samplers;
UINT max_fragment_samplers;
UINT max_sampler_stages;
UINT max_clipplanes;
UINT max_texture_size;