Get alpha in textures to work properly.
This commit is contained in:
@@ -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)
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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){
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user