477 GLuint dstmod, argmod0, argmod1, argmod2, argmodextra;
485 ERR(
"Failed to generate a GL_ATI_fragment_shader shader id\n");
489 checkGLcall(
"GL_EXTCALL(glBindFragmentShaderATI(ret))");
491 TRACE(
"glBeginFragmentShaderATI()\n");
493 checkGLcall(
"GL_EXTCALL(glBeginFragmentShaderATI())");
496 for (stage = 0; stage < gl_info->
limits.textures; ++stage)
506 TRACE(
"glSampleMapATI(GL_REG_%d_ATI, GL_TEXTURE_%d_ARB, GL_SWIZZLE_STR_ATI)\n",
518 TRACE(
"glPassTexCoordATI(GL_REG_%d_ATI, GL_TEXTURE_%d_ARB, %s)\n",
526 for (stage = 0; stage < gl_info->
limits.textures; ++stage)
528 GLuint argmodextra_x, argmodextra_y;
537 fixup =
op[stage].color_fixup;
540 FIXME(
"Swizzles not implemented\n");
577 for (stage = 0; stage < gl_info->
limits.textures; ++stage)
596 TRACE(
"glSampleMapATI(GL_REG_%d_ATI, GL_REG_%d_ATI, GL_SWIZZLE_STR_ATI)\n",
602 TRACE(
"glSampleMapATI(GL_REG_%d_ATI, GL_TEXTURE_%d_ARB, %s)\n",
631 if(tmparg ==
GL_NONE)
continue;
657 FIXME(
"Constant %u already used.\n", stage);
664 switch (
op[stage].cop)
673 arg1, rep1, argmod1);
686 arg2, rep2, argmod2);
699 arg2, rep2, argmodextra | argmod2);
706 arg2, rep2, argmod2);
716 arg1, rep1, argmodextra,
717 arg1, rep1, argmod1);
738 arg2, rep2, argmod2);
746 arg1, rep1, argmod1);
756 argmodextra = argmod1;
760 arg1, rep1, argmod1);
768 argmodextra = argmod1;
771 arg1, rep1, argmodextra,
785 arg0, rep0, argmod0);
792 arg2, rep2, argmod2);
795 default:
FIXME(
"Unhandled color operation %d on stage %d\n",
op[stage].cop, stage);
805 switch (
op[stage].aop)
928 ERR(
"Application uses an invalid alpha operation\n");
931 default:
FIXME(
"Unhandled alpha operation %d on stage %d\n",
op[stage].aop, stage);
936 FIXME(
"Texture factor constant already used.\n");
946 TRACE(
"glEndFragmentShaderATI()\n");
948 checkGLcall(
"GL_EXTCALL(glEndFragmentShaderATI())");
static void wrap_op3(const struct wined3d_gl_info *gl_info, GLuint op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod)
#define ATIFS_CONST_BUMPMAT(i)
static void wrap_op1(const struct wined3d_gl_info *gl_info, GLuint op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod)
#define WINED3DTA_CURRENT
#define GL_SWIZZLE_STR_ATI
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
static BOOL op_reads_texture(const struct texture_stage_op *op)
#define ATIFS_CONST_TFACTOR
GLuint GLuint GLuint GLuint arg1
#define WINED3DTA_TEXTURE
#define WINED3DTA_DIFFUSE
static BOOL is_identity_fixup(struct color_fixup_desc fixup)
#define WINED3DTA_TFACTOR
#define GL_SATURATE_BIT_ATI
static BOOL op_reads_tfactor(const struct texture_stage_op *op)
static void wrap_op2(const struct wined3d_gl_info *gl_info, GLuint op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod)
static void atifs_color_fixup(const struct wined3d_gl_info *gl_info, struct color_fixup_desc fixup, GLuint reg)
#define GL_SWIZZLE_STQ_DQ_ATI
#define GL_SWIZZLE_STR_DR_ATI
static const char * debug_swizzle(GLuint swizzle)
struct wined3d_gl_limits limits
static BOOL op_reads_constant(const struct texture_stage_op *op)
static GLuint register_for_arg(DWORD arg, const struct wined3d_gl_info *gl_info, unsigned int stage, GLuint *mod, GLuint *rep, GLuint tmparg)
static GLuint find_tmpreg(const struct texture_stage_op op[MAX_TEXTURES])