mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 15:30:14 +01:00
more dead code removal
This commit is contained in:
parent
7a9c129a0a
commit
237429aa3b
1 changed files with 1 additions and 63 deletions
|
|
@ -35,34 +35,6 @@
|
||||||
#include "i915_state.h"
|
#include "i915_state.h"
|
||||||
|
|
||||||
|
|
||||||
static uint
|
|
||||||
bitcount(uint k)
|
|
||||||
{
|
|
||||||
uint count = 0;
|
|
||||||
while (k) {
|
|
||||||
if (k & 1)
|
|
||||||
count++;
|
|
||||||
k = k >> 1;
|
|
||||||
}
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
static boolean
|
|
||||||
is_power_of_two_texture(const struct pipe_mipmap_tree *mt)
|
|
||||||
{
|
|
||||||
if (bitcount(mt->width0) == 1 &&
|
|
||||||
bitcount(mt->height0) == 1 &&
|
|
||||||
bitcount(mt->depth0) == 1) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compute i915 texture sampling state.
|
* Compute i915 texture sampling state.
|
||||||
*
|
*
|
||||||
|
|
@ -124,6 +96,7 @@ static void update_sampler(struct i915_context *i915,
|
||||||
state[1] |= (unit << SS3_TEXTUREMAP_INDEX_SHIFT);
|
state[1] |= (unit << SS3_TEXTUREMAP_INDEX_SHIFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void i915_update_samplers( struct i915_context *i915 )
|
void i915_update_samplers( struct i915_context *i915 )
|
||||||
{
|
{
|
||||||
uint unit;
|
uint unit;
|
||||||
|
|
@ -151,8 +124,6 @@ void i915_update_samplers( struct i915_context *i915 )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static uint
|
static uint
|
||||||
translate_texture_format(uint pipeFormat)
|
translate_texture_format(uint pipeFormat)
|
||||||
{
|
{
|
||||||
|
|
@ -204,10 +175,6 @@ translate_texture_format(uint pipeFormat)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define I915_TEXREG_MS3 1
|
|
||||||
#define I915_TEXREG_MS4 2
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
i915_update_texture(struct i915_context *i915, uint unit,
|
i915_update_texture(struct i915_context *i915, uint unit,
|
||||||
uint state[6])
|
uint state[6])
|
||||||
|
|
@ -222,40 +189,12 @@ i915_update_texture(struct i915_context *i915, uint unit,
|
||||||
assert(height);
|
assert(height);
|
||||||
assert(depth);
|
assert(depth);
|
||||||
|
|
||||||
#if 0
|
|
||||||
if (i915->state.tex_buffer[unit] != NULL) {
|
|
||||||
driBOUnReference(i915->state.tex_buffer[unit]);
|
|
||||||
i915->state.tex_buffer[unit] = NULL;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* this reference does not seem to be needed. In fact, when it's enabled
|
|
||||||
* we leak a lot of memory (try xdemos/wincopy).
|
|
||||||
*/
|
|
||||||
#if 0
|
|
||||||
{
|
|
||||||
/*struct pipe_buffer_handle *p =*/ driBOReference(mt->region->buffer);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
i915->state.tex_buffer[unit] = driBOReference(intelObj->mt->region->
|
|
||||||
buffer);
|
|
||||||
i915->state.tex_offset[unit] = intel_miptree_image_offset(intelObj->mt,
|
|
||||||
0, intelObj->
|
|
||||||
firstLevel);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
format = translate_texture_format(mt->format);
|
format = translate_texture_format(mt->format);
|
||||||
pitch = mt->pitch * mt->cpp;
|
pitch = mt->pitch * mt->cpp;
|
||||||
|
|
||||||
assert(format);
|
assert(format);
|
||||||
assert(pitch);
|
assert(pitch);
|
||||||
|
|
||||||
/*
|
|
||||||
printf("texture format = 0x%x\n", format);
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* MS3 state */
|
/* MS3 state */
|
||||||
state[0] =
|
state[0] =
|
||||||
(((height - 1) << MS3_HEIGHT_SHIFT)
|
(((height - 1) << MS3_HEIGHT_SHIFT)
|
||||||
|
|
@ -272,7 +211,6 @@ i915_update_texture(struct i915_context *i915, uint unit,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
i915_update_textures(struct i915_context *i915)
|
i915_update_textures(struct i915_context *i915)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue