/** * Make a fragment shader that sets the output stencil to a stencil value * fetched from a multisample texture. * \param tex_target one of PIPE_TEXTURE_x */ void * util_make_fs_blit_msaa_stencil(struct pipe_context *pipe, enum tgsi_texture_type tgsi_tex) { return util_make_fs_blit_msaa_gen(pipe, tgsi_tex, "UINT", "STENCIL", ".y", "", ""); }
/** * Make a fragment shader that sets the output depth to a depth value * fetched from a multisample texture. * \param tex_target one of PIPE_TEXTURE_x */ void * util_make_fs_blit_msaa_depth(struct pipe_context *pipe, enum tgsi_texture_type tgsi_tex) { return util_make_fs_blit_msaa_gen(pipe, tgsi_tex, "FLOAT", "POSITION", ".z", "", ""); }
/** * Make a fragment shader that sets the output color to a color * fetched from a multisample texture. * \param tex_target one of PIPE_TEXTURE_x */ void * util_make_fs_blit_msaa_color(struct pipe_context *pipe, enum tgsi_texture_type tgsi_tex, enum tgsi_return_type stype, enum tgsi_return_type dtype) { const char *samp_type; const char *conversion_decl = ""; const char *conversion = ""; if (stype == TGSI_RETURN_TYPE_UINT) { samp_type = "UINT"; if (dtype == TGSI_RETURN_TYPE_SINT) { conversion_decl = "IMM[0] UINT32 {2147483647, 0, 0, 0}\n"; conversion = "UMIN TEMP[0], TEMP[0], IMM[0].xxxx\n"; } } else if (stype == TGSI_RETURN_TYPE_SINT) { samp_type = "SINT"; if (dtype == TGSI_RETURN_TYPE_UINT) { conversion_decl = "IMM[0] INT32 {0, 0, 0, 0}\n"; conversion = "IMAX TEMP[0], TEMP[0], IMM[0].xxxx\n"; } } else { assert(dtype == TGSI_RETURN_TYPE_FLOAT); samp_type = "FLOAT"; } return util_make_fs_blit_msaa_gen(pipe, tgsi_tex, samp_type, "COLOR[0]", "", conversion_decl, conversion); }
/** * Make a fragment shader that sets the output stencil to a stencil value * fetched from a multisample texture. * \param tex_target one of PIPE_TEXTURE_x */ void * util_make_fs_blit_msaa_stencil(struct pipe_context *pipe, unsigned tgsi_tex) { return util_make_fs_blit_msaa_gen(pipe, tgsi_tex, "STENCIL", ".y"); }
/** * Make a fragment shader that sets the output depth to a depth value * fetched from a multisample texture. * \param tex_target one of PIPE_TEXTURE_x */ void * util_make_fs_blit_msaa_depth(struct pipe_context *pipe, unsigned tgsi_tex) { return util_make_fs_blit_msaa_gen(pipe, tgsi_tex, "POSITION", ".z"); }
/** * Make a fragment shader that sets the output color to a color * fetched from a multisample texture. * \param tex_target one of PIPE_TEXTURE_x */ void * util_make_fs_blit_msaa_color(struct pipe_context *pipe, unsigned tgsi_tex) { return util_make_fs_blit_msaa_gen(pipe, tgsi_tex, "COLOR[0]", ""); }