mesa: move software texel fetch code into swrast
It's only used by swrast now so move it out of core Mesa.
This commit is contained in:
+1
-1
@@ -114,7 +114,6 @@ main_sources = [
|
||||
'main/texcompress_s3tc.c',
|
||||
'main/texcompress_fxt1.c',
|
||||
'main/texenv.c',
|
||||
'main/texfetch.c',
|
||||
'main/texformat.c',
|
||||
'main/texgen.c',
|
||||
'main/texgetimage.c',
|
||||
@@ -173,6 +172,7 @@ swrast_sources = [
|
||||
'swrast/s_span.c',
|
||||
'swrast/s_stencil.c',
|
||||
'swrast/s_texcombine.c',
|
||||
'swrast/s_texfetch.c',
|
||||
'swrast/s_texfilter.c',
|
||||
'swrast/s_texrender.c',
|
||||
'swrast/s_texture.c',
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
#include "main/texcompress.h"
|
||||
#include "main/texgetimage.h"
|
||||
#include "main/mipmap.h"
|
||||
#include "main/texfetch.h"
|
||||
#include "main/teximage.h"
|
||||
#include "drivers/common/meta.h"
|
||||
#include "swrast/s_texfetch.h"
|
||||
|
||||
static struct gl_texture_object *
|
||||
nouveau_texture_new(struct gl_context *ctx, GLuint name, GLenum target)
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
#include "main/texparam.h"
|
||||
#include "main/teximage.h"
|
||||
#include "main/texstate.h"
|
||||
#include "main/texfetch.h"
|
||||
#include "program/prog_instruction.h"
|
||||
|
||||
|
||||
|
||||
@@ -85,7 +85,6 @@ MAIN_SOURCES = \
|
||||
main/texcompress_s3tc.c \
|
||||
main/texcompress_fxt1.c \
|
||||
main/texenv.c \
|
||||
main/texfetch.c \
|
||||
main/texformat.c \
|
||||
main/texgen.c \
|
||||
main/texgetimage.c \
|
||||
@@ -144,6 +143,7 @@ SWRAST_SOURCES = \
|
||||
swrast/s_span.c \
|
||||
swrast/s_stencil.c \
|
||||
swrast/s_texcombine.c \
|
||||
swrast/s_texfetch.c \
|
||||
swrast/s_texfilter.c \
|
||||
swrast/s_texrender.c \
|
||||
swrast/s_texture.c \
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include "main/colormac.h"
|
||||
#include "main/mtypes.h"
|
||||
#include "main/teximage.h"
|
||||
#include "main/texfetch.h"
|
||||
#include "program/prog_parameter.h"
|
||||
#include "program/prog_statevars.h"
|
||||
#include "swrast.h"
|
||||
@@ -40,6 +39,7 @@
|
||||
#include "s_lines.h"
|
||||
#include "s_points.h"
|
||||
#include "s_span.h"
|
||||
#include "s_texfetch.h"
|
||||
#include "s_triangle.h"
|
||||
#include "s_texfilter.h"
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
|
||||
/**
|
||||
* \file texfetch.c
|
||||
* \file s_texfetch.c
|
||||
*
|
||||
* Texel fetch/store functions
|
||||
*
|
||||
@@ -33,14 +33,14 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "colormac.h"
|
||||
#include "macros.h"
|
||||
#include "texcompress.h"
|
||||
#include "texcompress_fxt1.h"
|
||||
#include "texcompress_s3tc.h"
|
||||
#include "texcompress_rgtc.h"
|
||||
#include "texfetch.h"
|
||||
#include "teximage.h"
|
||||
#include "main/colormac.h"
|
||||
#include "main/macros.h"
|
||||
#include "main/texcompress.h"
|
||||
#include "main/texcompress_fxt1.h"
|
||||
#include "main/texcompress_s3tc.h"
|
||||
#include "main/texcompress_rgtc.h"
|
||||
#include "main/teximage.h"
|
||||
#include "s_texfetch.h"
|
||||
#include "../../gallium/auxiliary/util/u_format_rgb9e5.h"
|
||||
#include "../../gallium/auxiliary/util/u_format_r11g11b10f.h"
|
||||
|
||||
@@ -77,13 +77,13 @@ nonlinear_to_linear(GLubyte cs8)
|
||||
/* Texel fetch routines for all supported formats
|
||||
*/
|
||||
#define DIM 1
|
||||
#include "texfetch_tmp.h"
|
||||
#include "s_texfetch_tmp.h"
|
||||
|
||||
#define DIM 2
|
||||
#include "texfetch_tmp.h"
|
||||
#include "s_texfetch_tmp.h"
|
||||
|
||||
#define DIM 3
|
||||
#include "texfetch_tmp.h"
|
||||
#include "s_texfetch_tmp.h"
|
||||
|
||||
/**
|
||||
* Null texel fetch function.
|
||||
@@ -24,12 +24,10 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef TEXFETCH_H
|
||||
#define TEXFETCH_H
|
||||
|
||||
#include "mtypes.h"
|
||||
#include "formats.h"
|
||||
#ifndef S_TEXFETCH_H
|
||||
#define S_TEXFETCH_H
|
||||
|
||||
#include "swrast/s_context.h"
|
||||
|
||||
extern StoreTexelFunc
|
||||
_mesa_get_texel_store_func(gl_format format);
|
||||
@@ -42,4 +40,5 @@ _mesa_set_fetch_functions(struct gl_texture_image *texImage, GLuint dims);
|
||||
|
||||
void
|
||||
_mesa_update_fetch_functions(struct gl_texture_object *texObj);
|
||||
#endif
|
||||
|
||||
#endif /* S_TEXFETCH_H */
|
||||
@@ -3,10 +3,10 @@
|
||||
#include "main/colormac.h"
|
||||
#include "main/fbobject.h"
|
||||
#include "main/macros.h"
|
||||
#include "main/texfetch.h"
|
||||
#include "main/teximage.h"
|
||||
#include "main/renderbuffer.h"
|
||||
#include "swrast/swrast.h"
|
||||
#include "swrast/s_texfetch.h"
|
||||
|
||||
|
||||
/*
|
||||
@@ -543,7 +543,11 @@ update_wrapper(struct gl_context *ctx, struct gl_renderbuffer_attachment *att)
|
||||
trb->Store = store_nop;
|
||||
}
|
||||
|
||||
if (!trb->TexImage->FetchTexelf) {
|
||||
_mesa_update_fetch_functions(trb->TexImage->TexObject);
|
||||
}
|
||||
trb->Fetchf = trb->TexImage->FetchTexelf;
|
||||
assert(trb->Fetchf);
|
||||
|
||||
if (att->Texture->Target == GL_TEXTURE_1D_ARRAY_EXT) {
|
||||
trb->Yoffset = att->Zoffset;
|
||||
|
||||
Reference in New Issue
Block a user