X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fr300%2Fr300_fs.h;h=e831c30301b2fd6386d1024d2a7bf017bca2a873;hb=ccc888c39ee8a7c460dca5b1b659d28dbbc4c689;hp=18deb7a05e4cabed88b66bacaa3223cfb68a4c99;hpb=edb02671704aeb60e3eeaa7f58c73f4845c5b7e2;p=mesa.git diff --git a/src/gallium/drivers/r300/r300_fs.h b/src/gallium/drivers/r300/r300_fs.h index 18deb7a05e4..e831c30301b 100644 --- a/src/gallium/drivers/r300/r300_fs.h +++ b/src/gallium/drivers/r300/r300_fs.h @@ -24,13 +24,32 @@ #ifndef R300_FS_H #define R300_FS_H -#include "tgsi/tgsi_dump.h" +#include "pipe/p_state.h" + +#include "tgsi/tgsi_scan.h" + +#include "radeon_code.h" + +struct r300_fragment_shader { + /* Parent class */ + struct pipe_shader_state state; + struct tgsi_shader_info info; + + /* Has this shader been translated yet? */ + boolean translated; + + /* Compiled code */ + struct rX00_fragment_program_code code; +}; -#include "r300_context.h" -#include "r3xx_fs.h" -#include "r5xx_fs.h" void r300_translate_fragment_shader(struct r300_context* r300, struct r300_fragment_shader* fs); - #endif /* R300_FS_H */ +static inline boolean r300_fragment_shader_writes_depth(struct r300_fragment_shader *fs) +{ + if (!fs) + return FALSE; + return (fs->code.writes_depth) ? TRUE : FALSE; +} +#endif /* R300_FS_H */