Browse Source

i965: Add various plumbing for cubemap arrays

V4: Fixed style nits

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
tags/gles3-fmt-v1
Chris Forbes 13 years ago
parent
commit
0cda3382a6

+ 4
- 0
src/mesa/drivers/dri/i965/brw_tex_layout.c View File

brw_miptree_layout(struct intel_context *intel, struct intel_mipmap_tree *mt) brw_miptree_layout(struct intel_context *intel, struct intel_mipmap_tree *mt)
{ {
switch (mt->target) { switch (mt->target) {
case GL_TEXTURE_CUBE_MAP_ARRAY:
brw_miptree_layout_texture_array(intel, mt);
break;

case GL_TEXTURE_CUBE_MAP: case GL_TEXTURE_CUBE_MAP:
if (intel->gen >= 5) { if (intel->gen >= 5) {
/* On Ironlake, cube maps are finally represented as just a series of /* On Ironlake, cube maps are finally represented as just a series of

+ 2
- 1
src/mesa/drivers/dri/i965/brw_wm_sampler_state.c View File

/* Cube-maps on 965 and later must use the same wrap mode for all 3 /* Cube-maps on 965 and later must use the same wrap mode for all 3
* coordinate dimensions. Futher, only CUBE and CLAMP are valid. * 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 && if (ctx->Texture.CubeMapSeamless &&
(gl_sampler->MinFilter != GL_NEAREST || (gl_sampler->MinFilter != GL_NEAREST ||
gl_sampler->MagFilter != GL_NEAREST)) { gl_sampler->MagFilter != GL_NEAREST)) {

+ 1
- 0
src/mesa/drivers/dri/i965/brw_wm_surface_state.c View File

return BRW_SURFACE_3D; return BRW_SURFACE_3D;


case GL_TEXTURE_CUBE_MAP: case GL_TEXTURE_CUBE_MAP:
case GL_TEXTURE_CUBE_MAP_ARRAY:
return BRW_SURFACE_CUBE; return BRW_SURFACE_CUBE;


default: default:

+ 2
- 1
src/mesa/drivers/dri/i965/gen7_sampler_state.c View File

/* Cube-maps on 965 and later must use the same wrap mode for all 3 /* Cube-maps on 965 and later must use the same wrap mode for all 3
* coordinate dimensions. Futher, only CUBE and CLAMP are valid. * 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 && if (ctx->Texture.CubeMapSeamless &&
(gl_sampler->MinFilter != GL_NEAREST || (gl_sampler->MinFilter != GL_NEAREST ||
gl_sampler->MagFilter != GL_NEAREST)) { gl_sampler->MagFilter != GL_NEAREST)) {

+ 2
- 1
src/mesa/drivers/dri/i965/gen7_wm_surface_state.c View File

firstImage->InternalFormat, firstImage->InternalFormat,
tObj->DepthMode, tObj->DepthMode,
sampler->sRGBDecode); 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_x = 1;
surf->ss0.cube_pos_y = 1; surf->ss0.cube_pos_y = 1;
surf->ss0.cube_pos_z = 1; surf->ss0.cube_pos_z = 1;

Loading…
Cancel
Save