summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965
diff options
context:
space:
mode:
authorPauli Nieminen <[email protected]>2012-06-12 21:38:46 +0300
committerEric Anholt <[email protected]>2012-08-01 15:30:13 -0700
commitc37efbfe4c415b6fd2d4f968220d7c9b62f11ecf (patch)
treef7da2ce6c2f12c397139ca47660c781847ff6d05 /src/mesa/drivers/dri/i965
parentc18806cebf107d03751b11cc8866062c3822a56f (diff)
mesa: Move DepthMode to texture object
GL_DEPTH_TEXTURE_MODE isn't meant to be part of sampler state based on compatibility profile specifications. OpenGL specification 4.1 compatibility 20100725 3.9.2: "... The values accepted in the pname parameter are TEXTURE_WRAP_S, TEXTURE_WRAP_T, TEXTURE_WRAP_R, TEXTURE_MIN_- FILTER, TEXTURE_MAG_FILTER, TEXTURE_BORDER_COLOR, TEXTURE_MIN_- LOD, TEXTURE_MAX_LOD, TEXTURE_LOD_BIAS, TEXTURE_COMPARE_MODE, and TEXTURE_COMPARE_FUNC. Texture state listed in table 6.25 but not listed here and in the sampler state in table 6.26 is not part of the sampler state, and remains in the texture object." The list of states is in Table 6.24 "Textures (state per texture object)" instead of 6.25 mentioned in the specification text. Same can be found from 3.3 compatibility specification. Signed-off-by: Pauli Nieminen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c2
-rw-r--r--src/mesa/drivers/dri/i965/gen7_wm_surface_state.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index 37bc1148ae6..5ab0547c1e6 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -374,7 +374,7 @@ brw_populate_sampler_prog_key_data(struct gl_context *ctx,
* format overrides because shadow comparison always returns the
* result of the comparison in all channels anyway.
*/
- switch (sampler->DepthMode) {
+ switch (t->DepthMode) {
case GL_ALPHA:
swizzles[0] = SWIZZLE_ZERO;
swizzles[1] = SWIZZLE_ZERO;
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index 366446241b0..66db08fc4ee 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -732,7 +732,7 @@ brw_update_texture_surface( struct gl_context *ctx, GLuint unit )
BRW_SURFACE_CUBEFACE_ENABLES |
(translate_tex_format(mt->format,
firstImage->InternalFormat,
- sampler->DepthMode,
+ tObj->DepthMode,
sampler->sRGBDecode) <<
BRW_SURFACE_FORMAT_SHIFT));
diff --git a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
index 20e76e32f2f..5b016dcc45c 100644
--- a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
@@ -296,7 +296,7 @@ gen7_update_texture_surface(struct gl_context *ctx, GLuint unit)
surf->ss0.surface_type = translate_tex_target(tObj->Target);
surf->ss0.surface_format = translate_tex_format(mt->format,
firstImage->InternalFormat,
- sampler->DepthMode,
+ tObj->DepthMode,
sampler->sRGBDecode);
if (tObj->Target == GL_TEXTURE_CUBE_MAP) {
surf->ss0.cube_pos_x = 1;