diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-07-31 11:56:55 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-08-01 16:15:03 -0700 |
commit | f3e15122d4b4b3fbeb33790b7a26826d69066ae9 (patch) | |
tree | e5a3a4add5a6a6febd982689b35978788ce9005a /src | |
parent | 9e66ff3ea9a83d202c5b98f5d953fe21fe9d17eb (diff) |
panfrost: Add support for decoding gl_FrontFacing
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/panfrost/include/panfrost-job.h | 11 | ||||
-rw-r--r-- | src/panfrost/pandecode/decode.c | 1 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/panfrost/include/panfrost-job.h b/src/panfrost/include/panfrost-job.h index ffe1bf25aa4..9179ceff2ec 100644 --- a/src/panfrost/include/panfrost-job.h +++ b/src/panfrost/include/panfrost-job.h @@ -788,6 +788,10 @@ struct mali_payload_set_value { * implemented as special attributes, denoted by MALI_ATTR_IMAGE. For images, * let shift=extra_flags=0. Stride is set to the image format's bytes-per-pixel * (*NOT the row stride*). Size is set to the size of the image itself. + * + * Special internal varyings (including gl_FrontFacing) are handled vai + * MALI_ATTR_INTERNAL, which has all fields set to zero and uses a special + * elements pseudo-pointer. */ enum mali_attr_mode { @@ -796,9 +800,14 @@ enum mali_attr_mode { MALI_ATTR_POT_DIVIDE = 2, MALI_ATTR_MODULO = 3, MALI_ATTR_NPOT_DIVIDE = 4, - MALI_ATTR_IMAGE = 5 + MALI_ATTR_IMAGE = 5, + MALI_ATTR_INTERNAL = 6 }; +/* Pseudo-address for gl_FrontFacing */ + +#define MALI_VARYING_FRONT_FACING (0x20) + /* This magic "pseudo-address" is used as `elements` to implement * gl_PointCoord. When read from a fragment shader, it generates a point * coordinate per the OpenGL ES 2.0 specification. Flipped coordinate spaces diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c index a44c3732477..080d650fc5a 100644 --- a/src/panfrost/pandecode/decode.c +++ b/src/panfrost/pandecode/decode.c @@ -382,6 +382,7 @@ static char *pandecode_attr_mode(enum mali_attr_mode mode) DEFINE_CASE(MODULO); DEFINE_CASE(NPOT_DIVIDE); DEFINE_CASE(IMAGE); + DEFINE_CASE(INTERNAL); default: return "MALI_ATTR_UNUSED /* XXX: Unknown stencil op, check dump */"; } |