texture_cube_clear_zwrite_vertex_shader: use texture_cube.fs.asm
This commit is contained in:
parent
96d7286e7c
commit
35ad4b4f7d
4
drm/clear.fs.asm
Normal file
4
drm/clear.fs.asm
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
OUT TEX_SEM_WAIT
|
||||||
|
:
|
||||||
|
out[0].a = MAX src0.1 src0.1 ,
|
||||||
|
out[0].rgb = MAX src0.000 src0.000 ;
|
||||||
7
drm/clear.fs.inc
Normal file
7
drm/clear.fs.inc
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
0x00078005,
|
||||||
|
0x08020080,
|
||||||
|
0x08020080,
|
||||||
|
0x00920490,
|
||||||
|
0x00c18003,
|
||||||
|
0x00000005,
|
||||||
|
|
||||||
7
drm/texture_cube.fs.asm
Normal file
7
drm/texture_cube.fs.asm
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
TEX TEX_SEM_WAIT TEX_SEM_ACQUIRE
|
||||||
|
temp[0].argb = LD tex[0].rgba temp[0].rgaa ;
|
||||||
|
|
||||||
|
OUT TEX_SEM_WAIT
|
||||||
|
src0.a = temp[0], src0.rgb = temp[0] :
|
||||||
|
out[0].a = MAX src0.a src0.a ,
|
||||||
|
out[0].rgb = MAX src0.rgb src0.rgb ;
|
||||||
14
drm/texture_cube.fs.inc
Normal file
14
drm/texture_cube.fs.inc
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
0x00007807,
|
||||||
|
0x02400000,
|
||||||
|
0xe400f400,
|
||||||
|
0x00000000,
|
||||||
|
0x00000000,
|
||||||
|
0x00000000,
|
||||||
|
|
||||||
|
0x00078005,
|
||||||
|
0x08020000,
|
||||||
|
0x08020000,
|
||||||
|
0x00440220,
|
||||||
|
0x0060c003,
|
||||||
|
0x00000005,
|
||||||
|
|
||||||
@ -121,43 +121,13 @@ const face faces[] = {
|
|||||||
static const int faces_length = (sizeof (faces)) / (sizeof (faces[0]));
|
static const int faces_length = (sizeof (faces)) / (sizeof (faces[0]));
|
||||||
|
|
||||||
static const uint32_t fragment_shader[] = {
|
static const uint32_t fragment_shader[] = {
|
||||||
#include "../shader_examples/mesa/texture_cube.fs.txt"
|
#include "texture_cube.fs.inc"
|
||||||
// clear shader
|
#include "clear.fs.inc"
|
||||||
US_CMN_INST__TYPE__US_INST_TYPE_OUT
|
|
||||||
| US_CMN_INST__TEX_SEM_WAIT(1)
|
|
||||||
| US_CMN_INST__RGB_OMASK__RGB
|
|
||||||
| US_CMN_INST__ALPHA_OMASK__A
|
|
||||||
|
|
||||||
, US_ALU_RGB_ADDR__ADDR0(128)
|
|
||||||
| US_ALU_RGB_ADDR__ADDR1(128)
|
|
||||||
| US_ALU_RGB_ADDR__ADDR2(128)
|
|
||||||
|
|
||||||
, US_ALU_ALPHA_ADDR__ADDR0(128)
|
|
||||||
| US_ALU_ALPHA_ADDR__ADDR1(128)
|
|
||||||
| US_ALU_ALPHA_ADDR__ADDR2(128)
|
|
||||||
|
|
||||||
, US_ALU_RGB_INST__RED_SWIZ_A__ZERO
|
|
||||||
| US_ALU_RGB_INST__GREEN_SWIZ_A__ZERO
|
|
||||||
| US_ALU_RGB_INST__BLUE_SWIZ_A__ZERO
|
|
||||||
| US_ALU_RGB_INST__RED_SWIZ_B__ZERO
|
|
||||||
| US_ALU_RGB_INST__GREEN_SWIZ_B__ZERO
|
|
||||||
| US_ALU_RGB_INST__BLUE_SWIZ_B__ZERO
|
|
||||||
| US_ALU_RGB_INST__OMOD(7)
|
|
||||||
| US_ALU_RGB_INST__TARGET__A
|
|
||||||
|
|
||||||
, US_ALU_ALPHA_INST__ALPHA_OP__OP_MAX
|
|
||||||
| US_ALU_ALPHA_INST__ALPHA_SWIZ_A__ONE
|
|
||||||
| US_ALU_ALPHA_INST__ALPHA_SWIZ_B__ONE
|
|
||||||
| US_ALU_ALPHA_INST__OMOD(7)
|
|
||||||
| US_ALU_ALPHA_INST__TARGET__A
|
|
||||||
|
|
||||||
, US_ALU_RGBA_INST__RGB_OP__OP_MAX
|
|
||||||
};
|
};
|
||||||
static const int fragment_shader_length = (sizeof (fragment_shader)) / (sizeof (fragment_shader[0]));
|
static const int fragment_shader_length = (sizeof (fragment_shader)) / (sizeof (fragment_shader[0]));
|
||||||
static const int fragment_shader_instructions = (fragment_shader_length / 6) - 1;
|
static const int fragment_shader_instructions = (fragment_shader_length / 6) - 1;
|
||||||
|
|
||||||
static const uint32_t vertex_shader[] = {
|
static const uint32_t vertex_shader[] = {
|
||||||
//#include "../shader_examples/mesa/texture_cube.vs.txt"
|
|
||||||
#include "cube_rotate.vs.inc"
|
#include "cube_rotate.vs.inc"
|
||||||
#include "clear_nop.vs.inc"
|
#include "clear_nop.vs.inc"
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user