H. Verbeet : wined3d: Rename max_samplers to max_fragment_samplers.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Jun 26 07:11:54 CDT 2007
Module: wine
Branch: master
Commit: 3ad03206ab8a1a0440ce6d6ab8527ef2630a551d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3ad03206ab8a1a0440ce6d6ab8527ef2630a551d
Author: H. Verbeet <hverbeet at gmail.com>
Date: Mon Jun 25 22:45:21 2007 +0200
wined3d: Rename max_samplers to max_fragment_samplers.
---
dlls/wined3d/device.c | 2 +-
dlls/wined3d/directx.c | 8 ++++----
dlls/wined3d/glsl_shader.c | 2 +-
dlls/wined3d/state.c | 4 ++--
include/wine/wined3d_gl.h | 2 +-
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index db26348..7be8b4a 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -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 {
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 742e16b..5558d7f 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -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]) {
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 244316a..4ab7702 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -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));
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index e91441a..396f89c 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -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));
diff --git a/include/wine/wined3d_gl.h b/include/wine/wined3d_gl.h
index 24f5faf..0dcd184 100644
--- a/include/wine/wined3d_gl.h
+++ b/include/wine/wined3d_gl.h
@@ -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;
More information about the wine-cvs
mailing list