gallium: Add PIPE_SHADER_CAP_DOUBLES
This is for reporting whether or not double precision floating-point operations are supported. Reviewed-by: Francisco Jerez <currojerez@riseup.net>
This commit is contained in:
@@ -126,6 +126,8 @@ gallivm_get_shader_param(enum pipe_shader_cap param)
|
|||||||
return PIPE_SHADER_IR_TGSI;
|
return PIPE_SHADER_IR_TGSI;
|
||||||
case PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED:
|
case PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED:
|
||||||
return 1;
|
return 1;
|
||||||
|
case PIPE_SHADER_CAP_DOUBLES:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
/* if we get here, we missed a shader cap above (and should have seen
|
/* if we get here, we missed a shader cap above (and should have seen
|
||||||
* a compiler warning.)
|
* a compiler warning.)
|
||||||
|
@@ -456,6 +456,8 @@ tgsi_exec_get_shader_param(enum pipe_shader_cap param)
|
|||||||
return PIPE_SHADER_IR_TGSI;
|
return PIPE_SHADER_IR_TGSI;
|
||||||
case PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED:
|
case PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED:
|
||||||
return 1;
|
return 1;
|
||||||
|
case PIPE_SHADER_CAP_DOUBLES:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
/* if we get here, we missed a shader cap above (and should have seen
|
/* if we get here, we missed a shader cap above (and should have seen
|
||||||
* a compiler warning.)
|
* a compiler warning.)
|
||||||
|
@@ -288,6 +288,8 @@ to be 0.
|
|||||||
program. It should be one of the ``pipe_shader_ir`` enum values.
|
program. It should be one of the ``pipe_shader_ir`` enum values.
|
||||||
* ``PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS``: The maximum number of texture
|
* ``PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS``: The maximum number of texture
|
||||||
sampler views. Must not be lower than PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS.
|
sampler views. Must not be lower than PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS.
|
||||||
|
* ``PIPE_SHADER_CAP_DOUBLES``: Whether double precision floating-point
|
||||||
|
operations are supported.
|
||||||
|
|
||||||
|
|
||||||
.. _pipe_compute_cap:
|
.. _pipe_compute_cap:
|
||||||
|
@@ -447,6 +447,8 @@ static int r600_get_shader_param(struct pipe_screen* pscreen, unsigned shader, e
|
|||||||
} else {
|
} else {
|
||||||
return PIPE_SHADER_IR_TGSI;
|
return PIPE_SHADER_IR_TGSI;
|
||||||
}
|
}
|
||||||
|
case PIPE_SHADER_CAP_DOUBLES:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -327,6 +327,9 @@ static int si_get_shader_param(struct pipe_screen* pscreen, unsigned shader, enu
|
|||||||
switch (param) {
|
switch (param) {
|
||||||
case PIPE_SHADER_CAP_PREFERRED_IR:
|
case PIPE_SHADER_CAP_PREFERRED_IR:
|
||||||
return PIPE_SHADER_IR_LLVM;
|
return PIPE_SHADER_IR_LLVM;
|
||||||
|
case PIPE_SHADER_CAP_DOUBLES:
|
||||||
|
return 0; /* XXX: Enable doubles once the compiler can
|
||||||
|
handle them. */
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -378,6 +381,8 @@ static int si_get_shader_param(struct pipe_screen* pscreen, unsigned shader, enu
|
|||||||
return 16;
|
return 16;
|
||||||
case PIPE_SHADER_CAP_PREFERRED_IR:
|
case PIPE_SHADER_CAP_PREFERRED_IR:
|
||||||
return PIPE_SHADER_IR_TGSI;
|
return PIPE_SHADER_IR_TGSI;
|
||||||
|
case PIPE_SHADER_CAP_DOUBLES:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -620,7 +620,8 @@ enum pipe_shader_cap
|
|||||||
PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS,
|
PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS,
|
||||||
PIPE_SHADER_CAP_PREFERRED_IR,
|
PIPE_SHADER_CAP_PREFERRED_IR,
|
||||||
PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED,
|
PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED,
|
||||||
PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS
|
PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS,
|
||||||
|
PIPE_SHADER_CAP_DOUBLES
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user