aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVladimir Dergachev <[email protected]>2005-02-01 15:27:36 +0000
committerVladimir Dergachev <[email protected]>2005-02-01 15:27:36 +0000
commit88e155e353cfa8fb7531c01c0187d74576e27631 (patch)
treea5c720984d30f8283b046e22fedf7c31b91225a5 /src
parentd4697b0997a56df21105005dc1536173576a424c (diff)
Get alpha in textures to work properly.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/r300/r300_fixed_pipelines.h8
-rw-r--r--src/mesa/drivers/dri/r300/r300_reg.h2
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c3
-rw-r--r--src/mesa/drivers/dri/r300/r300_tex.c6
4 files changed, 16 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_fixed_pipelines.h b/src/mesa/drivers/dri/r300/r300_fixed_pipelines.h
index ab31ec039b6..55d7bd9e8c9 100644
--- a/src/mesa/drivers/dri/r300/r300_fixed_pipelines.h
+++ b/src/mesa/drivers/dri/r300/r300_fixed_pipelines.h
@@ -261,8 +261,16 @@ static struct r300_pixel_shader_state SINGLE_TEXTURE_PIXEL_SHADER={
{
EASY_PFS_INSTR0(MAD, SRC0C_XYZ, SRC1C_XYZ, ZERO),
EASY_PFS_INSTR1(0, 0, 1, 0 | PFS_FLAG_CONST, NONE, ALL),
+
+ #if 0
+ /* no alpha in textures */
EASY_PFS_INSTR2(MAD, SRC0A, ONE, ZERO),
EASY_PFS_INSTR3(0, 1, 0 | PFS_FLAG_CONST, 0 | PFS_FLAG_CONST, OUTPUT)
+ #endif
+
+ /* alpha in textures */
+ EASY_PFS_INSTR2(MAD, SRC0A, SRC1A, ZERO),
+ EASY_PFS_INSTR3(0, 0, 1, 0 | PFS_FLAG_CONST, OUTPUT)
},
{
diff --git a/src/mesa/drivers/dri/r300/r300_reg.h b/src/mesa/drivers/dri/r300/r300_reg.h
index 6817c594897..b7e2cca63b3 100644
--- a/src/mesa/drivers/dri/r300/r300_reg.h
+++ b/src/mesa/drivers/dri/r300/r300_reg.h
@@ -655,7 +655,7 @@ I am fairly certain that they are correct unless stated otherwise in comments.
# define R300_TX_FORMAT_ALPHA_4CH 0x600
# define R300_TX_FORMAT_ALPHA_NONE 0xA00
/* Swizzling */
- /* constats */
+ /* constants */
# define R300_TX_FORMAT_X 0
# define R300_TX_FORMAT_Y 1
# define R300_TX_FORMAT_Z 2
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index 0ac9a2a7965..3c7f0367b49 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -209,6 +209,9 @@ static void r300_set_blend_cntl(r300ContextPtr rmesa, int func, int eqn, int cbi
{
GLuint new_ablend, new_cblend;
+ #if 0
+ fprintf(stderr, "eqnA=%08x funcA=%08x eqn=%08x func=%08x cbits=%08x\n", eqnA, funcA, eqn, func, cbits);
+ #endif
new_ablend = eqnA | funcA;
new_cblend = eqn | func;
if(funcA == func){
diff --git a/src/mesa/drivers/dri/r300/r300_tex.c b/src/mesa/drivers/dri/r300/r300_tex.c
index 8ea9b7f6bdb..b81b7e64c6b 100644
--- a/src/mesa/drivers/dri/r300/r300_tex.c
+++ b/src/mesa/drivers/dri/r300/r300_tex.c
@@ -318,10 +318,12 @@ static const struct gl_texture_format *r300ChooseTextureFormat(GLcontext * ctx,
(void)format;
#if 0
- fprintf(stderr, "InternalFormat=%s type=%s format=%s\n",
- _mesa_lookup_enum_by_nr(internalFormat),
+ fprintf(stderr, "InternalFormat=%s(%d) type=%s format=%s\n",
+ _mesa_lookup_enum_by_nr(internalFormat), internalFormat,
_mesa_lookup_enum_by_nr(type),
_mesa_lookup_enum_by_nr(format));
+ fprintf(stderr, "do32bpt=%d force16bpt=%d\n",
+ do32bpt, force16bpt);
#endif
switch (internalFormat) {