On Mon, Aug 18, 2014 at 5:50 PM, Kenneth Graunke wrote:
> Almost all uses of discard in GLSL take the form:
>
> if (some_condition)
> discard;
>
> This generates the following assembly:
>
> cmp.condition.f0.0 src0 src1 /* generate some condition */
> IF
>(+f0.1) cmp.ne.
On 19 August 2014 02:50, Kenneth Graunke wrote:
> +/* Returns a conditional modifier that negates the condition. */
> +enum brw_conditional_mod
> +brw_negate_cmod(uint32_t cmod)
> +{
> + switch (cmod) {
> + case BRW_CONDITIONAL_Z:
> + return BRW_CONDITIONAL_NZ;
> + case BRW_CONDITIONAL_
Almost all uses of discard in GLSL take the form:
if (some_condition)
discard;
This generates the following assembly:
cmp.condition.f0.0 src0 src1 /* generate some condition */
IF
(+f0.1) cmp.ne.f0.1 g0 g0 /* figure out enabled channels */
(-f0.1.anyNh) halt