summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2012-11-22 17:55:08 +1300
committerEric Anholt <[email protected]>2012-12-14 15:26:12 -0800
commit0cda3382a6a150d42877711f14964b44fe8c6db5 (patch)
tree6051894038680861c85acc24b0af40e1d0d4dccd /src
parent2cae9f2d4a57dc9cca934b489df43f0ec4eb98bc (diff)
i965: Add various plumbing for cubemap arrays
V4: Fixed style nits Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_tex_layout.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_sampler_state.c3
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c1
-rw-r--r--src/mesa/drivers/dri/i965/gen7_sampler_state.c3
-rw-r--r--src/mesa/drivers/dri/i965/gen7_wm_surface_state.c3
5 files changed, 11 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_tex_layout.c b/src/mesa/drivers/dri/i965/brw_tex_layout.c
index 1a2bedb2268..b661570e99b 100644
--- a/src/mesa/drivers/dri/i965/brw_tex_layout.c
+++ b/src/mesa/drivers/dri/i965/brw_tex_layout.c
@@ -70,6 +70,10 @@ void
brw_miptree_layout(struct intel_context *intel, struct intel_mipmap_tree *mt)
{
switch (mt->target) {
+ case GL_TEXTURE_CUBE_MAP_ARRAY:
+ brw_miptree_layout_texture_array(intel, mt);
+ break;
+
case GL_TEXTURE_CUBE_MAP:
if (intel->gen >= 5) {
/* On Ironlake, cube maps are finally represented as just a series of
diff --git a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
index fb9cb83c7bc..0d1f24950e6 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
@@ -248,7 +248,8 @@ static void brw_update_sampler_state(struct brw_context *brw,
/* Cube-maps on 965 and later must use the same wrap mode for all 3
* coordinate dimensions. Futher, only CUBE and CLAMP are valid.
*/
- if (texObj->Target == GL_TEXTURE_CUBE_MAP) {
+ if (texObj->Target == GL_TEXTURE_CUBE_MAP ||
+ texObj->Target == GL_TEXTURE_CUBE_MAP_ARRAY) {
if (ctx->Texture.CubeMapSeamless &&
(gl_sampler->MinFilter != GL_NEAREST ||
gl_sampler->MagFilter != GL_NEAREST)) {
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 298678a03c0..94c01cb3a9d 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -65,6 +65,7 @@ translate_tex_target(GLenum target)
return BRW_SURFACE_3D;
case GL_TEXTURE_CUBE_MAP:
+ case GL_TEXTURE_CUBE_MAP_ARRAY:
return BRW_SURFACE_CUBE;
default:
diff --git a/src/mesa/drivers/dri/i965/gen7_sampler_state.c b/src/mesa/drivers/dri/i965/gen7_sampler_state.c
index ea634a9be09..6f0a757380b 100644
--- a/src/mesa/drivers/dri/i965/gen7_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_sampler_state.c
@@ -111,7 +111,8 @@ gen7_update_sampler_state(struct brw_context *brw, int unit, int ss_index,
/* Cube-maps on 965 and later must use the same wrap mode for all 3
* coordinate dimensions. Futher, only CUBE and CLAMP are valid.
*/
- if (texObj->Target == GL_TEXTURE_CUBE_MAP) {
+ if (texObj->Target == GL_TEXTURE_CUBE_MAP ||
+ texObj->Target == GL_TEXTURE_CUBE_MAP_ARRAY) {
if (ctx->Texture.CubeMapSeamless &&
(gl_sampler->MinFilter != GL_NEAREST ||
gl_sampler->MagFilter != GL_NEAREST)) {
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 466a038a9cc..1e5af959512 100644
--- a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
@@ -328,7 +328,8 @@ gen7_update_texture_surface(struct gl_context *ctx,
firstImage->InternalFormat,
tObj->DepthMode,
sampler->sRGBDecode);
- if (tObj->Target == GL_TEXTURE_CUBE_MAP) {
+ if (tObj->Target == GL_TEXTURE_CUBE_MAP ||
+ tObj->Target == GL_TEXTURE_CUBE_MAP_ARRAY) {
surf->ss0.cube_pos_x = 1;
surf->ss0.cube_pos_y = 1;
surf->ss0.cube_pos_z = 1;