Lines Matching defs:shader
247 * \brief Validates a shader.
249 * \param[in] shader The shader.
252 bool rogue_validate_shader(const struct rogue_shader *shader)
254 CHECK(!list_is_empty(&shader->instr_list));
255 ASSERT_SHADER_STAGE_RANGE(shader->stage);
258 switch (shader->stage) {
260 /* Make sure there is (only) one end vertex shader instruction. */
261 CHECKF(rogue_shader_instr_count_type(shader, ROGUE_OP_END_VERT) == 1,
264 /* Make sure the end vertex shader instruction is the last one. */
265 CHECKF(instr_last_entry(&shader->instr_list)->opcode == ROGUE_OP_END_VERT,
270 /* Make sure there is (only) one end fragment shader instruction. */
271 CHECKF(rogue_shader_instr_count_type(shader, ROGUE_OP_END_FRAG) == 1,
274 /* Make sure the end fragment shader instruction is the last one. */
275 CHECKF(instr_last_entry(&shader->instr_list)->opcode == ROGUE_OP_END_FRAG,
284 foreach_instr (instr, &shader->instr_list)